-
Notifications
You must be signed in to change notification settings - Fork 160
Prerequisite Instructions for Deploying and Setting Up the Polymath Contracts
The following instructions will allow you to run the CLI on a local test network (Ganache) using the latest Polymath smart contracts - version 3.0.0
Install requirement packages
- node v10.16.0
- yarn v1.17.3
- Truffle v5.0.6 (core: 5.0.6)
- Solidity v0.5.8 (solc-js)
Step-by-Step Guide to Run the CLI
-
Create a new directory
-
Clone polymath-core repository
https://github.com/PolymathNetwork/polymath-core/tree/master
-
cd into polymath-core
-
Checkout master branch
$ git checkout master
-
Install truffle globally
$ yarn global add truffle@5.0.6
-
Install dependencies
$ yarn install
-
In a new terminal window run ganache with the script provided
$ yarn ganache-cli
-
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.) -
Go back to first terminal and compile and deploy contracts
$ truffle compile
,
$ truffle migrate
-
cd to CLI folder
-
Run
yarn install
-
Return to root path and run
node CLI/polymath-cli <command>
-
To see the list all available commands
node CLI/polymath-cli -h
-
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
CLI Installation
Running the CLI Features and Modules
- How to Use the POLY Faucet
- St-20 Generator
- STO Manager
- How to Use the Investor Portal
- Token Manager
- Transfer Feature
- Transfer Ownership
- Dividends Manager
- Transfer Manager
- Contract Manager
- Permission Manager
- Time Travel for Contract Testing
Modules
- LockupTransferManager
- VolumeRestrictionTransferManager
- BlacklistTransferManager
- ManualApprovalTransferManager
- CountTransferManager
- GeneralPermissionManager
- PercentageTransferManager
- GeneralTransferManager
- DividendCheckpointModules
- VestingEscrowWallet
- CappedSTO
- USDTieredSTO
- AdvancedPLCRVotingCheckpoint
- VotingCheckpointModules
- Schedule Checkpoint