A smart contract that have people to racing their money against other and the winner can engrave their name to the blockchain.
-
unix-like system
-
node or nvm (https://github.com/nvm-sh/nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
source ~/.bashrc
nvm install --lts
- truffle (https://github.com/trufflesuite/truffle)
npm install -g truffle
You may need to run this if on MacOS or Linux
sudo npm install -g truffle
For WSL that not use subsystem path and execute without root permission.
sudo chown <username>:<username> .
- ganache (https://github.com/trufflesuite/ganache)
npm install ganache --global
- Start ganache
ganache -a 100
- Clone this project
git clone https://github.com/nedondev/EasyMoneyRacing
cd EasyMoneyRacing
truffle test
truffle migrate
truffle console
- Get deployed contract.
const contract = await EasyMoneyRacing.at('<contract-address>');
- Use deployed contract.
contract.<method-name>()
Example:
contract.getTotalMoney()