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

Add command to calculate plutus script costs from an already constructed transaction #1031

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Jimbo4350
Copy link
Contributor

@Jimbo4350 Jimbo4350 commented Jan 24, 2025

Changelog

- description: |
    Add command to calculate plutus script costs from an already constructed transaction.
  type:
  - feature

Context

This is a first step towards addressing this issue: #945.

This PR in cardano-api provides the required functionality: IntersectMBO/cardano-api#735. This PR must wait for the functionality in the cardano-api PR to get in a release, and the source repo stanza must be removed before merging.

How to trust this PR

Ensure the untyped bits are correct: serialisation, documentation, and interface design.

Check in conjunction with this cardano-api PR: IntersectMBO/cardano-api#735

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. See Running tests for more details
  • Self-reviewed the diff

Copy link
Contributor Author

@Jimbo4350 Jimbo4350 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look closely renderScriptCosts could be refactored to accept Map ScriptWitnessIndex ScriptHash as a parameter instead of [(ScriptWitnessIndex, AnyScriptWitness era)].

cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs Outdated Show resolved Hide resolved
cardano-cli/src/Cardano/CLI/EraBased/Run/Transaction.hs Outdated Show resolved Hide resolved
@palas palas self-assigned this Jan 24, 2025
@palas palas added the enhancement New feature or request label Jan 24, 2025
@palas palas changed the title Plutus script cost calculation cmd Add command to calculate plutus script costs from an already constructed transaction Jan 24, 2025
@palas palas marked this pull request as ready for review January 24, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FR] - Command to calculate the correct Plutus Script Costs offline
2 participants