SmartContract Development with Node.js, Solidity, Truffle : - mkdir zero2hero-solidity-lesson1 && cd zero2hero-solidity-lesson1 - npm init -y # creates Node.js project - truffle init # creates Truffle project - npm install --save-dev truffle - npx truffle compile - npm install --save-dev ganache-cli - npx ganache-cli --deterministic - npx truffle migrate --network development # --reset if needed - npx truffle console --network development - const lesson = await Lesson.deployed(); - await lesson.setLesson("Solidity") - await lesson.getLesson() - (await lesson.getLesson()).toString() How to use OpenZeppelin Contracts - npm install --save-dev @openzeppelin/contracts Unit Tests - Make sure you are running a local blockchain(Ganache) - npm install --save-dev chai - npx truffle test Resources: Solidity Installation : https://docs.soliditylang.org/en/v0.8.9/installing-solidity.html Node.js Installation : https://nodejs.org/en/download/ Truffle Docs: https://trufflesuite.com/docs/ OpenZeppelin Docs: https://docs.openzeppelin.com/ Ganacle Docs: https://trufflesuite.com/docs/ganache/ Unit Test - Chai : https://www.chaijs.com/ Unit Test - Moloch Testing Guide: https://github.com/MolochVentures/moloch/tree/4e786db8a4aa3158287e0935dcbc7b1e43416e38/test#moloch-testing-guide ———— zero2hero WhatsApp: +447470914266 Meetup: zero2hero-training YouTube: zero2hero.training Twitter: zero2hero_uk Facebook: zero2hero.training Instagram: zero2hero.training Website: https://linktr.ee/zero2hero.training Email: info@zero2hero.training
SmartContract Development with Node.js, Solidity, Truffle : - mkdir zero2hero-solidity-lesson1 && cd zero2hero-solidity-lesson1 - npm init -y # creates Node.js project - truffle init # creates Truffle project - npm install --save-dev truffle - npx truffle compile - npm install --save-dev ganache-cli - npx ganache-cli --deterministic - npx truffle migrate --network development # --reset if needed - npx truffle console --network development - const lesson = await Lesson.deployed(); - await lesson.setLesson("Solidity") - await lesson.getLesson() - (await lesson.getLesson()).toString() How to use OpenZeppelin Contracts - npm install --save-dev @openzeppelin/contracts Unit Tests - Make sure you are running a local blockchain(Ganache) - npm install --save-dev chai - npx truffle test Resources: Solidity Installation : https://docs.soliditylang.org/en/v0.8.9/installing-solidity.html Node.js Installation : https://nodejs.org/en/download/ Truffle Docs: https://trufflesuite.com/docs/ OpenZeppelin Docs: https://docs.openzeppelin.com/ Ganacle Docs: https://trufflesuite.com/docs/ganache/ Unit Test - Chai : https://www.chaijs.com/ Unit Test - Moloch Testing Guide: https://github.com/MolochVentures/moloch/tree/4e786db8a4aa3158287e0935dcbc7b1e43416e38/test#moloch-testing-guide ———— zero2hero WhatsApp: +447470914266 Meetup: zero2hero-training YouTube: zero2hero.training Twitter: zero2hero_uk Facebook: zero2hero.training Instagram: zero2hero.training Website: https://linktr.ee/zero2hero.training Email: info@zero2hero.training