Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the getBalance function and its uses in examples #643

Open
chmanie opened this issue Jan 30, 2025 · 0 comments
Open

Fix the getBalance function and its uses in examples #643

chmanie opened this issue Jan 30, 2025 · 0 comments

Comments

@chmanie
Copy link
Member

chmanie commented Jan 30, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant