-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not possible to call methods on existing contract #2499
Comments
Could you add the ABI and the bytecode of this contract for testing it? |
ABI Bytecode EDIT: May be usefull
|
Description
It is not possible to call function on already deployed contracts.
Expected behavior
Creating a contract instance with jsonInterface and address I should be able to call the function on that contract
Actual behavior
Contract instance isn't binded to the contract at that address. Instead if I deploy the contract in the same execution just before calling methods, it works perfectly.
Steps to reproduce the behavior
Error Logs
Error: Invalid bytes string given: 0x
at AbiCoder.decodeParameters (./node_modules/web3-eth-abi/dist/web3-eth-abi.cjs.js:64:15)
at AbiCoder.decodeParameter (.node_modules/web3-eth-abi/dist/web3-eth-abi.cjs.js:55:19)
at CallContractMethod.afterExecution (./node_modules/web3-eth-contract/dist/web3-eth-contract.cjs.js:743:28)
at CallContractMethod._callee$ (./node_modules/web3-core-method/dist/web3-core-method.cjs.js:354:35)
at tryCatch (./node_modules/regenerator-runtime/runtime.js:62:40)
at Generator.invoke [as _invoke] (./node_modules/regenerator-runtime/runtime.js:288:22)
at Generator.prototype.(anonymous function) [as next] (./node_modules/regenerator-runtime/runtime.js:114:21)
at asyncGeneratorStep (./node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (./node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
Versions
The text was updated successfully, but these errors were encountered: