Hot answers tagged


You can achieve this by updating the dictionary units located in the eth_utils/ 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\ It contains only the units dict of decimal places. You can add the decimals you require like so.. from eth_utils.units import units, ...


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 ...


Create a 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 to .gitignore file


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