You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result of this task is an implementation of the conditional migrate entry point calling after a contract's code update on the blockchain. Currently migrate is called every time the contract's binary is updated on the chain.
Part 1: Procedure
The following procedure should be implemented:
Get the version of the on-chain state for the given contract by checking the Wasm binary before the code upgrade.
Get the state version supported by the new contract's binary (from the Wasm binary code).
Call migrate entry point if:
at least one of the two versions is not provided, or
both versions are provided and are different.
Part 2: Migrate method
The migrate method needs to have a new parameter provided: info: MigrateInfo. In order to keep the backward compatibility, the VM should check the arity of the method implemented by the contract. If the arity is greater than 3, the following migrate signature should be assumed:
I just split this ticket in Part1 and part 2. Part1 is already done in the latest release (CosmWasm 2.1 and wasmd). What is missing now is the information about the old and new migrate version in the migrate entry point.
The result of this task is an implementation of the conditional
migrate
entry point calling after a contract's code update on the blockchain. Currentlymigrate
is called every time the contract's binary is updated on the chain.Part 1: Procedure
The following procedure should be implemented:
Part 2: Migrate method
The
migrate
method needs to have a new parameter provided:info: MigrateInfo
. In order to keep the backward compatibility, the VM should check the arity of the method implemented by the contract. If the arity is greater than 3, the followingmigrate
signature should be assumed:The text was updated successfully, but these errors were encountered: