- sudo npm i -g truffle
- truffle init --> creates basic project structure
- touch contracts/HelloWorld.sol --> new sol file for contract
- write contract.
- truffle compile --> to compile the contract
- truffle develop --> to open truffle shell
-
migrate --> run inside shell, creates the migrations for contract
- touch app.py --> App to interact with contract.
- Inside a virtual env, pip install web3.
- Make sure the contract address in app.py is same as response from migrate command.
- python app.py ---> Runs contract prints hello world.
credits : https://dev.to/gcrsaldanha/deploy-a-smart-contract-on-ethereum-with-python-truffle-and-web3py-5on