1.0.1 • Published 3 years ago

wanchain-truffle-sdk v1.0.1

Weekly downloads
54
License
Apache-2.0
Repository
github
Last release
3 years ago

wanchain-truffle-sdk

A truffle SDK for deploying smart contracts on Wanchain.

Installation

Use NPM or Yarn to install the package:

npm install --save wanchain-truffle-sdk

Usage

Step 1: Modify truffle-config.js

const WanProvider = require('wanchain-truffle-sdk').WanProvider;
const wanProvider = new WanProvider("your-mnemonic-or-private-key", "wanchain-node-or-iwan-url");
module.exports = {
  networks: {
    ......
    wan: {
      provider: wanProvider,
      network_id: "*"
    }
    ......
  }
}

Step 2: Use truffle command to deploy contracts

truffle migrate --network wan