Skip to content

Update examples for julc 0.1.0-pre15 - #2

Open
satran004 wants to merge 3 commits into
mainfrom
fix/julc_pre13_changes
Open

Update examples for julc 0.1.0-pre15#2
satran004 wants to merge 3 commits into
mainfrom
fix/julc_pre13_changes

Conversation

@satran004

Copy link
Copy Markdown
Member

Brings the examples up to date with julc 0.1.0-pre15 and tightens the one-shot minting policy.

Build

  • Bump julcVersion to 0.1.0-pre15 and apply the com.bloxbean.cardano.julc Gradle plugin.
  • Comment out the julc-vm-truffle and julc-vm-scalus test dependencies.

One-shot minting

OneShotMintPolicy previously 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 via ValuesLib.uniqueTokenName(seedRef) and requires the mint field to contain exactly that one asset at quantity 1.

OneShotMintDemo mints the matching name off-chain using blake2b_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.append chains with variadic Builtins.concat in UVerifyV1.certificateToByteArray and UVerifyFeePot.buildExpectedMessage.

Demos

Drop ignoreScriptCostEvaluationError(true) from the auction and bet demos now that cost evaluation succeeds. MintingDemo has its withTxEvaluator call commented out.

Docs

Document toPlutusData(), Builtins.concat, ValuesLib.refBytes and ValuesLib.uniqueTokenName in the best-practices guide, and replace the stale integerToByteString JVM-vs-UPLC divergence note with the current bounds contract (JVM and UPLC now share the same behaviour).

Verification

./gradlew compileJava compileTestJava passes. Tests were not run as part of preparing this PR.

🤖 Generated with Claude Code

satran004 and others added 3 commits May 29, 2026 13:09
- 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>
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.

1 participant