Base Types of the Cardano Ledger
{-# OPTIONS --safe #-}
module Ledger.Prelude.Base where
open import Agda.Primitive using (lzero) renaming (Set to Type) public
open import Data.Nat
Basic Types
Coin : Type
Coin = ℕ
Donations Fees Reserves Treasury : Type
Donations = Coin
Fees = Coin
Reserves = Coin
Treasury = Coin
record HasDonations {a} (A : Type a) : Type a where
field DonationsOf : A → Donations
open HasDonations ⦃...⦄ public
record HasFees {a} (A : Type a) : Type a where
field FeesOf : A → Fees
open HasFees ⦃...⦄ public
record HasReserves {a} (A : Type a) : Type a where
field ReservesOf : A → Reserves
open HasReserves ⦃...⦄ public
record HasTreasury {a} (A : Type a) : Type a where
field TreasuryOf : A → Treasury
open HasTreasury ⦃...⦄ public