Cryptocoin Insurance smart contract
Information system consist of one ERC20 - compatible token processing smart contract - Cryptocoin. All tokens intended for distribution are emitted at the time of Cryptocoin smart contract deployment. After deploy all this tokens keeped on single wallet - accICO.
Contracts special metods review
Two-step-change-ownership pattern is implemented, where the ownership needs to be claimed.
Current owner (with its key) send 0 ETH transaction with transferOwnership(newOwner), where newOwner is address of new owner.
After that new owner must send 0 ETH transaction with claimOwnership(). The ownership will be finally changed when this second transaction be confirmed.
Contract owner can claim any tokens that transfered to this contract address.
Unit tests for this smart contracts have designed with Truffle framework. Please, use original recommendation for Truffle/node install. All tests are in the
- for start all truffle tests in the root test folder please clone repository in your folder and then:
cd ./smartcontracts truffle develop truffle test
There are 2 separate addresses used for these smart contract. Please Prepare 2 Ethereum accounts:
- Owner - deploy smart contracts from this address and use for call onlyOwner methods (see source code);
- accICO - all tokens for sale; Please, keep secret keys very safely !!!
- Deploy Cryptocoin smart contract from Owner account. Specify the appropriate adress(accICO) and totalSupply token amount in the constructor parameters.
Ok - now your smart contract (and coin) ready for long happy life. Good Luck!!!
Used Rinkeby accounts:
Owner 0DBBE8E4AE425A6D2687F1A7E3BA17BC98C673636790F1B8AD91193C05875EF1 0xC5fdf4076b8F3A5357c5E395ab970B5B54098Fef accICO ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f 0xf17f52151EbEF6C7334FAD080c5704D77216b732