Skip to content

Prerequisite Instructions for Deploying and Setting Up the Polymath Contracts

Charles Plant St.Louis edited this page Jan 3, 2019 · 5 revisions

The following instructions will allow you to run the CLI on a local test network (Ganache) using the latest Polymath smart contracts - version 2.1.0

Install requirement packages

  • node v9.11.1
  • npm v5.6.0
  • Truffle v4.1.14 (core: 4.1.14)
  • Solidity v0.4.24 (solc-js)

Step-by-Step Guide to Run the CLI

  1. Create a new directory

  2. Clone polymath-core repository https://github.com/PolymathNetwork/polymath-core/tree/dev-2.1.0

  3. cd into polymath-core

  4. Checkout master branch $ git checkout dev-2.1.0

  5. Install truffle globally $ npm install -g truffle@4.1.14

  6. Install dependencies $ npm install

  7. In a new terminal window run ganache $ ganache-cli -i 15 -l 9000000

  8. Copy the first private key account generated by ganache and create a file within polymath-core directory titled privKeyLocal and paste the private key in that file without the 0x part of the address (note: make sure privKeyLocal is in parallel with package.json file.)

  9. Go back to first terminal and compile and deploy contracts

$ truffle compile , $ truffle migrate

  1. cd to CLI folder

  2. Run yarn install

  3. Return to root path and run node CLI/polymath-cli <command>

  4. To see the list all available commands node CLI/polymath-cli -h

  5. Starting working with the CLI

Note 1: You can access Ethereum testnets and mainnet via the Infura load-balanced nodes. You have to save your private key to ./privKey file and run CLI command adding --remote-node option. Example: node CLI/polymath-cli <command> --remote-node kovan

Note 2: Parity can be used to run this on a testnet or mainnet. We recommend using Kovan due to gas limits: parity --chain kovan --rpcapi "eth,net,web3,personal,parity" --unlock [YOUR ACCOUNT] --password $HOME/password.file

Clone this wiki locally