Formal Ledger Specification
Abstract
Initializing search
    GitHub
    • Navigation
    GitHub
      • Home
      • Guide for Contributors
        • Notation
      • Ledger
        • Introduction
        • Prelude
          • Base
          • Instances
        • Conway
          • Abstract
          • Address
          • BaseTypes
          • Certs
            • Properties
              • PoV
              • PoVLemmas
              • VoteDelegsVDeleg
          • Chain
            • Properties
              • CredDepsEqualDomRwds
              • EpochStep
              • GovDepsMatch
              • PParamsWellFormed
          • Crypto
          • Enact
            • Properties
          • Epoch
            • Properties
              • ConstRwds
              • GovDepsMatch
              • NoPropSameDReps
          • Fees
          • Gov
            • Base
            • Actions
            • Properties
              • ChangePPGroup
          • Ledger.Ledger
            • Properties
              • GovDepsMatch
              • PoV
          • PParams
          • Properties
          • Ratify
            • Properties
          • Rewards
          • Script
            • Base
            • Timelock
            • Validation
            • Base
            • Coin
            • ValueSet
            • ValueVector
          • Transaction
            • Epoch
            • Numeric
              • UnitInterval
              • PositiveNat
          • Utxo
            • Properties
              • MinSpend
              • PoV
          • Utxow
            • Properties
            • ExternalFunctions
            • HSLedger
              • Address
              • BaseTypes
              • Cert
              • Certs
              • Chain
              • Core
              • Enact
              • Epoch
              • ExternalStructures
              • Gov
                • Core
                • Actions
              • Ledger
              • NewEpoch
              • PParams
              • Ratify
              • Transaction
              • Utxo
            • HSTypes
            • Util
            • Certs
              • Properties
            • Chain
              • Properties
            • Epoch
              • Properties
            • Equivalence
              • Bisimilarity
              • Certs
              • Convert
              • Deposits
              • Map
              • Utxo
            • Gov
            • Ledger
              • Properties
            • Properties
            • Script
            • Utxo
              • Properties
            • Utxow
              • Properties
            • Examples
              • HelloWorld
              • SucceedIfNumber
            • LedgerImplementation
            • Lib
            • Prelude
            • StructuredContracts
        • ConwaySafe
          • HasCoin
        • PreConway
            • NewPP
              • Properties
            • PPUp
              • Properties
          • NewPP
            • Properties
          • PPUp
            • Properties
        • Convertible
          • Deriving
          • DerivingTest
        • HaskellTypes
          • Deriving
        • EssentialAgda
        • Agda Prelude
            • ComputationalRelation
            • HasSubset
            • HasSubtract
              • Instance
            • Hashable
            • STS
          • MyDebugOptions

    Abstract

    {-# OPTIONS --safe #-}
    
    open import Ledger.Prelude
    open import Ledger.Conway.Transaction
    
    module Ledger.Conway.Abstract (txs : TransactionStructure) where
    
    open TransactionStructure txs
    open import Ledger.Conway.Certs govStructure
    
    record indexOf : Type where
      field
        indexOfDCert    : DCert → List DCert → Maybe Ix
        indexOfRwdAddr  : RwdAddr → Wdrl → Maybe Ix
        indexOfTxIn     : TxIn → ℙ TxIn → Maybe Ix
        indexOfPolicyId : ScriptHash → ℙ ScriptHash → Maybe Ix
        indexOfVote     : Voter → List Voter → Maybe Ix
        indexOfProposal : GovProposal → List GovProposal → Maybe Ix
    
    record AbstractFunctions : Type where
      field txscriptfee  : Prices → ExUnits → Coin
            serSize      : Value → MemoryEstimate
            indexOfImp   : indexOf
            runPLCScript : CostModel → P2Script → ExUnits → List Data → Bool
            scriptSize   : Script → ℕ
    
    Previous
    Conway
    Next
    Address
    Made with Material for MkDocs