Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 14, 2025

The auction validator examples in doc/docusaurus/static/code/ were using outdated Plutus Core version 1.0.0 and had inconsistent API imports that caused build errors in the docusaurus-examples project. According to the Plutus documentation, PlutusV3 validators should use Plutus Core version 1.1.0.

Changes Made

AuctionMintingPolicy.hs:

  • Updated target version from 1.0.0 to 1.1.0
  • Changed imports from PlutusLedgerApi.V2 to PlutusLedgerApi.V3
  • Updated PlutusCore.Version import from plcVersion100 to plcVersion110
  • Updated liftCode call to use plcVersion110

AuctionValidator.hs:

  • Added explicit target-version=1.1.0 pragma (was missing before)
  • Fixed API import inconsistencies that were causing build errors:
    • Updated lovelaceValueOf and valueOf imports to use PlutusLedgerApi.V3
    • Kept toPubKeyHash import from PlutusLedgerApi.V1.Address (not re-exported in V3)
    • Kept contains import from PlutusLedgerApi.V1.Interval (not re-exported in V3)

Build Error Resolution

The original code was mixing V1 and V3 API imports inconsistently, which caused compilation failures in the docusaurus-examples project. The fix ensures that:

  • Value-related functions use the V3 API where available
  • Utility functions that aren't re-exported in V3 are imported from their original V1 modules
  • All imports are consistent with the PlutusV3 target version

These reference implementations now serve as proper modern templates that align with current Plutus development best practices and build successfully.

Fixes #7273.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copy link
Contributor Author

Copilot AI commented Aug 14, 2025

@Unisay 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs.

I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review.

@Copilot Copilot AI changed the title [WIP] Update validator programs in the plinth template repository Update auction validator examples to use Plutus Core version 1.1.0 Aug 14, 2025
@Copilot Copilot AI requested a review from Unisay August 14, 2025 13:16
Copilot finished work on behalf of Unisay August 14, 2025 13:16
@zeme-wana
Copy link
Collaborator

@copilot there are build errors in docusaurus-examples. You probably need to use API V3. Fix those

@Copilot Copilot AI changed the title Update auction validator examples to use Plutus Core version 1.1.0 Update auction validator examples to use Plutus Core version 1.1.0 and fix V3 API imports Aug 21, 2025
@Copilot Copilot AI requested a review from zeme-wana August 21, 2025 08:00
Copilot finished work on behalf of zeme-wana August 21, 2025 08:00
@Unisay Unisay marked this pull request as ready for review August 29, 2025 13:57
@Copilot Copilot AI temporarily deployed to github-pages August 29, 2025 13:57 Inactive
@IntersectMBO IntersectMBO deleted a comment from Copilot AI Aug 29, 2025
Copy link
Contributor

github-actions bot commented Aug 29, 2025

PR Preview Action v1.6.2

🚀 View preview at
https://IntersectMBO.github.io/plutus/pr-preview/pr-7274/

Built to branch gh-pages at 2025-08-29 16:33 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@Unisay Unisay added the No Changelog Required Add this to skip the Changelog Check label Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Changelog Required Add this to skip the Changelog Check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants