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

Added getTerminusAdminInfo to DropperFacet #294

Merged
merged 2 commits into from
May 4, 2023

Conversation

ShivaLaguna
Copy link
Contributor

Changes

  • Added getTerminusAdminInfo to DropperFacet
  • Updated DropperFacet.py
  • Added test to check getTerminusAdminInfo

How to test these changes?

cd cli
./test.sh enginecli/test_dropper.py

Related issues

Copy link
Collaborator

@zomglings zomglings left a 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.

@@ -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)
Copy link
Collaborator

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.

@@ -111,6 +111,11 @@ contract DropperFacet is
ds.TerminusAdminPoolID = terminusAdminPoolID;
}

function getTerminusAdminInfo() external view returns (address, uint) {
Copy link
Collaborator

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

Name should be adminTerminusInfo.

Copy link
Collaborator

@zomglings zomglings left a comment

Choose a reason for hiding this comment

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

lgtm

@zomglings zomglings merged commit 8706a6f into moonstream-to:main May 4, 2023
2 checks 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.

None yet

2 participants