Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Dummy data to be used in tests or demos where it's not essential.
Synopsis
- dummyNow :: Timestamp
- dummyLevel :: Natural
- dummyMaxSteps :: RemainingSteps
- dummyVotingPowers :: VotingPowers
- dummyBigMapCounter :: BigMapCounter
- dummyContractEnv :: Applicative m => ContractEnv' m
- dummyGlobalCounter :: GlobalCounter
- dummyOrigination :: (ParameterScope cp, StorageScope st) => Value st -> Contract cp st -> GlobalCounter -> OriginationOperation
- dummyMinBlockTime :: Natural
- dummySelf :: ContractAddress
- dummyContractState :: ParameterScope t => ParamNotes t -> ContractState
Documentation
dummyNow :: Timestamp Source #
Dummy timestamp, can be used to specify current NOW
value or
maybe something else.
dummyLevel :: Natural Source #
dummyMaxSteps :: RemainingSteps Source #
Dummy value for maximal number of steps a contract can make. Intentionally quite large, because most likely if you use dummy value you don't want the interpreter to stop due to gas exhaustion. On the other hand, it probably still prevents the interpreter from working for eternity.
dummyVotingPowers :: VotingPowers Source #
Dummy VotingPowers
. We give all the voting power to two genesis addresses
as the addresses holding lot of money. Only two addresses are involved for
simplicity.
dummyContractEnv :: Applicative m => ContractEnv' m Source #
Dummy ContractEnv
with some reasonable hardcoded values. You
can override values you are interested in using record update
syntax.
dummyOrigination :: (ParameterScope cp, StorageScope st) => Value st -> Contract cp st -> GlobalCounter -> OriginationOperation Source #
OriginationOperation
with most data hardcoded to some
reasonable values. Contract and initial values must be passed
explicitly, because otherwise it hardly makes sense.
dummyContractState :: ParameterScope t => ParamNotes t -> ContractState Source #
Construct dummy ContractState
for the given parameter type. This can be
useful with runCode
. The state constructed doesn't have any views, and uses
unit
for storage.