cCLP Contracts
npm i
Create a .secret
file with the mnemonic
Create a .infura-key
file with your key from infura.io
npm run compile
npm test
You need a running version for a node on http://localhost:8545/. You can run one with
./node_modules/.bin/ganache-cli
To run the deployment
./node_modules/.bin/truffle migrate
Or you can test the deployment with the in_memory
ganache provider
./node_modules/.bin/truffle migrate --network in_memory
Role | (addr?) | |
---|---|---|
proxyAdmin | Admin of the proxy contract. Can do the upgrades to new version of token | |
masterMinter | Can add and remove minters | |
pauser | Can pause the contract | |
blacklister | Can blacklist addreses (block) | |
owner | Owner of the token. Can set/change, masterMinter, pauser, blacklister and owner |
We must get openzeppelin sdk client and the do something like that
echo "setting roles accounts"
myDeployerAccount="0x....."
owner="0x......"
masterMinterAddress="0x....."
blackListerAddress="0x....."
pauserMasterAddress="0x...."
blacklistable=$(openzeppelin create Blacklistable --network local --from $myDeployerAccount --init initialize --args "$blackListerAddress,$owner")
masterMinter=$(openzeppelin create MasterMinter --network local --from $myDeployerAccount --init initialize --args "$masterMinterAddress,$owner")
masterPauser=$(openzeppelin create MasterPauser --network local --from $myDeployerAccount --init initialize --args "$pauserMasterAddress,$owner")
fiatToken=$(openzeppelin create FiatToken --network local --from $myDeployerAccount --init initialize --args "\"cCLP Fiat Token\",\"cCLP\",18,$masterMinter,$blacklistable,$masterPauser,$owner")