Skip to content

Instantly share code, notes, and snippets.

@tzumby
Last active July 11, 2018 16:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
{:ok, address } =
"0x456196dfa8eb4534669a01c5933c3bba2ba0d018"
|> String.slice(2..-1)
|> Base.decode16(case: :mixed)
data = ABI.encode("balanceOf(address)", [address])
|> Base.encode16(case: :lower)
# 70a08231000000000000000000000000456196dfa8eb4534669a01c5933c3bba2ba0d018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment