- Node.js 12.15.0 (
nvm use
) - Install dependencies using
yarn
- Install Ganache (fake Ethereum), https://www.trufflesuite.com/ganache
- Run
yarn run truffle migrate
- Check out HelloWorld example & tests
- Run tests using
yarn run truffle test
- Start hacking!
To deploy to public Rinkeby test network, run yarn run truffle migrate --network rinkeby
Use https://github.com/ethereum/web3.js/ library
Connection to Blockchain via the public infura API:
const Web3 = require("web3")
const web3 = new Web3(new Web3.providers.HttpProvider("https://mainnet.infura.io/v3/YOUR_PROJECT_ID"))
Check Web3.js API to interact with contract on chain: https://web3js.readthedocs.io/en/v1.2.6/