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

chore: initial rewards distribution cli scaffolding #50

Merged
merged 7 commits into from
May 31, 2024

Conversation

woodenfurniture
Copy link
Member

@woodenfurniture woodenfurniture commented May 27, 2024

Initial scaffolding of rewards distribution script. Runs rewards calculation using a typescript implementation of the accounting logic and compares it to the on-chain implementation, and throws an error if the results differ.

Test with

ARBITRUM_JSON_RPC_URL="https://arbitrum-mainnet.infura.io/v3/<your infura api key>" ts-node scripts/rewards-distribution/index.ts

For reference, the contract is deployed on-chain here
https://arbiscan.io/address/0xd612B64A134f3D4830542B7463CE8ca8a29D7268

@woodenfurniture woodenfurniture force-pushed the simulation-script-2 branch 2 times, most recently from df7ae17 to 3440ec3 Compare May 29, 2024 07:43
@woodenfurniture woodenfurniture changed the title wip: rewards distribution cli chore: initial rewards distribution cli scaffolding May 30, 2024
@woodenfurniture woodenfurniture marked this pull request as ready for review May 30, 2024 01:19
Copy link
Member

@0xApotheosis 0xApotheosis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scaffolding works as expected:

Screenshot 2024-05-30 at 11 59 21 AM

Caveat that I haven't checked the chain-related output, only sanity checked the code itself, and that the on-chain to computed value validation logic seems sane.

scripts/rewards-distribution/helpers.ts Show resolved Hide resolved
scripts/rewards-distribution/index.ts Show resolved Hide resolved
@woodenfurniture woodenfurniture merged commit 1a1fa9c into main May 31, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants