Units and globally-available variables in Solidity are described here.

Where can I find the corresponding entities inside Python's web3 package?

Specifically, I am interested in Solidity's time units (seconds, minutes, hours, etc).

I searched inside the Web3.py guide, but I have not been able to find them.

Thank you.


I don't think web.py has any convenience functions for them, but Python has timedelta:

>>> timedelta(days=1).total_seconds()

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.