Skip to content

Conversation

MIxAxIM
Copy link
Collaborator

@MIxAxIM MIxAxIM commented Oct 4, 2025

Also benchmark tool was removed and moved to another repository https://github.com/MIxAxIM/apollo-testing-suite

Copy link
Collaborator

@agaffney agaffney left a comment

Choose a reason for hiding this comment

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

You should probably remove the benchmark-related changes from this PR and split those to a separate PR. They have nothing to do with the PlutusV3 docs.

}
```

- `PlutusV3Script []PlutusData.PlutusV3Script`: This field is a slice of `PlutusV3Script` types. It holds all the Plutus V3 scripts that are required to validate the transaction. These scripts are typically referenced by script hashes within the transaction outputs or inputs.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This statement isn't quite true. This can hold V3 scripts that can be used to validate the transaction, but it's far more common for this to be empty and to instead use references to scripts that have been included in the outputs from other TXs

// ...
```

This structured approach ensures that all necessary Plutus V3 scripts are correctly bundled with the transaction, enabling successful on-chain validation.
Copy link
Collaborator

Choose a reason for hiding this comment

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

As noted above, they usually are not bundled with the transaction that they are validating


## Adding Plutus V3 Reference Inputs

The `AddReferenceInputV3` function is used to add a transaction input as a reference input for Plutus V3 scripts. Reference inputs are a key feature of Plutus V3, allowing scripts to inspect the contents of UTxOs without consuming them. This is particularly useful for on-chain governance, oracle data, or any scenario where a script needs to read state without altering it.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is most often used to add a reference to a V3 script that was added on-chain in a previous TX

**Parameters:**

- `stakingCredential []byte`: The staking credential (e.g., stake key hash) to be included in the address. Can be `nil` for base addresses without a staking part.
- `networkId byte`: The network identifier (e.g., `0x00` for testnet, `0x01` for mainnet).
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are there constants for the testnet vs. mainnet networkId values? Magic numbers are generally a bad idea

@MIxAxIM MIxAxIM closed this Oct 16, 2025
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.

2 participants