I want to encode a call for mint() payable
with a msg.value
of 8 ETH.
My code:
web3.eth.abi.encodeFunctionCall({
type: 'function',
name: 'mint',
payable: true,
value: web3.utils.toWei("8", "ether")
}, [])
I get TypeError: Cannot read property 'forEach' of undefined
Help?