Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix function calls using proper decode fn #153

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

yashh
Copy link

@yashh yashh commented Nov 9, 2022

ex_abi library converts function signature back to ABI function selector to decode the output. Since we already have the abi we can call the decode function directly.

iex(7)> ExW3.Contract.call(:Contract, :symbol)
{:ok, "BAYC"}
iex(8)> ExW3.Contract.call(:Contract, :tokenURI, [1])
{:ok, "ipfs://QmeSjSinHpPnmXmspMjwiXyN6zS4E9zccariGR3jxcaWtq/1"}
iex(9)> ExW3.Contract.call(:Contract, :getApproved, [1])       
{:ok, <<0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0>>}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant