Hot answers tagged

2

You can achieve this by updating the dictionary units located in the eth_utils/units.py file in the eth_utils that is a dependency of the web3 codebase. For me it lives here C:\Python38\Lib\site-packages\eth_utils\units.py It contains only the units dict of decimal places. You can add the decimals you require like so.. from eth_utils.units import units, ...


1

The issue is that you're using .call() method which is meant to be used when you only want to read the blockchain. If you want to write on the blockchain ( and usually transfer method means you want to transfer particular amount from one wallet to another which is basically writing on the blockchain ) then you have to use the .transact() method. In your case ...


1

Create a config.py in the same directory with the file you want to import config, put to this file private="xxxxx" In the file you want to import import config ... print(config.private) // xxxxx And add config.py to .gitignore file


1

I think you need to specify the router address and not the factory address to execute a trade....


Only top voted, non community-wiki answers of a minimum length are eligible