Skip to content

wanchain/wanchain-truffle-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wanchain-truffle-sdk [DEPRECATED]

A truffle SDK for deploying smart contracts on Wanchain.

Important Notice: wanchain-truffle-sdk is now deprecated, please switch to @truffle/hdwallet-provider.

Wanchain is fully compatible with Ethereum after Saturn fork (v3.0.0).

Installation

Use NPM or Yarn to install the package:

npm install --save wanchain-truffle-sdk

Usage

Step 1: Modify truffle-config.js

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

    Step 2: Use truffle command to deploy contracts

    truffle migrate --network wan

    Releases

    No releases published

    Packages

    No packages published