Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR aims to update the migration setup by moving tests to Foundry, introducing deployment scripts, and separating utility functions and configuration. Key changes include:
- Updating Merkle tree functions to remove unused parameters.
- Integrating configuration for deployment and event fetching (including a START_BLOCK parameter).
- Updating test utilities and simulation scripts to reflect the new structure and deployment addresses.
Reviewed Changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| script/utils/merkle.js | Removed the unused “id” parameter from hashing, proof, and verify functions. |
| script/utils/getRoot.js | Updated to load claims using a configurable path. |
| script/utils/fetchAndStoreEvents.js | Replaced hardcoded values with config values and introduced event aggregation. |
| script/utils/config.js | Added config options for locker and output paths. |
| script/testUtils/*.js | Fixed import paths to reference updated utils directory. |
| script/testSimulations/*.js | Updated simulation scripts with additional lock amounts and revised approval amounts. |
| script/deploy/*.s.sol | Deployment scripts for MigrationRelease and MigrationLocker using a transparent proxy. |
| README.md | Updated instructions and release ratio details to match the new setup. |
Comments suppressed due to low confidence (2)
script/testUtils/getPoof.js:1
- The file name 'getPoof.js' appears to be a typo. Consider renaming it to 'getProof.js' for consistency with the function it imports.
const whitelist = require("../../output/claims.json");
README.md:75
- The documented migration ratios in this section appear inconsistent. Please verify that the 'Total migration ratio: 1:15' (locked:received) is correct and aligns with the intended distribution.
**Instant Release**: 50% of the locked amount is immediately available
|
|
||
| const received = after - before; | ||
| const expected = BigInt(amount) * 10n; | ||
| const expected = (BigInt(amount) * 75n) / 10n; |
There was a problem hiding this comment.
Review the vested release expected amount calculation to ensure it aligns with the intended release ratio described in the updated release model.
Suggested change
| const expected = (BigInt(amount) * 75n) / 10n; | |
| const VESTED_RELEASE_RATIO_NUMERATOR = 75n; // Replace with actual numerator from updated release model | |
| const VESTED_RELEASE_RATIO_DENOMINATOR = 10n; // Replace with actual denominator from updated release model | |
| const expected = (BigInt(amount) * VESTED_RELEASE_RATIO_NUMERATOR) / VESTED_RELEASE_RATIO_DENOMINATOR; |
script/utils/config.js
Outdated
| ABI: [ | ||
| "event Locked(address caller, address recipient, uint256 amount)" | ||
| ], | ||
| START_BLOCK: 0, // Block number where to start fetching events from ( DON't MARK THIS AS ZERO) |
There was a problem hiding this comment.
[nitpick] Consider correcting the comment to 'DON'T MARK THIS AS ZERO' to improve clarity.
Suggested change
| START_BLOCK: 0, // Block number where to start fetching events from ( DON't MARK THIS AS ZERO) | |
| START_BLOCK: 0, // Block number where to start fetching events from (DON'T MARK THIS AS ZERO) |
…et-up 17 deployment scripts and set up
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
List of changes: