Smart Contracts
Last updated
Last updated
The Kujira blockchain is fully enabled with CosmWASM v1.0 and IBC v3 support, allowing you as a developer to build Rust-based smart contracts that interact with the home.
If you are new to CosmWASM and Smart Contracts, we recommend checking out the CW-Template repo and familiarising yourself with the basic interfaces and model of CosmWASM smart contracts.
When you are ready to deploy, you will need a local build of the chain core, in order to store your code on-chain and submit governance proposals to instantiate it.
You're now ready to store your code on-chain:
This will generate some logs when successfully broadcast, which contains the code_id
:
Your code is now stored on-chain. You can think of it a little like a Class in an object-oriented lanaguage. We now need to create an instance of it that we can interact with.
On Kujira, this must be done via a governance proposal, in order to maintain the quality of code and dapps running on the network.
This will create the Proposal at a funding stage. You can then visit https://blue.kujira.app/govern to fund the proposal deposit, and open it for voting.
Upon the vote passing, the contract will be instantiated and the instance of the contract will have its own address. You can find the address as so:
You can now move on to building the UI for your newly deployed smart contract.
dApp Front Ends