Skip to content

Sponsorship: Static input used as part of validation logic #85

@adrian1-dot

Description

@adrian1-dot

The current flow where the SDK swaps the static input and rebuilds the tx with the actual input may lead to problems when the static input is used for validation.

Examples:

  1. Minting an NFT where the static input is used to parameterize the minting policy.
  2. Input indexing where the index of a script UTxO is provided through the redeemer to more efficiently validate. As inputs are ordered lexicographically, the swap will change the order and break the validation.

Possible solutions:
Example 1 can be mitigated by not using the static UTxO as a parameter. Updating the documentation to make developers aware should be enough.

Example 2 is more complex and would require a different flow to "bypass" the SDK rebuilding the tx with the actual input. A possible flow would be that the SDK only swaps static to actual and it falls on the developer to make sure the transaction still validates. To correctly observe the available sponsor UTxOs, there could be an additional endpoint that allows the SDK to be informed about the inputs and change outputs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions