RtjShreyD / Hello-Eth

Basic solidity contract, deployed using truffle and called using Python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  1. sudo npm i -g truffle
  2. truffle init --> creates basic project structure
  3. touch contracts/HelloWorld.sol --> new sol file for contract
  4. write contract.
  5. truffle compile --> to compile the contract
  6. truffle develop --> to open truffle shell
  7. migrate --> run inside shell, creates the migrations for contract

  8. touch app.py --> App to interact with contract.
  9. Inside a virtual env, pip install web3.
  10. Make sure the contract address in app.py is same as response from migrate command.
  11. 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

About

Basic solidity contract, deployed using truffle and called using Python


Languages

Language:JavaScript 75.3%Language:Python 15.8%Language:Solidity 8.9%