Hot answers tagged

1

Web3js contracts use the ABI to know how to make calls to contract functions, it needs parameters and types to properly encode it. If you try to call a function that is not present in the ABI it will complain about missing function. You have two possible solutions: Use a contract with the correct ABI but use proxy address instead. Use sendTransaction and ...


1

Answering the question in the title (How to test a custom fallback function using web3.js?): await web3.eth.sendTransaction({ from: accounts[1], to: proxy.address, value: web3.utils.toWei('0.02', 'ether') }); I'm assuming that accounts[1] is unlocked on the node that you're connected to.


Only top voted, non community-wiki answers of a minimum length are eligible