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

EVM revert when calling CeloDistributionSchedule methods #11175

Open
shazarre opened this issue Jul 26, 2024 · 1 comment
Open

EVM revert when calling CeloDistributionSchedule methods #11175

shazarre opened this issue Jul 26, 2024 · 1 comment

Comments

@shazarre
Copy link
Contributor

Current Behavior

On the latest anvil devchain canary version calling getDistributableAmount and getTargetCeloDistribution on CeloDistributionSchedule reverts.

Steps to reproduce

Assuming that anvil is running on port 8545 and with l2-devchain.json state loaded.

$ cast call \
"0x000000000000000000000000000000000000ce10" \
"getAddressForStringOrDie(string calldata identifier)(address)" \
"CeloDistributionSchedule"

0xA16cF67AFa80BB9Ce7a325597F80057c6B290fD4
$ cast call "0xA16cF67AFa80BB9Ce7a325597F80057c6B290fD4" "getDistributableAmount()(uint256)"

Error:
server returned an error response: error code 3: execution reverted: panic: arithmetic underflow or overflow (0x11)
$ cast call "0xA16cF67AFa80BB9Ce7a325597F80057c6B290fD4" "getTargetCeloDistribution()(uint256,uint256,uint256)"

Error:
server returned an error response: error code 3: execution reverted: panic: arithmetic underflow or overflow (0x11)

That results in a ContractKit's CeloDistributionScheduleWrapper test failing.

Expected Behavior

Calling the methods should not revert.

@arthurgousset
Copy link
Contributor

arthurgousset commented Jul 30, 2024

A fix for this is included with a description in:

For context:

Released a test version of the devchain to NPM using the protocol-devchain-anvil workflow trigger (see screenshot):

image

I suggest this PR gets merged if and when @shazarre confirmed the bug is fixed on his side using the test version.

Source: #11176 (review)

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

2 participants