agora-0.1.0
Maintaineremi@haskell.fyi
Safe HaskellSafe-Inferred
LanguageHaskell2010

Agora.AuthorityToken

Description

Tokens acting as redeemable proofs of DAO authority.

Synopsis

Documentation

authorityTokensValidIn :: Term s (PCurrencySymbol :--> (PTxOut :--> PBool)) Source #

Check that all GATs are valid in a particular TxOut. How this is checked: an AuthorityToken should never leave the Effect it was initially sent to, so we simply check that the script address the token resides in matches the TokenName. Since the TokenName was tagged upon mint with the Effect script it was sent to, this is enough to prove validity. In other words, check that all assets of a particular currency symbol are tagged with a TokenName that matches where they live.

Since: 0.1.0

singleAuthorityTokenBurned :: forall (keys :: KeyGuarantees) (amounts :: AmountGuarantees) (s :: S). Term s PCurrencySymbol -> Term s (PAsData PTxInfo) -> Term s (PValue keys amounts) -> Term s PBool Source #

Assert that a single authority token has been burned.

Since: 0.1.0

newtype AuthorityToken Source #

An AuthorityToken represents a proof that a particular token spent in the same transaction the AuthorityToken was minted. In effect, this means that the validator that locked such a token must have approved the transaction in which an AuthorityToken is minted. Said validator should be made aware of an AuthorityToken token's existence in order to prevent incorrect minting.

Since: 0.1.0

Constructors

AuthorityToken 

Fields

Instances

Instances details
Generic AuthorityToken Source # 
Instance details

Defined in Agora.AuthorityToken

Associated Types

type Rep AuthorityToken :: Type -> Type Source #

type Rep AuthorityToken Source #

Since: 0.1.0

Instance details

Defined in Agora.AuthorityToken

type Rep AuthorityToken = D1 ('MetaData "AuthorityToken" "Agora.AuthorityToken" "agora-0.1.0-C1o5klqsCO77ggIWQdJiNp" 'True) (C1 ('MetaCons "AuthorityToken" 'PrefixI 'True) (S1 ('MetaSel ('Just "authority") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AssetClass)))