singular-registry
LicenseApache-2.0
Safe HaskellNone
LanguageGHC2021

Singular.Registry.TxBuilder.Reject

Description

Builds a reject transaction that consumes every pending request of the registry, in any window: a reject carries no admission (Lean exitAdmission .reject = none, #320). The folder keeps the tip and refunds the remaining ADA to the request owners. The trie root does NOT change.

Synopsis

Documentation

rejectRequestsImpl :: CageConfig -> Session NoWitness IO -> TokenId -> Addr -> IO ConwayTx Source #

Build a reject transaction for every pending request of the registry, attaching the state and request scripts to the transaction itself.

rejectRequestsWithRefs Source #

Arguments

:: CageConfig 
-> Session NoWitness IO 
-> TokenId 
-> Addr 
-> [(TxIn, TxOut ConwayEra)]

Outputs carrying the reject's scripts as reference scripts

-> IO ConwayTx 

Build a reject transaction resolving its scripts through reference outputs when the caller has published them.

The state validator alone is fifteen kilobytes and the request validator another two and a half, so a reject that carries both inline is 18317 bytes against the protocol's MaxTxSizeUTxO of 16384 and the ledger refuses it before a script runs. Given outputs that carry those scripts, every purpose resolves through them instead and the transaction carries neither. An empty list keeps the attaching form, for a caller that has nothing published.