Skip to content

Cip57 imports#267

Open
nicolasLuduena wants to merge 9 commits intomainfrom
259-feat-plutusjson-imports
Open

Cip57 imports#267
nicolasLuduena wants to merge 9 commits intomainfrom
259-feat-plutusjson-imports

Conversation

@nicolasLuduena
Copy link
Contributor

@nicolasLuduena nicolasLuduena commented Dec 9, 2025

This PR relies on #263 being merged first as it needs to be able to parse cip57 files into rust structs and in this PR we map the parsed type definitions into tx3 symbols and we add them to tx3's scope as the base case of the analyze phase.
This PR doesn't try to be the fully-featured cip57 compatibility layer with tx3. It's the base to build on top of as it contains many cases and features not handled:

  • validators could be imported
  • script parameters could be imported
  • how do we handle name repetition of symbols?
  • how can devs see the name of types available to them?
  • prettify imports for each compiler

An idea for aiken exported types would be:

cardano::import "plutus.json" as Githoney;
tx someTx() {
  output {
    // within plutus.json definitions field we have output reference defined as follows: 
   // "cardano/transaction/OutputReference"
    datum: Githoney::CardanoTransactionOutputReference {
   // an alternative Githoney::Cardano::Transaction::OutputReference
      transaction_id: 0x1234,
      index: 123,
    },
  }
}

@nicolasLuduena nicolasLuduena linked an issue Dec 9, 2025 that may be closed by this pull request
3 tasks
@nicolasLuduena nicolasLuduena self-assigned this Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

feat: plutus.json imports

2 participants