Repository navigation
Cip112 one step mint: add new tests and refactored existing ones - #65
Merged
Merged
Conversation
0xNeshi
requested review from
ericnordelo,
igingu and
pepebndc
as code owners
October 21, 2026 13:59
0xNeshi
force-pushed
the
cip112-one-step-mint
branch
from
October 21, 2026 14:02
9ff73de to
8ac6bb9
Compare
…fter checking the actors
- **New `mintMustFail` helper** in [Guard.daml](test/token-cip112-v1-test/daml/OpenZeppelin/Token/Cip112/V1/Test/Guard.daml), next to `actorsMismatch`. It takes the scenario, expected message, actors and transfer, and submits the mint with the rules disclosed. I also switched `testMintAuthorityAndBounds` to it, so its local `disclosed` and `refused` helpers are gone. The "Authorization failure" case still calls `mustFailWith` directly, because it submits as alice while naming the admin as the actor. - **`testMintRefusesSpecialReceiverAndInputs` and `testMintRefusesOutOfWindow`** now use `mintMustFail`. - **`testMintStepsFollowReceiverAccount`**: - It uses a local `disclosed` helper and `pendingCid` instead of the inline `case`. - It now checks alice's balance is `[3.0]` after the one-step mint to savings, and still `[3.0]` after the offer. - Each case has a comment, and I reworded the doc comment to match what the test checks. - **`testMintToProviderAccount`**: - Both bare `submitMustFail` calls now assert `actorsMismatch`: the one-step mint without the provider, and alice accepting alone. - The second accept now asserts `"NotActive"`, which is the error for an offer the first accept already consumed. - Both accepts go through one local `accept actors` helper. - The doc comment now says the provider sees both holdings.
This reverts commit 13ec2ab.
0xNeshi
force-pushed
the
cip112-one-step-mint-update
branch
from
October 21, 2026 14:02
18fb088 to
8cfd667
Compare
pepebndc
approved these changes
Oct 21, 2026
0xNeshi
added a commit
that referenced
this pull request
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates for #64