Deploying Smart Contracts

After preparing your development environment and testing your smart contracts, the subsequent step is deploying them on the Cosmos blockchain. This section will provide you with a guided walkthrough of the deployment process. For testing purposes, consider deploying on a dedicated testnet like Gaia Testnet.

Prerequisites

Before deploying your smart contracts, ensure you have completed these steps:

Deployment Steps

Execute these steps to deploy your smart contracts:

  1. Compile Contracts (if not done already):

    If you haven't compiled your contracts yet, you can do so using the following command:

    cd contracts/factory && archway build --optimize
  2. Store the contracts bytecode on archway:

    The blockchain doesn't creates instances at once. First, you need to store the contract byte code to do so.

    archway store
  3. Instantiate the factory contract:

    You will need to instantiate the factory contract before starting working with our systems.

    archway instantiate --args '{"code_id": 123}'
  4. Deploy a multisig:

    Once you've created a factory instance, you are ready to create multisig instances. Go to the multisig folder and deploy its byte code:

    cd contracts/factory && archway build --optimize

    Then store the byte code:

    archway store

    You should get a code id from the console, you will use this to deploy a multisig from the factory.

Last updated