Skip to content

Truffle Integration

We have built the truffle-plugin plugin to easily push your smart contracts developed inside Truffle to the Kriptonio platform.

Installation

yarn add @kriptonio/truffle-plugin

Ensure that you have the Truffle CLI installed.

yarn global add truffle

Usage

Open your truffle-config.js and add @kriptonio/truffle-plugin to your plugins.

plugins: ['@kriptonio/truffle-plugin'];

Next, you will need to add kriptonio configuration to your truffle config file. It will contain information needed to upload your smart contract to Kriptonio.

  kriptonio: {
    title: 'My Token on Kriptonio',
    contract: 'MyERC20',
    accessToken: '<kriptonio-access-token>',
    chainId: 137,
  }

At the end, run following two commands, to compile and upload smart contract to Kriptonio.

truffle compile
truffle run kriptonio-upload

To read more detailed instructions about the plugin, including configuration options and other information, please visit the README file.