1

How would I query using their API? Below doesn't seem to want to work, I'm querying for canMint() where it takes in address[] and returns a Boolean.

https://api-rinkeby.etherscan.io/api?module=proxy&action=eth_call&to=0xc25B19Fa4a0bb8Ad16B2E164DfBb344012F29A50&data=0xbeb9716d0000000000000000000000000000000000000000000000000000000000000035Fb85AF34adbdD00850392dfE3251283bAf1b75

All I'm getting is the execution reverted error. Any pointers?

1 Answer 1

1

You cannot query the method of the smart contract actually. you should query the events/logs of the smart contracts

If you are trying to query the canMint() function executions. you need to query the events that were emitted while executing the canMint() method.

3
  • Ok, thanks for the reply, I've got one more question (bear with, I'm coming from tezos, new to eth smart contracts). If I were to query api-rinkeby.etherscan.io/…, how could I decode the response? It's hashed out, and I'm confused on how I could get the actual values. Thanks.
    – pixel
    Commented Aug 24, 2021 at 4:22
  • this response seems like a tranasaction data . you can try decoding it with abi-decoder- github.com/ConsenSys/abi-decoder Commented Aug 24, 2021 at 4:42
  • Got it, thanks for the guidance!
    – pixel
    Commented Aug 24, 2021 at 4:53

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.