Update examples for julc 0.1.0-pre15 - #2
Open
satran004 wants to merge 3 commits into
Open
Conversation
- Bump julc to 0.1.0-pre15 and apply the com.bloxbean.cardano.julc Gradle plugin - OneShotMintPolicy: derive the canonical token name via ValuesLib.uniqueTokenName(seedRef) and require the mint to contain exactly that one token at quantity 1, not just the seed UTxO - OneShotMintDemo: mint the matching canonical name off-chain using blake2b_256(ValuesLib.refBytes(seedRef)) - UVerifyV1 / UVerifyFeePot: replace nested ByteStringLib.append chains with variadic Builtins.concat - Auction/Bet demos: drop ignoreScriptCostEvaluationError now that cost evaluation succeeds - Tests: cover canonical token name and wrong-token-name rejection - Docs: document toPlutusData(), Builtins.concat, refBytes and uniqueTokenName; replace the stale integerToByteString JVM/UPLC divergence note with the current bounds contract Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Brings the examples up to date with julc
0.1.0-pre15and tightens the one-shot minting policy.Build
julcVersionto0.1.0-pre15and apply thecom.bloxbean.cardano.julcGradle plugin.julc-vm-truffleandjulc-vm-scalustest dependencies.One-shot minting
OneShotMintPolicypreviously only checked that the seed UTxO was consumed, which let a transaction mint any token name — and any quantity — under the policy. It now also derives the canonical token name viaValuesLib.uniqueTokenName(seedRef)and requires the mint field to contain exactly that one asset at quantity 1.OneShotMintDemomints the matching name off-chain usingblake2b_256(ValuesLib.refBytes(seedRef)), so the two sides agree end to end.Tests cover the canonical name and add a wrong-token-name rejection case.
UVerify
Replace nested
ByteStringLib.appendchains with variadicBuiltins.concatinUVerifyV1.certificateToByteArrayandUVerifyFeePot.buildExpectedMessage.Demos
Drop
ignoreScriptCostEvaluationError(true)from the auction and bet demos now that cost evaluation succeeds.MintingDemohas itswithTxEvaluatorcall commented out.Docs
Document
toPlutusData(),Builtins.concat,ValuesLib.refBytesandValuesLib.uniqueTokenNamein the best-practices guide, and replace the staleintegerToByteStringJVM-vs-UPLC divergence note with the current bounds contract (JVM and UPLC now share the same behaviour).Verification
./gradlew compileJava compileTestJavapasses. Tests were not run as part of preparing this PR.🤖 Generated with Claude Code