Skip to content

Error from ethers.utils.AbiCoder() #1751

Answered by zemse
emclab asked this question in Q&A
Jul 5, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

variable.map is not a function, sounds like somewhere array was expected but it got a non-array value. The decode docs seem to be asking to pass in types while seems you're pasing a stirng input.type. Can you try passing in an array or make it [input.type]

(I'm not very familiar with using AbiCoder directly) It seems you want to decode getLogs, Interface sohuld help you:

const iface = new ethers.utils.Interface(abi);
const parsed = iface.parseLog(log)

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@emclab
Comment options

@zemse
Comment options

zemse Jul 6, 2021
Collaborator

Answer selected by emclab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants