-
Notifications
You must be signed in to change notification settings - Fork 145
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
Instantiate DAO with existing staking contract #189
Conversation
Validate the existing staking contract is a staking contract
5c84989
to
0dba0a6
Compare
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.
This is great, as always. :) Thanks for the tests.
One thought: right now we're doing a check to make sure we're not using an existing staking contract with a new cw20 in reply
. We could avoid needing to do that by making that configuration an invalid instantiate message.
For example, we could combine the cw20 and staking information into an enum which enumerates the valid configurations. Invalid messages would then fail to deserialize and mean we wouldn't have to make those checks.
I'm happy with this current setup, but if you're feeling fancy that would be nice.
Just to clarify what you mean by this. Would this mean replacing the two enums we currently have in the instantiate method with one with three valid possibilities which are:
|
This is what I was imagining. Happy to just merge this as is though. Having it written out seems like the size of that enum might make it a little cumbersome. I can think more about this with the new contracts. :) |
I agree the enum names might become unwieldly. Happy for other inputs on this however. |
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
We now have an added enum in instantiate to create a DAO with an existing staking contract.
Feedback appreciated.