Skip to content
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

Update ref script getters in providers #389

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

lisicky
Copy link
Collaborator

@lisicky lisicky commented Nov 14, 2024

Summary

This PR normalizes Plutus script references across different providers by standardizing their encoding using the new normalizePlutusScript function. The change ensures consistent script representation and prevents potential issues with script hash comparison.

Affect components

  • @meshsdk/common
  • @meshsdk/contract
  • @meshsdk/core
  • @meshsdk/core-csl
  • @meshsdk/core-cst
  • @meshsdk/provider
  • @meshsdk/react
  • @meshsdk/transaction
  • @meshsdk/wallet
  • Mesh playground (i.e. https://meshjs.dev/)
  • Mesh CLI

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Bug fix (non-breaking change which fixes an issue)
  • Code refactoring (improving code quality without changing its behavior)
  • Documentation update (adding or updating documentation related to the project)

Related Issues

None specified

Checklist

  • My code is appropriately commented and includes relevant documentation, if necessary
  • I have added tests to cover my changes, if necessary
  • I have updated the documentation, if necessary
  • All new and existing tests pass (i.e. npm run test)
  • The build is pass (i.e. npm run build)

Additional Information

The key changes include:

  1. Exporting plutus-tools utilities from core-cst package to make them available for providers
  2. Modifying normalizePlutusScript to work with hex strings and enforce DoubleCBOR encoding for consistency
  3. Updating script reference resolution in all providers (Blockfrost, Koios, Maestro, Yaci) to use normalized scripts
  4. Adding infinite loop protection in plutus script bytes extraction
  5. Adding error handling for missing script bytes in Maestro provider

Copy link

vercel bot commented Nov 14, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mesh-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 5:55pm
mesh-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 14, 2024 5:55pm

@lisicky lisicky changed the title Update providers ref script getters Update ref script getters in providers Nov 14, 2024
@jinglescode jinglescode merged commit fb9ac52 into main Nov 15, 2024
4 checks passed
@jinglescode jinglescode deleted the feature-update/providers-ref-script-fix branch November 18, 2024 00:48
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.

2 participants