Skip to content

Multiple calls to the same function #8

@martriay

Description

@martriay

Today etherplex supports batching multiple calls to the same contract and it constructs a return object of the form result[call.caller.__name][call.fd.name] = result. The problem with this is that it writes over previous calls to the same function.

Example code to reproduce the issue:

      const values = await batch(
        provider,
        etherplexDaiContract
          .balanceOf(userAddresses[0])
          .balanceOf(userAddresses[1])
          .balanceOf(userAddresses[2])
      )

Would result in a single element array

{
    "Dai": {
        balanceOf: [ {_hex: "0x00", _ethersType: "BigNumber"} ]
        balanceOf(address): ...
    }
}

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