Skip to content

script context: add Observing purpose for CIP-0112 #285

@wolf31o2

Description

@wolf31o2

Summary

CIP-0112 introduces a new Plutus script purpose, Observing, that runs a script as an observer (no direct redeemer action like spend/mint/etc.). plutigo's script context / script purpose model needs to represent this new case so CIP-0112 scripts can be evaluated once the CIP activates.

What Needs to Happen

  1. Extend the ScriptPurpose / ScriptInfo surface to include an Observing case.
  2. Ensure the ToData encoding matches the CBOR constructor tag defined by CIP-0112 for the target Plutus version (V4+ gated).
  3. Accept Observing in the script-context builder path so downstream consumers can construct contexts for observe-purpose scripts.
  4. Add unit tests covering encode/decode of the new purpose.

Gating

Only emit / accept Observing for the Plutus language version that activates CIP-0112 (expected PlutusV4 under Dijkstra). Earlier versions must keep rejecting it.

Upstream tracking

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions