0

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.

1 Answer 1

1

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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