Skip to content

Expose encodeFunctionData and decodeFunctionResult as properties on the contract method #4749

Open
@cosullivan

Description

@cosullivan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions