Per Proposal 115, no new CosmWasm contracts can be deployed on Sei. The examples below apply to pre-existing CosmWasm contracts only —
instantiate() will revert.Setup
To installethers, run the following command in your project directory
terminal:
EVM Precompiles section. In
this example, we’re going to be using the wasmd precompile:
Using the contract
Next, we’ll set up a provider and contract to interact with the blockchain:Querying & Executing a CosmWasm Contract
Once you have the contract, you can query and execute messages to any CosmWasm smart contract. In the below example we assume there is a counter contract with aget_count function
Executing a payable function
In this example, we execute the ‘donate’ method on our contract. This is similar to theincrement method, but also receives funds from the user and stores it
in the contract.
coins field.