Skip to content

Cannot execute ethers.js contract method without specifying optional transaction overrides argument #322

@rjkz808

Description

@rjkz808

Description

When I try to run EthereumGatewayV2.withdrawAsync method without providing overrides argument (which is marked as optional in loom-js code) it throws this error:

Error: incorrect number of arguments
    at Object.withdrawETH (node_modules/loom-js/node_modules/ethers/contract.js:130:19)
    at EthereumGatewayV2.<anonymous> (node_modules/loom-js/dist/ethereum-gateways.js:78:66)
    at step (node_modules/tslib/tslib.js:136:27)
    at Object.next (node_modules/tslib/tslib.js:117:57)
    at fulfilled (node_modules/tslib/tslib.js:107:62)
    at process._tickCallback (internal/process/next_tick.js:68:7)

When I pass an overrides object with a gasLimit property specified, everything works fine. At least, this argument have to be marked as required in withdrawAsync function signature.

Versions

  • ethers: 4.0.38
  • loom-js: 1.70.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions