Skip to main content

Upgrades

The currency pool and pool oracle contracts expose upgrade(new_wasm_hash), callable only by the owner. It replaces the contract's code in place: the contract address, storage, balances and positions are unchanged.

Process​

  1. Build the new contract and install its WASM on the network; this returns a hash.
  2. The owner calls upgrade with that hash.
  3. The new code runs from the next call.

Compatibility rules for new code​

  • Stored types may gain fields only in a way existing entries can still be read.
  • Existing positions keep the terms they were sold on.
  • Events keep their topics and fields; add new events rather than change old ones.

Governance​

On testnet, BlockFinaX releases upgrades as testing needs. Before mainnet, ownership moves to a multisig and upgrades take effect only after a public delay. See Privileged controls.

Integrator impact​

Contract addresses stay fixed across upgrades. Watch Release notes and contract events for changes in behaviour.