See details of HEO platform here: https://heo.finance
- Read the white paper
- Read the Lite paper (one-pager version of the White Paper)
- Read explanation of Token Economics
Install Truffle https://www.trufflesuite.com/truffle
Install Ganache https://www.trufflesuite.com/ganache
Add .secret file to root folder of the project with a mnemonic to run migrations with truffle and to use truffle console.
In order to run heo-web application with local blockchain, you will need to deploy contracts to local Ganache. You can do that using Truffle migrations. First, create a Ganache workspace and point it to truffle-config.js file in this repo. Then, run migrations 1 through 6
truffle migrate -f 1 --to 6 --network ganache
the above command will deploy all HEO contracts to Ganache. The 6th migration will also deploy a contract
for manually distributing HEO tokens, which can be used to create some data to play with.
HEO platform needs a ERC20 stablecoin. "contracts" folder has StableCoinForTests.sol contract that can be used
as such stablecoin for testing. You can run initDemoData.js to deploy that stable coin and distribute some of it
to your local accounts on Ganache. Make sure to edit initDemoData.js and change tese lines to match
account addresses on your local Ganache.
await iTestCoin.transfer("0x748351f954Af3C95a41b88ba7563453Ab98eA085", web3.utils.toWei("10000"));
await iTestCoin.transfer("0x02C364e8048C60c980d4C1abb9918f66D716d603", web3.utils.toWei("10000"));
await iTestCoin.transfer("0x6CFe06BCC19444b90fe5f8729eb619c51Fcb7e3A", web3.utils.toWei("10000"));
truffle exec initDemoData.js --network ganache
This script generates files for the web app
truffle exec buildForWeb.js --network ganache
the output of this build script consists of several JS files that contain contract ABIs and deployed addresses.
Some output files contain only ABIs, because they do not need to be deployed for the application.
This script puts these JS files into build/web/. In order to get modified contracts to the web application,
you need to copy the *.js files from build/web to the heo-web application.
All tests are written in JavaScript and assume you have Truffle CLI installed. Read Writing Tests in JavaScript on Truffle docs site. To run the tests, launch Ganache Quickstart Ethereum, and use Truffle CLI, like so
truffle test --network ganache