Skip to content

Latest commit

 

History

History
34 lines (32 loc) · 1.67 KB

Tests.md

File metadata and controls

34 lines (32 loc) · 1.67 KB

Tests

Creating Shared Reference Scripts

  • Reference script and beacon must be stored in a reference vault address.
    • Fail if stored in another script address.
    • Fail if stored in a pubkey address.
  • Beacon can only be minted to a reference vault address with a staking credential.
    • Fail if minted to a reference vault address without a staking credential.
  • Beacon must be stored with the reference script for that token name.
    • Fail if beacon stored in different vault utxo than reference script.
    • Fail if beacon stored with a different reference script than specified in token name.
    • Fail if beacon not stored with a reference script.
  • Only the beacon for that reference script can be minted.
    • Fail if minting more than just that reference script's beacon.
  • Only one beacon can be minted for that reference script.
    • Fail if more than one beacon minted for that reference script.
  • Only the mint redeemer can be used to mint beacons.
    • Fail if burn redeemer used to mint.
  • Beacon must be stored with inline datum of its policy id.
    • Fail if beacon stored with datum of different policy id.
    • Fail if beacon not stored with inline datum.

Close Shared Reference Scripts

  • All beacons in inputs must be burned.
    • Fail if beacon withdrawn.
    • Fail if beacon left behind in vault address.
  • Staking credential must approve.
    • Stake pubkey must sign tx.
    • Staking script must be executed in tx.\
  • Always allow burning.
    • Allows burning many beacons.
    • Allows burning single beacons.
  • Must use burn redeemer.
    • Fail if mint redeemer used to burn.