Deployment and Interaction
Using straichaind
In this method, the instantiation and interaction with the binary are done using the straichaind CLI or the CosmJS Node Console, which results in deploying CW contracts on-chain. Refer to this section for understanding the deployment and interaction with the chain. Additionally, see the section “A Quick Example for Deployment Using straichaind” for deploying the contract on the Testnet Testnet with the poke.wasm example.
Using TypeScript
This approach utilizes cosmwasm-tools and ts-codegen, which let you generate TypeScript classes for your contracts' interaction and on-chain deployment. Refer to the section “Deployment Using TypeScript (Windows/Linux/Mac)” below to set up your development environment and deploy your contracts on the Testnet Testnet.Here is an alternative if you haven't set up the environment variables to interact with the network previously:
If you have already set up the environment variables, you can use the following command:
Otherwise, you will have to type in the following command to upload the wasm binary to the network:
The response contains the Code Id of the uploaded wasm binary.
Get the Transaction Hash from the response
Get the full transaction details with events
Download the wasm binary from the chain and compare it to the original one
The two binaries should be identical, and the diff command should return nothing
diff command should return nothingPrepare the instantiation message
Instantiate the contract
Check the contract details and account balance
See the contract details
Check the contract balance
Upon instantiation the cw_nameservice contract will store the instantiation message data in the contract's storage with the storage key "config".
Query the entire contract state
Last updated