test_constants

This module contains constant values that are used by the unit tests for the validators

Constants

admin_address: Address

admin_key_hash: ByteArray = #"da299558c70a8970781806dca93d1801ba2f3b3894227a7b284786e4"

admin_utxo: Input

admin_utxo_after_lp_withdrawal: Input

audit_script_address: Address

audit_script_hash: ByteArray = #"00a0b79a29bb50da169ef9ee302aa8acca1dd62ba2d7fa57331847f6"

audit_total_borrowed: Int = 30_000_000_000

audit_total_collateral: Int = 100_000_000_000

audit_tx_valid_from: PosixTime

audit_tx_valid_til: Int

available_collateral_datum: CollateralDatum

available_collateral_utxo: Input

bad_minswap_extra_order_datum: MinswapEOD

bad_minswap_order_datum: MinswapOrderDatum

beacon_token_audit_value: Value

beacon_token_global_cfg_value: Value

beacon_token_oracle_cfg_value: Value

borrow_tx_valid_from: Int

borrow_tx_valid_til: Int

collateral_amt: Int = 2_000_000_000

collateral_asset: AssetClass

collateral_price: (Int, Int) = (550_000, 6)

Suppose we have ADA as our collateral, and that the price is 0.55 USDM (CollateralPrice)

collateral_ratio: Int = 70

Collateral value % used in determining loanable amount (LTV)

collateral_script_address: Address

collateral_script_hash: ByteArray = #"00a0b79a29bb50da169ef9ee302aa8acca1dd62ba2d7fa57331847f2"

collateral_swapped_amt: Int

Sample utxo from an executed dex swap order

global_cfg_datum: SettingsDatum

global_cfg_utxo: Input

init_audit_utxo: Input

init_utxo: Input

initial_audit_datum: AuditDatum

interest_amt: Int

interest_rate: Int = 25

interest_rates: List<(Int, Int)> = [
  (10_800_000, 5), (604_800_000, 8), (1_209_600_000, 10), (2_592_000_000, 15),
  (3_888_000_000, 25),
]

List of interest rates List<InterestRate> for 3 hrs, 7 days, 14 days, 30 days, and 45 days

lending_pool_script_address: Address

lending_pool_script_hash: ByteArray = #"00a0b79a29bb50da169ef9ee302aa8acca1dd62ba2d7fa57331847f3"

liquidated_collateral_utxo: Input

liquidation_dex_output: Output

liquidation_tx_valid_from: Int

liquidation_tx_valid_til: Int

liquidator_address: Address

liquidator_keyhash: ByteArray = #"db26f43644bfb8b4fdfc0b92bd56f446fa4d4acce4cc3102b4ac9734"

liquidator_stake_hash: ByteArray = #"a36e7b2fde2d0f04dc2727f32e71f999f097f00cd1be4ba4f6743adf"

loan_amt: Int = 525_000_000

loan_issued_collateral_bad_value: Value

loan_issued_collateral_datum: CollateralDatum

loan_issued_collateral_utxo: Input

loan_issued_collateral_value: Value

loan_issued_datum: LoanDatum

loan_req_collateral_utxo: Input

Loan term indicated in loan request: 3hrs, in PosixTime interval Amount requested to borrow: 525 USD

loan_reqst_datum: LoanRequest

loan_requested_collateral_datum: CollateralDatum

loan_term: Int = 3_888_000_000

3hrs, in PosixTime interval

loanable_asset: AssetClass

maturity_time: Int = 1_743_681_600_000

April 3, 2025 12:00:00 PM GMT, in PosixTime

max_tx_validity: Int = 7_200_000

2 hrs, in PosixTime interval

minswap_extra_order_datum: MinswapEOD

minswap_lp_asset: AssetClass

minswap_order_address: Address

minswap_order_datum: MinswapOrderDatum

minswap_script_hash: ByteArray = #"00a0b79a29bb50da169ef9ee302aa8acca1dd62ba2d7fa57331847f7"

new_audit_datum: AuditDatum

new_audit_utxo: Input

oracle_cfg_utxo: Input

oracle_price_datum: OracleDatum

timestamp: Jun 23, 2025 6:51:43 AM GMT, in PosixTime validity_period: 1 hr, in PosixTime price: 0.55 USDM

oracle_price_utxo: Input

oracle_provider1_address: Address

oracle_provider1_keyhash: ByteArray = #"a4ab0aa7b5d3b32b25daf0fbd5091e7eb7621ace6858792d1dbfcc6a"

oracle_provider1_stake_hash: ByteArray = #"690d36b45855ef891f1c901c0159d194ef218bc20a78ffea85fed4da"

oracle_script_address: Address

oracle_script_hash: ByteArray = #"00a0b79a29bb50da169ef9ee302aa8acca1dd62ba2d7fa57331847f4"

pool_datum: LendingPoolDatum

pool_input_for_loan_issue: Input

Lending pool UTXO to be used for fulfilling a loan request

pool_output_after_liquidation_settlement: Input

pool_output_after_loan_issue: Input

Lending pool UTXO after being used to fulfill a loan request

pool_output_after_loan_repayment: Input

Lending pool UTXO after fulfilling a loan repayment request

position_registry_datum: PositionRegistryDatum

position_token_bad_name: ByteArray

position_token_bad_value: Value

position_token_name: ByteArray

position_token_value: Value

redeemer_borrow_process: UnifiedRedeemer

redeemer_borrow_request: UnifiedRedeemer

redeemer_burn_cfg_beacons: UnifiedRedeemer

redeemer_burn_oracle_beacon: UnifiedRedeemer

redeemer_init_mint: UnifiedRedeemer

redeemer_liquidate_collateral: UnifiedRedeemer

redeemer_mint_oracle_beacon: UnifiedRedeemer

redeemer_oracle_update_price: UnifiedRedeemer

redeemer_repay_process: UnifiedRedeemer

redeemer_repay_req: UnifiedRedeemer

redeemer_settle_liquidation: UnifiedRedeemer

redeemer_update_audit: UnifiedRedeemer

redeemer_update_global_settings: UnifiedRedeemer

redeemer_update_oracle_settings: UnifiedRedeemer

redeemer_withdraw_collat: UnifiedRedeemer

redeemer_withdraw_lp: UnifiedRedeemer

refscripts_script_address: Address

refscripts_script_hash: ByteArray = #"00a0b79a29bb50da169ef9ee302aa8acca1dd62ba2d7fa57331847f0"

registry_datum_after_liquidation: PositionRegistryDatum

registry_position_utxo: Input

registry_script_address: Address

registry_script_hash: ByteArray = #"00a0b79a29bb50da169ef9ee302aa8acca1dd62ba2d7fa57331847f5"

registry_utxo_from_liquidation: Input

repay_req_bad_collateral_utxo: Input

repay_req_collateral_utxo: Input

repay_requested_collateral_datum: CollateralDatum

repay_tx_valid_from: Int

repay_tx_valid_til: Int

settings_script_address: Address

settings_script_hash: ByteArray = #"00a0b79a29bb50da169ef9ee302aa8acca1dd62ba2d7fa57331847f1"

starting_reserve_amt: Int = 1_000_000_000_000

tx_borrow_process: Transaction

Sample tx that successfully fulfills a loan request

tx_borrow_request: Transaction

Sample tx that successfully submits a loan request

tx_burn_beacon_tokens: Transaction

Sample tx that successfully burns the beacon tokens for the protocol’s settings

tx_burn_oracle_price_beacon: Transaction

Sample tx that successfully burns an oracle price beacon token

tx_init_protocol: Transaction

Sample tx that successfully initializes the protocol with initial settings UTXOs

tx_liquidate_collateral: Transaction

Sample tx that successfully liquidates collateral

tx_mint_oracle_price_beacon: Transaction

Sample tx that successfully mints an oracle price beacon token

tx_oracle_update_price: Transaction

Sample tx that successfully updates the oracle price datum

tx_repay_process: Transaction

Sample tx that successfully fulfills a loan repayment request

tx_repay_request: Transaction

Sample tx that successfully submits a loan repayment request

tx_settle_liquidation: Transaction

Sample tx that successfully settles a loan after liquidating the collateral

tx_update_audit: Transaction

Sample tx that successfully updates the audit datum

tx_update_global_settings: Transaction

Sample tx that successfully updates the global settings datum

tx_update_oracle_settings: Transaction

Sample tx that successfully updates the oracle settings datum

tx_withdraw_collat: Transaction

Sample tx that successfully withdraws collateral that is available

tx_withdraw_lp: Transaction

Sample tx that successfully withdraws the loanable asset from the lending_pool

txid_0: ByteArray = #"0000000000000000000000000000000000000000000000000000000000000000"

To be used for initial input utxos

txid_1: ByteArray = #"0000000000000000000000000000000000000000000000000000000000000001"

To be used for the sample tx making a loan request

txid_2: ByteArray = #"0000000000000000000000000000000000000000000000000000000000000002"

To be used for the sample tx fulfilling a loan request (issuing a loan)

txid_3: ByteArray = #"0000000000000000000000000000000000000000000000000000000000000003"

To be used for the sample tx making a loan repayment request

txid_4: ByteArray = #"0000000000000000000000000000000000000000000000000000000000000004"

To be used for the sample tx fulfilling a loan repayment request

txid_5: ByteArray = #"0000000000000000000000000000000000000000000000000000000000000005"

To be used for the sample tx liquidating an open loan position

txid_6: ByteArray = #"0000000000000000000000000000000000000000000000000000000000000006"

To be used for the sample tx updating oracle price datum

txid_7: ByteArray = #"0000000000000000000000000000000000000000000000000000000000000007"

To be used for the sample tx updating oracle settings datum

txid_8: ByteArray = #"0000000000000000000000000000000000000000000000000000000000000008"

To be used for the sample tx updating lending_pool settings datum

unreg_settings_cred_cert: Certificate

user_address: Address

user_payment_keyhash: ByteArray = #"d48838fee1e840857dab28a04dd88193aec8c297b85d8150c0a1f5cc"

user_staking_keyhash: ByteArray = #"6313a1d2c296eb3341e159b6c5c6991de11e81062b95108c9aa024ad"

user_utxo: Input

Search Document