Smart Contracts
How to deploy smart contracts
Working with Cosmwasm
Prerequisites
rustup default stable rustup target add wasm32-unknown-unknown cargo install cargo-generate --features vendored-openssl cargo install cargo-run-scriptcargo generate --git https://github.com/CosmWasm/cosmwasm-template.git --name my-contract cd my-contractcargo wasm cargo schema
Upload and Instantiate the Contract
kiichaind wasmd tx wasm store artifacts/my_contract.wasm --from my-key --gas auto --gas-adjustment 1.2 --node <KIICHAIN_NODE> --chain-id <KIICHAIN_CHAIN_ID>kiichaind wasmd tx wasm instantiate <CONTRACT_CODE_ID> '{}' --from my-key --label "My Contract" --gas auto --gas-adjustment 1.2 --node <KIICHAIN_NODE> --chain-id <KIICHAIN_CHAIN_ID>kiichaind wasmd tx wasm execute <CONTRACT_ADDRESS> '{"your_method": {}}' --from my-key --gas auto --gas-adjustment 1.2 --node <KIICHAIN_NODE> --chain-id <KIICHAIN_CHAIN_ID>
Working with EVM
Prerequisites
Write and Compile the Smart Contract
Deploy the Smart Contract
Interact with the Deployed Contract
References
Last updated