morley-0.3.0.1: Developer tools for the Michelson Language

Safe HaskellNone
LanguageHaskell2010

Michelson.Interpret

Description

Module, containing function to interpret Michelson instructions against given context and input stack.

Synopsis

Documentation

data ContractEnv Source #

Environment for contract execution.

Constructors

ContractEnv 

Fields

data MichelsonFailed where Source #

Represents `[FAILED]` state of a Michelson program. Contains value that was on top of the stack when FAILWITH was called.

data SomeItStack where Source #

Constructors

SomeItStack :: ExtInstr inp -> Rec Value inp -> SomeItStack 

newtype MorleyLogs Source #

Morley interpreter state

Constructors

MorleyLogs 

Fields

Instances
Eq MorleyLogs Source # 
Instance details

Defined in Michelson.Interpret

Show MorleyLogs Source # 
Instance details

Defined in Michelson.Interpret

Default MorleyLogs Source # 
Instance details

Defined in Michelson.Interpret

Methods

def :: MorleyLogs #

Buildable MorleyLogs Source # 
Instance details

Defined in Michelson.Interpret

Methods

build :: MorleyLogs -> Builder #

interpretRepeated :: Contract cp st -> [Value cp] -> Value st -> ContractEnv -> ContractReturn st Source #

Emulate multiple calls of a contract.

interpretUntyped :: Contract -> Value -> Value -> ContractEnv -> Either InterpretUntypedError InterpretUntypedResult Source #

Interpret a contract without performing any side effects.

data InterpretUntypedError Source #

Instances
Show InterpretUntypedError Source # 
Instance details

Defined in Michelson.Interpret

Generic InterpretUntypedError Source # 
Instance details

Defined in Michelson.Interpret

Associated Types

type Rep InterpretUntypedError :: Type -> Type #

Buildable InterpretUntypedError Source # 
Instance details

Defined in Michelson.Interpret

type Rep InterpretUntypedError Source # 
Instance details

Defined in Michelson.Interpret

runInstr :: Instr inp out -> Rec Value inp -> EvalOp (Rec Value out) Source #

Function to change amount of remaining steps stored in State monad

runInstrNoGas :: forall a b. Instr a b -> Rec Value a -> EvalOp (Rec Value b) Source #

runUnpack :: forall t. (SingI t, HasNoOp t, HasNoBigMap t) => TcOriginatedContracts -> ByteString -> Either UnpackError (Value t) Source #

Unpacks given raw data into a typed value.