pip install web3
- All of the smart contract functions are listed under the
contract.functions
namespace within the assigned Web3 contract. For example, we can callcontract.functions.myFunction()
if the contract implementsmyFunction()
.
# For ERC20 token
print(contract.functions.name().call())
# > OMG Token
- Error related to MS Visual C++ 14.0 or greater is missing:
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
- solution: install libs using pip: `conda install libpython m2w64-toolchain -c msys2` as __administrator__ in command prompt.