plutus-use-cases-0.1.0.0: Collection of smart contracts to develop the plutus/wallet interface
Safe HaskellNone
LanguageHaskell2010

Plutus.Contracts.Stablecoin

Synopsis

Documentation

newtype SC a Source #

An amount of stablecoins

Constructors

SC 

Fields

Instances

Instances details
Functor SC Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

fmap :: (a -> b) -> SC a -> SC b Source #

Lift DefaultUni a => Lift DefaultUni (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Eq a => Eq (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(==) :: SC a -> SC a -> Bool Source #

(/=) :: SC a -> SC a -> Bool Source #

Num a => Num (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(+) :: SC a -> SC a -> SC a Source #

(-) :: SC a -> SC a -> SC a Source #

(*) :: SC a -> SC a -> SC a Source #

negate :: SC a -> SC a Source #

abs :: SC a -> SC a Source #

signum :: SC a -> SC a Source #

fromInteger :: Integer -> SC a Source #

Show a => Show (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

showsPrec :: Int -> SC a -> ShowS Source #

show :: SC a -> String Source #

showList :: [SC a] -> ShowS Source #

Generic (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Associated Types

type Rep (SC a) :: Type -> Type Source #

Methods

from :: SC a -> Rep (SC a) x Source #

to :: Rep (SC a) x -> SC a Source #

ToJSON a => ToJSON (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromJSON a => FromJSON (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

UnsafeFromData a => UnsafeFromData (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromData a => FromData (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

ToData a => ToData (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

AdditiveSemigroup a => AdditiveSemigroup (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(+) :: SC a -> SC a -> SC a Source #

AdditiveMonoid a => AdditiveMonoid (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

zero :: SC a Source #

AdditiveGroup a => AdditiveGroup (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(-) :: SC a -> SC a -> SC a Source #

MultiplicativeSemigroup a => MultiplicativeSemigroup (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(*) :: SC a -> SC a -> SC a Source #

Ord a => Ord (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

compare :: SC a -> SC a -> Ordering Source #

(<) :: SC a -> SC a -> Bool Source #

(<=) :: SC a -> SC a -> Bool Source #

(>) :: SC a -> SC a -> Bool Source #

(>=) :: SC a -> SC a -> Bool Source #

max :: SC a -> SC a -> SC a Source #

min :: SC a -> SC a -> SC a Source #

Eq a => Eq (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(==) :: SC a -> SC a -> Bool Source #

Typeable DefaultUni SC Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep (SC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep (SC a) = D1 ('MetaData "SC" "Plutus.Contracts.Stablecoin" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'True) (C1 ('MetaCons "SC" 'PrefixI 'True) (S1 ('MetaSel ('Just "unSC") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

newtype RC a Source #

An amount of reservecoins

Constructors

RC 

Fields

Instances

Instances details
Functor RC Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

fmap :: (a -> b) -> RC a -> RC b Source #

Lift DefaultUni a => Lift DefaultUni (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Eq a => Eq (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(==) :: RC a -> RC a -> Bool Source #

(/=) :: RC a -> RC a -> Bool Source #

Num a => Num (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(+) :: RC a -> RC a -> RC a Source #

(-) :: RC a -> RC a -> RC a Source #

(*) :: RC a -> RC a -> RC a Source #

negate :: RC a -> RC a Source #

abs :: RC a -> RC a Source #

signum :: RC a -> RC a Source #

fromInteger :: Integer -> RC a Source #

Show a => Show (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

showsPrec :: Int -> RC a -> ShowS Source #

show :: RC a -> String Source #

showList :: [RC a] -> ShowS Source #

Generic (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Associated Types

type Rep (RC a) :: Type -> Type Source #

Methods

from :: RC a -> Rep (RC a) x Source #

to :: Rep (RC a) x -> RC a Source #

ToJSON a => ToJSON (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromJSON a => FromJSON (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

UnsafeFromData a => UnsafeFromData (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromData a => FromData (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

ToData a => ToData (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

AdditiveSemigroup a => AdditiveSemigroup (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(+) :: RC a -> RC a -> RC a Source #

AdditiveMonoid a => AdditiveMonoid (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

zero :: RC a Source #

AdditiveGroup a => AdditiveGroup (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(-) :: RC a -> RC a -> RC a Source #

MultiplicativeSemigroup a => MultiplicativeSemigroup (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(*) :: RC a -> RC a -> RC a Source #

Ord a => Ord (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

compare :: RC a -> RC a -> Ordering Source #

(<) :: RC a -> RC a -> Bool Source #

(<=) :: RC a -> RC a -> Bool Source #

(>) :: RC a -> RC a -> Bool Source #

(>=) :: RC a -> RC a -> Bool Source #

max :: RC a -> RC a -> RC a Source #

min :: RC a -> RC a -> RC a Source #

Eq a => Eq (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(==) :: RC a -> RC a -> Bool Source #

Typeable DefaultUni RC Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep (RC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep (RC a) = D1 ('MetaData "RC" "Plutus.Contracts.Stablecoin" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'True) (C1 ('MetaCons "RC" 'PrefixI 'True) (S1 ('MetaSel ('Just "unRC") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

newtype BC a Source #

An amount of base currency coins (eg. Ada or some native currency)

Constructors

BC 

Fields

Instances

Instances details
Functor BC Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

fmap :: (a -> b) -> BC a -> BC b Source #

Lift DefaultUni a => Lift DefaultUni (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Eq a => Eq (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(==) :: BC a -> BC a -> Bool Source #

(/=) :: BC a -> BC a -> Bool Source #

Num a => Num (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(+) :: BC a -> BC a -> BC a Source #

(-) :: BC a -> BC a -> BC a Source #

(*) :: BC a -> BC a -> BC a Source #

negate :: BC a -> BC a Source #

abs :: BC a -> BC a Source #

signum :: BC a -> BC a Source #

fromInteger :: Integer -> BC a Source #

Show a => Show (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

showsPrec :: Int -> BC a -> ShowS Source #

show :: BC a -> String Source #

showList :: [BC a] -> ShowS Source #

Generic (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Associated Types

type Rep (BC a) :: Type -> Type Source #

Methods

from :: BC a -> Rep (BC a) x Source #

to :: Rep (BC a) x -> BC a Source #

ToJSON a => ToJSON (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromJSON a => FromJSON (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

UnsafeFromData a => UnsafeFromData (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromData a => FromData (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

ToData a => ToData (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

AdditiveSemigroup a => AdditiveSemigroup (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(+) :: BC a -> BC a -> BC a Source #

AdditiveMonoid a => AdditiveMonoid (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

zero :: BC a Source #

AdditiveGroup a => AdditiveGroup (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(-) :: BC a -> BC a -> BC a Source #

MultiplicativeSemigroup a => MultiplicativeSemigroup (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(*) :: BC a -> BC a -> BC a Source #

Ord a => Ord (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

compare :: BC a -> BC a -> Ordering Source #

(<) :: BC a -> BC a -> Bool Source #

(<=) :: BC a -> BC a -> Bool Source #

(>) :: BC a -> BC a -> Bool Source #

(>=) :: BC a -> BC a -> Bool Source #

max :: BC a -> BC a -> BC a Source #

min :: BC a -> BC a -> BC a Source #

Eq a => Eq (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(==) :: BC a -> BC a -> Bool Source #

Typeable DefaultUni BC Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep (BC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep (BC a) = D1 ('MetaData "BC" "Plutus.Contracts.Stablecoin" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'True) (C1 ('MetaCons "BC" 'PrefixI 'True) (S1 ('MetaSel ('Just "unBC") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

newtype PC a Source #

An amount of peg currency (eg. USD)

Constructors

PC 

Fields

Instances

Instances details
Functor PC Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

fmap :: (a -> b) -> PC a -> PC b Source #

Lift DefaultUni a => Lift DefaultUni (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Eq a => Eq (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(==) :: PC a -> PC a -> Bool Source #

(/=) :: PC a -> PC a -> Bool Source #

Num a => Num (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(+) :: PC a -> PC a -> PC a Source #

(-) :: PC a -> PC a -> PC a Source #

(*) :: PC a -> PC a -> PC a Source #

negate :: PC a -> PC a Source #

abs :: PC a -> PC a Source #

signum :: PC a -> PC a Source #

fromInteger :: Integer -> PC a Source #

Show a => Show (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

showsPrec :: Int -> PC a -> ShowS Source #

show :: PC a -> String Source #

showList :: [PC a] -> ShowS Source #

Generic (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Associated Types

type Rep (PC a) :: Type -> Type Source #

Methods

from :: PC a -> Rep (PC a) x Source #

to :: Rep (PC a) x -> PC a Source #

ToJSON a => ToJSON (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromJSON a => FromJSON (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

UnsafeFromData a => UnsafeFromData (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromData a => FromData (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

ToData a => ToData (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

AdditiveSemigroup a => AdditiveSemigroup (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(+) :: PC a -> PC a -> PC a Source #

AdditiveMonoid a => AdditiveMonoid (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

zero :: PC a Source #

AdditiveGroup a => AdditiveGroup (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(-) :: PC a -> PC a -> PC a Source #

MultiplicativeSemigroup a => MultiplicativeSemigroup (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(*) :: PC a -> PC a -> PC a Source #

Ord a => Ord (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

compare :: PC a -> PC a -> Ordering Source #

(<) :: PC a -> PC a -> Bool Source #

(<=) :: PC a -> PC a -> Bool Source #

(>) :: PC a -> PC a -> Bool Source #

(>=) :: PC a -> PC a -> Bool Source #

max :: PC a -> PC a -> PC a Source #

min :: PC a -> PC a -> PC a Source #

Eq a => Eq (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(==) :: PC a -> PC a -> Bool Source #

Typeable DefaultUni PC Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep (PC a) Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep (PC a) = D1 ('MetaData "PC" "Plutus.Contracts.Stablecoin" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'True) (C1 ('MetaCons "PC" 'PrefixI 'True) (S1 ('MetaSel ('Just "unPC") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

data BankState Source #

The bank's state

Constructors

BankState 

Fields

Instances

Instances details
Eq BankState Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Show BankState Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Generic BankState Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Associated Types

type Rep BankState :: Type -> Type Source #

ToJSON BankState Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromJSON BankState Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

UnsafeFromData BankState Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromData BankState Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

ToData BankState Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Lift DefaultUni BankState Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Typeable DefaultUni BankState Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep BankState Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep BankState = D1 ('MetaData "BankState" "Plutus.Contracts.Stablecoin" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "BankState" 'PrefixI 'True) ((S1 ('MetaSel ('Just "bsReserves") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BC Integer)) :*: S1 ('MetaSel ('Just "bsStablecoins") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SC Integer))) :*: (S1 ('MetaSel ('Just "bsReservecoins") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RC Integer)) :*: S1 ('MetaSel ('Just "bsMintingPolicyScript") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 MintingPolicyHash))))

data Stablecoin Source #

Stablecoin parameters.

Constructors

Stablecoin 

Fields

Instances

Instances details
Eq Stablecoin Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Show Stablecoin Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Generic Stablecoin Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Associated Types

type Rep Stablecoin :: Type -> Type Source #

ToJSON Stablecoin Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromJSON Stablecoin Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

UnsafeFromData Stablecoin Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromData Stablecoin Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

ToData Stablecoin Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Lift DefaultUni Stablecoin Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Typeable DefaultUni Stablecoin Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep Stablecoin Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep Stablecoin = D1 ('MetaData "Stablecoin" "Plutus.Contracts.Stablecoin" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "Stablecoin" 'PrefixI 'True) (((S1 ('MetaSel ('Just "scOracle") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PaymentPubKey) :*: S1 ('MetaSel ('Just "scFee") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Rational)) :*: (S1 ('MetaSel ('Just "scMinReserveRatio") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Rational) :*: S1 ('MetaSel ('Just "scMaxReserveRatio") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Rational))) :*: ((S1 ('MetaSel ('Just "scReservecoinDefaultPrice") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BC Integer)) :*: S1 ('MetaSel ('Just "scBaseCurrency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AssetClass)) :*: (S1 ('MetaSel ('Just "scStablecoinTokenName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TokenName) :*: S1 ('MetaSel ('Just "scReservecoinTokenName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TokenName)))))

data Input Source #

Input to the stablecoin state machine

Constructors

Input 

Fields

Instances

Instances details
Eq Input Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Methods

(==) :: Input -> Input -> Bool Source #

(/=) :: Input -> Input -> Bool Source #

Show Input Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Generic Input Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Associated Types

type Rep Input :: Type -> Type Source #

Methods

from :: Input -> Rep Input x Source #

to :: Rep Input x -> Input Source #

ToJSON Input Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromJSON Input Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

UnsafeFromData Input Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromData Input Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

ToData Input Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep Input Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep Input = D1 ('MetaData "Input" "Plutus.Contracts.Stablecoin" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "Input" 'PrefixI 'True) (S1 ('MetaSel ('Just "inpSCAction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SCAction) :*: S1 ('MetaSel ('Just "inpConversionRate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SignedMessage (Observation ConversionRate)))))

data SCAction Source #

Action that can be performed on the stablecoin contract.

Constructors

MintStablecoin (SC Integer)

Create a number stablecoins, depositing the matching amount of base currency

MintReserveCoin (RC Integer)

Create a number of reservecoins, depositing the matching amount of base currency

Instances

Instances details
Eq SCAction Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Show SCAction Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Generic SCAction Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Associated Types

type Rep SCAction :: Type -> Type Source #

ToJSON SCAction Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromJSON SCAction Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

UnsafeFromData SCAction Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromData SCAction Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

ToData SCAction Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep SCAction Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep SCAction = D1 ('MetaData "SCAction" "Plutus.Contracts.Stablecoin" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "MintStablecoin" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (SC Integer))) :+: C1 ('MetaCons "MintReserveCoin" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (RC Integer))))

type ConversionRate = Rational Source #

Conversion rate from peg currency (eg. USD) to base currency (eg. Ada)

State machine client

Contract using the state machine

contract :: Promise () StablecoinSchema StablecoinError () Source #

A Contract that initialises the state machine and then accepts Input transitions.

data StablecoinError Source #

Instances

Instances details
Show StablecoinError Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Generic StablecoinError Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

Associated Types

type Rep StablecoinError :: Type -> Type Source #

ToJSON StablecoinError Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

FromJSON StablecoinError Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

AsContractError StablecoinError Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

AsSMContractError StablecoinError Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep StablecoinError Source # 
Instance details

Defined in Plutus.Contracts.Stablecoin

type Rep StablecoinError = D1 ('MetaData "StablecoinError" "Plutus.Contracts.Stablecoin" "plutus-use-cases-0.1.0.0-sCb7ThsvWbFT6VPXrOzPF" 'False) (C1 ('MetaCons "InitialiseEPError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContractError)) :+: (C1 ('MetaCons "StateMachineError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SMContractError)) :+: C1 ('MetaCons "RunStepError" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 ContractError))))

type StablecoinSchema = Endpoint "run step" Input .\/ Endpoint "initialise" Stablecoin Source #

Etc.

stableCoins :: Stablecoin -> SC Integer -> Value Source #

A Value with the given number of stablecoins

reserveCoins :: Stablecoin -> RC Integer -> Value Source #

A Value with the given number of reservecoins