πŸ—οΈBuild Tools

You can use Kinto with all your favorite build tools:

For a complete guide on deploying contracts on Kinto, see our development guide.

Foundry

Foundry is a smart contract development toolchain.

With Foundry you can manage your dependencies, compile your project, run tests, deploy smart contracts, and interact with the chain from the command-line and via Solidity scripts.

Check out the Foundry Book to get started with using Foundry with Kinto.


Using Foundry with Kinto

Foundry supports Kinto out of the box. To install Foundry, you can just follow the instructions here.

Provide the Kinto RPC URL and Chain ID when deploying and verifying your contracts.

Deploying a smart contract​

forge create ... --rpc-url=$KINTO_RPC_URL

Verifying a smart contract​

//Example of contract verification in our blockscout
  
  forge verify-contract 
    0xdb791AF345A21588957E4e45596411b2Be2BD4cd 
    src/sample/Counter.sol:Counter 
    --verifier-url https://explorer.kinto.xyz/api  
    --verifier blockscout

Hardhat

Hardhat is a development environment for extensible and rapid smart contract development.

You can use Hardhat to modify, build, debug, and deploy your smart contracts to Kinto.

To setup Hardhat, follow the instructions here.

Now, access a hardhat terminal:

yarn
yarn hardhat console --network kinto

Using Hardhat with Kinto

To configure Hardhat to deploy smart contracts to Kinto, update your project’s hardhat.config.ts file by adding Kinto as a network:

But make sure that your hardhat.config.js includes the kinto network

module.exports = {
  solidity: "0.8.13",
  networks: {
    "kinto": {
      url: "https://kinto-mainnet.calderachain.xyz/http",
      accounts: ['youraccountprivatekeygoeshere'],
      gas: 10000000
   },
  }
};

Truffle

Truffle is a comprehensive suite of tools for smart contract development.

Truffle can quickly build, test, debug, and deploy your smart contracts to Kinto.


Using Truffle with Kinto

To configure Truffle to deploy smart contracts to Kinto:

  1. Install Truffle by running the following command:

    npm install -g truffle
  2. Create a new Truffle project by running the following command:

    truffle init
  3. Update your project's truffle-config.js file by adding Kinto as a network:

    const HDWalletProvider = require('@truffle/hdwallet-provider');
    
    module.exports = {
      networks: {
        'kinto': {
          provider: function () {
            return new HDWalletProvider('MNEMONIC', 'https://kinto-mainnet.calderachain.xyz/http
    ');
          },
        },
      },
    };
  4. Compile and deploy your smart contract by running the following command:

    truffle migrate --network kinto

Last updated