ethers.js
ethers.js copied to clipboard
Expose encodeFunctionData and decodeFunctionResult as properties on the contract method
Describe the Feature
I have some scenarios were I need to call encodeFunctionData() and decodeFunctionResult() and whilst I can do this via the Interface, it would be nice to expose these as properties on the method just like there is;
testContract.testMethod.staticCall(...)
testContract.testMethod.estimateGas(...)
it would be nice to have these;
testContract.testMethod.encodeFunctionData(...)
testContract.testMethod.decodeFunctionResult(...)
The code pretty much exists already in the buildWrappedMethod
function.
Code Example
No response