Skip to content

Fix the getBalance function and its uses in examples #643

Description

@chmanie

The getBalance method is too confusing.

If it's called without the second argument e.g. for Colony 0x8e389bf45f926dDDB2BE3636290de42B68aefd51, it will throw an error:

Found an error: missing revert data in call exception; Transaction reverted without a reason string [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (data="0x", transaction={"to":"0xCCcccdCC0CcF6C708D860e19353c5f9a49ACccCc","data":"0x70a082310000000000000000000000008e389bf45f926dddb2be3636290de42b68aefd51","accessList":null}, error={"reason":"processing response error","code":"SERVER_ERROR","body":"{"jsonrpc":"2.0","id":64,"error":{"code":-32000,"message":"execution reverted"}}\n","error":{"code":-32000},"requestBody":"{"method":"eth_call","params":[{"to":"0xcccccdcc0ccf6c708d860e19353c5f9a49accccc","data":"0x70a082310000000000000000000000008e389bf45f926dddb2be3636290de42b68aefd51"},"latest"],"id":64,"jsonrpc":"2.0"}","requestMethod":"POST","url":"[https://app.colony.io/public-rpc/"%7D](https://app.colony.io/public-rpc/%22%7D), code=CALL_EXCEPTION, version=providers/5.7.2)

Adjust its uses in examples

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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