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

CIP-???? | Augment Spend Purpose #754

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions cip-augment-spend-purpose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
CIP: ????
Title: Augment Spend Purpose
Category: Plutus
Status: Proposed
Authors:
- Micah Kendall <micah@mcomp.tech>
Implementors: []
Discussions:
- https://github.com/cardano-foundation/CIPs/pull/754
Created: 2024-01-27
License: CC-BY-4.0
---

## Abstract
<!-- A short (\~200 word) description of the proposed solution and the technical issue being addressed. -->

We should change the purpose Spend(OutputReference) to instead be Spend(OutputReference, ScriptHash), where ScriptHash is a bytearray / bytestring of the script hash.

## Motivation: why is this CIP necessary?
This makes common patterns in contract development much cheaper, but also more ergonomic.

## Specification
There should be a 2nd value in the Spend constructor for the script purpose, which is the script hash of the spending script.

## Rationale: how does this CIP achieve its goals?
We would have the script hash available as a constant-time lookup, instead of linear-time.

## Path to Active

### Acceptance Criteria
The plutus ledger team add the script hash as a second value inside the spend constructor.

### Implementation Plan
N/A as it is a very simple change

## Copyright

This CIP is free and unencumbered, released by it's author into the public domain.