-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: createX #11
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
Feat: createX #11
Conversation
…move obsolete files
… and CreateX factory
…factory addresses
…act instantiation
…ommands and RPC URL handling
Le-Caignec
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created a new library named RLCOFTDeployer to factorize the code shared between the deployment functions of the RLCOFT and RLCOFTMock contracts, as they perform very similar operations.
| - name: Run Forge unit tests | ||
| run: make unit-test | ||
|
|
||
| - name: Run Forge e2e tests | ||
| run: make e2e-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split tests for better issues isolation
test/units/mocks/RLCOFTMock.sol
Outdated
| address createXFactory, | ||
| bytes32 salt | ||
| ) public returns (address) { | ||
| return RLCOFTDeployer.deployRLCOFT( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make the oposit : use Deploy.deploy insted of creating a new library only for this function ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The library is used in two places: once in the script/RLCOFT and once here.
Its purpose is to mutualize the deployment logic of both OftMock and OFT contracts, which share the same constructor and initialize parameters.
By centralizing this logic, the library helps factorize the deployment code and avoid duplication.
Note: An abstract contract could serve the same purpose. However, I chose to use a library for this implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this answer your question ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I propose a new architcture in comment in the library, where we could use the lib in 3 places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah i fixe it
…ter and RLCOFT scripts
gfournierPro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great thanks a lot
No description provided.