-
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
Implement concurrent minting/burning #55
Conversation
Using inheritance to change which constructor is used does not work. Instead, we are using a `static` field, which can be set without changing the class.
b05c744
to
8ea2b7a
Compare
529cf28
to
533241d
Compare
Some tests that assert that something that should not work does indeed not work will fail when we disable proofs in the tests. So we should skip them if `proofsEnabled` is false.
cb23a26
to
8542c20
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.
nice
it("should not mint too many B tokens using the vanilla admin contract", { | ||
skip: !proofsEnabled, | ||
}, async () => { |
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 this is skipped when proofs are disabled?
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.
Good question! I observed that this test fails when proofs are disabled.
My suspicion is that when proofs are disabled, the verification key of the admin contract is never checked, so you can get away with switching the admin contract. And this test tests that that is prevented (which only works when the proofs are actually constructed and checked).
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.
Right, that makes sense
In order to do this, we remove the total supply (and the check that the circulating supply does not exceed it) from the main contract, and use actions/reducers to update the circulating supply.
Enforcing a limit on the circulating supply will then be the responsibility of the admin contract.