morley-1.19.0: Developer tools for the Michelson Language
Safe HaskellSafe-Inferred
LanguageHaskell2010

Morley.Michelson.Runtime.RunCode

Description

Emulation of run_code.

Synopsis

Documentation

runCode :: RunCodeParameters cp epArg st -> Either (InterpretError Void) ([Operation], Value st) Source #

Emulate run_code RPC endpoint to an extent. Unlike runContract, runs the contract through the emulator directly, without doing any operations. This includes not doing the origination operation, and not applying the operations produced by the transfer.

data RunCodeParameters cp epArg st Source #

Data required for calling runCode.

Constructors

RunCodeParameters 

Fields

runCodeParameters Source #

Arguments

:: Contract cp st

Contract to run

-> Value st

Contract storage

-> EntrypointCallT cp epArg

Entrypoint call specification

-> Value epArg

Entrypoint argument

-> RunCodeParameters cp epArg st 

Construct RunCodeParameters with some reasonable defaults.

Prepare untyped storage and parameter with resolveRunCodeBigMaps.

Use mkEntrypointCall or mkDefEntrypointCall to construct the entrypoint call specification.

resolveRunCodeBigMaps :: SingI t => BigMapFinder -> Value -> Either TcError (Value t) Source #

Given an untyped value, possibly containing big_map ids, typecheck it, resolving ids to the corresponding big_maps.

BigMapFinder can be constructed using mkBigMapFinder.