Open yashh opened 1 year ago
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.
ex_abi
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>>}
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.