Skip to main content
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. Separately, Proposal 116 disables inbound IBC transfers as part of the SIP-03 migration.
The Sei precompiles can be used like any standard smart contract on the EVM. For example, using ethers.js, you can query and execute actions on an existing CosmWasm contract as follows:

Setup

To install ethers, run the following command in your project directory terminal:
Next, you’ll need to use one of the precompiles in 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 a get_count function

Executing a payable function

In this example, we execute the ‘donate’ method on our contract. This is similar to the increment method, but also receives funds from the user and stores it in the contract.
For payable contracts, Sei amounts have to be sent directly to the contract while other denoms should use the coins field.