| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cooked.InitialDistribution
Description
This module provides a convenient way to spread assets between wallets and scripts at the initialization of the mock chain. These initial assets can be accompanied by datums, staking credentials and reference scripts.
Synopsis
- data InitialDistribution where
- InitialDistribution :: {..} -> InitialDistribution
- distributionFromList :: IsTxSkelOutAllowedOwner owner => [(owner, [Value])] -> InitialDistribution
Documentation
data InitialDistribution where Source #
Describes the initial distribution of UTxOs per user.
The following specifies a starting state where wallet 1 owns two UTxOs,
one with 42 Ada and one with 2 Ada and one TOK token; wallet 2 owns a
single UTxO with 10 Ada and wallet 3 has 10 Ada and a permanent value
i0 = distributionFromList $
[ (wallet 1 , [ ada 42 , ada 2 <> quickValue "TOK" 1 ]
, (wallet 2 , [ ada 10 ])
, (wallet 3 , [ ada 10 <> permanentValue "XYZ" 10])
]Note that payment issued through an initial distribution will be attached enough ADA to sustain themselves.
Constructors
| InitialDistribution | |
Fields
| |
Instances
| Monoid InitialDistribution Source # | |
Defined in Cooked.InitialDistribution Methods mempty :: InitialDistribution # mappend :: InitialDistribution -> InitialDistribution -> InitialDistribution # | |
| Semigroup InitialDistribution Source # | |
Defined in Cooked.InitialDistribution Methods (<>) :: InitialDistribution -> InitialDistribution -> InitialDistribution # sconcat :: NonEmpty InitialDistribution -> InitialDistribution # stimes :: Integral b => b -> InitialDistribution -> InitialDistribution # | |
| Default InitialDistribution Source # | 4 UTxOs with 100 Ada each, for each of the first 4 |
Defined in Cooked.InitialDistribution Methods | |
distributionFromList :: IsTxSkelOutAllowedOwner owner => [(owner, [Value])] -> InitialDistribution Source #
Creating a initial distribution with simple values assigned to owners