6

Following these details on the values that make part of the calldata that goes into an L2 message in Arbitrum:

enter image description here

https://developer.offchainlabs.com/docs/arbos_formats#l2-messages

How do you convert/cast an address to an uint256?

Thanks!

1 Answer 1

9

Solution:

uint256(uint160(xAddr))

2
  • Maybe you can suggest a solution for converting vise versa using Web3.js? Feb 10 at 9:24
  • No idea :/ @BeerBrother
    – dNyrM
    Feb 10 at 13:54

Your Answer

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

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