-
Notifications
You must be signed in to change notification settings - Fork 10
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
Added getTerminusAdminInfo to DropperFacet #294
Added getTerminusAdminInfo to DropperFacet #294
Conversation
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.
@ShivaLaguna : This is a much needed addition. Thank you for making the PR.
I have left a couple of comments - minor changes in the code, but it will help to keep it consistent with the other contracts and tests.
cli/enginecli/test_dropper.py
Outdated
@@ -90,6 +90,10 @@ def setUpClass(cls) -> None: | |||
cls.mintable_terminus_pool_id, cls.dropper.address, {"from": accounts[0]} | |||
) | |||
|
|||
terminus_info_1, terminus_info_2 = cls.dropper.get_terminus_admin_info() | |||
DropperTestCase().assertEqual(cls.terminus.address, terminus_info_1) |
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.
@ShivaLaguna : Can you make a separate test for this? I don't like to put tests in the setup code.
contracts/Dropper/DropperFacet.sol
Outdated
@@ -111,6 +111,11 @@ contract DropperFacet is | |||
ds.TerminusAdminPoolID = terminusAdminPoolID; | |||
} | |||
|
|||
function getTerminusAdminInfo() external view returns (address, uint) { |
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.
@ShivaLaguna : Can you rename this function to be consistent with our other contracts? See for example Garden of Forking Paths: https://github.com/bugout-dev/engine/blob/main/contracts/mechanics/garden-of-forking-paths/GardenOfForkingPaths.sol#L204
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.
Name should be adminTerminusInfo
.
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.
lgtm
Changes
getTerminusAdminInfo
to DropperFacetDropperFacet.py
getTerminusAdminInfo
How to test these changes?
cd cli
./test.sh enginecli/test_dropper.py
Related issues