Decentralised saving Cryptocurrency
To run tests you need to install the following software:
Open the terminal and run the following commands:
$git clone https://github.com/PeculiumPCL/Peculium.git
$ cd Peculium
$ npm install
$ testrpc
NOTE: All tests must be run separately as specified.
Open the terminal and run the following commands: To deploy smart contracts to live network do the following steps:
- Go to the smart contract folder and run truffle console:
$ cd Peculium
$ truffle console
- Inside truffle console, invoke "compile" command to deploy contracts:
$ truffle(development)> compile
$ truffle(development)> migrate
$ truffle(development)>Peculium.deployed().then(function(instance){PCL=instance})
$ truffle(development)> PCL.owner()
result:'0x66693d57ccc352204f3f8579e3fac774be08884b'
$ truffle(development)> PCL.balanceOf('0x66693d57ccc352204f3f8579e3fac774be08884b')
- Go to contract folder
- solc --bin "name_of_the_contract.sol"
- copy Bytecode from terminal
- Paste Bytecode on the ethereum wallet with network Ropsten and send the contract creation transaction (you need ropsten ether)
- wait until the contract is added on the blockchain
- Communicate with the contract with API / JSON.