Module create

Source
Expand description

Transaction that creates a new reserve.

Specification:

  1. The transaction should mint two tokens:
  • 1 Reserve Auth Policy Token (using reference script)
  • 1 Governance Policy Token (using reference script)
  1. The transaction should have two outputs:
  • Reserve Validator output that:
    • has Reward Tokens and minted Reserve Auth Policy Token
    • has Plutus Data (in our “versioned format”): [[[Int(t0), <Encoded Token>], [Bytes(v_function_hash), Int(initial_incentive)], [Int(0)]], Constr(0, []), Int(0)], where <Encoded Token> is Constr(0, [Bytes(policy_id), Bytes(asset_name)]).
  • Change output that keeps the Governance Token and change of other tokens
  1. The transaction should have three script reference inputs:
  • Reserve Auth Version Utxo
  • Reserve Validator Version Utxo
  • Governance Policy Script

Structs§

ReserveParameters
Parameters for token reserve.

Functions§

create_reserve_utxo
Creates new reserve with the given ReserveParameters.