web3.js has the ability to call a transaction and get return data without sending a transaction:

web3.eth.call(callObject [, defaultBlock] [, callback])

ethersjs apparently does not have this ability. These docs state:

These methods cannot return their result to the caller.

Using etherjs, how can I get the return data of a transaction without making the actual transaction?

1 Answer 1


It is possible to do this with an ethersjs read-only transaction.

prototype.call(transaction) => Promise<hex>

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.