Skip to content

Conversation

Ali-Hill
Copy link
Contributor

@Ali-Hill Ali-Hill commented Sep 5, 2025

Description

Adding MultiSig example to the Conway specification tests.

This is useful as it shows a real contract running using the ledger rules. This example adds:

  • MultiSig validator definition
  • MultiSig offchain code
  • Ledger rule traces

Development notes:

  • I moved ScriptPurpose and TxInfo into their own file in order to avoid circular dependencies.
  • I removed toData in favour of adding valContext to the AbstractFunctions record.
  • This example currently only uses coinTokenAlgebra.

Rather than define a type of Data that I could serialise and deserialise, I simply encode a symbolic data type that is almost exactly the same as the ledger. The advantage of this is that defining functions such as valContext is straightforward. The disadvantage is that we need to duplicate definitions from the Ledger into a symbolic version.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Everything still typechecks
  • Any semantic changes to the specifications are documented in CHANGELOG.md
  • Code is formatted according to CONTRIBUTING.md
  • Self-reviewed the diff

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.

1 participant