Instantiate Contract
On Cosmos-based blockchains, instantiating a contract typically refers to deploying a new instance of a smart contract onto the blockchain.
This process is distinct from just uploading the contract’s code; instantiation involves executing the contract’s init
function, setting its initial state, and possibly designating an admin address.
Each instantiated contract is given a unique address on the blockchain, which can be used to interact with it through queries and transactions.
Navigation path
Instantiating a contract in Celatone is a process that can be done through various touchpoints within the platform:
- After Storing Code: Post storing the code, you have the option to instantiate it directly.
- Deploy Contract: Navigate to the ‘Deploy Contract’ section and use the Contract ID to instantiate.
Steps to Instantiate a Contract
- Choose the Code: You can instantiate a contract by selecting a code you’ve previously stored or instantiated.
- Label: Assign a name to your contract instance for easy identification. This label will be stored in the network and cannot be changed.
- Admin Address (Optional): Provide an admin address if you want to assign admin privileges for contract management, which mainly can migrate the contract, assign other address to be an admin, and remove themselves from admin.
- Instantiate Message: Input the necessary parameters for your contract in JSON format. You can use the ‘JSON input’ or ‘Your Schema’ (if available) to ensure correct data structure.
- Attach Assets: Optionally, you can attach assets to the contract upon instantiation, similar to when executing messages.
- Confirm Instantiate: Review all information, then click “Instantiate” to deploy your contract to the network.
After Instantiation
After you complete the instantiation process for a contract on Celatone, the system will display a confirmation screen with several pieces of important information:
- Transaction Hash (Tx Hash): The unique identifier for the instantiation transaction on the blockchain.
- Contract Address: The unique blockchain address of the newly instantiated contract.
- Transaction Fee (Tx Fee): The cost incurred to instantiate the contract, paid in the blockchain’s native cryptocurrency.
Additionally, you’ll have options to: View Contract, Execute, Query
Furthermore, there’s an option to fill in off-chain details for your contract:
- Name: Assign a name to your contract for ease of identification.
- Description: Provide a description to understand the contract’s purpose.
- Tags: Add tags for organizational purposes.
- Listed on: Choose to list your contract on a specific list for better categorization.
You can save this off-chain information on Celatone, and it can be edited later for updates or corrections. See Save Contracts
Was this page helpful?