Documentation ¶
Index ¶
- type CadenceRuntimeConstructor
- type Environment
- type ReusableCadenceRuntime
- func (reusable *ReusableCadenceRuntime) ExecuteScript(script runtime.Script, location common.Location) (cadence.Value, error)
- func (reusable *ReusableCadenceRuntime) InvokeContractFunction(contractLocation common.AddressLocation, functionName string, ...) (cadence.Value, error)
- func (reusable *ReusableCadenceRuntime) NewTransactionExecutor(script runtime.Script, location common.Location) runtime.Executor
- func (reusable *ReusableCadenceRuntime) ReadStored(address common.Address, path cadence.Path) (cadence.Value, error)
- func (reusable *ReusableCadenceRuntime) SetFvmEnvironment(fvmEnv Environment)
- type ReusableCadenceRuntimePool
- type WrappedCadenceExecutor
- type WrappedCadenceRuntime
- func (wr WrappedCadenceRuntime) ExecuteScript(s runtime.Script, c runtime.Context) (cadence.Value, error)
- func (wr WrappedCadenceRuntime) ExecuteTransaction(s runtime.Script, c runtime.Context) error
- func (wr WrappedCadenceRuntime) InvokeContractFunction(contractLocation common.AddressLocation, functionName string, ...) (cadence.Value, error)
- func (wr WrappedCadenceRuntime) NewContractFunctionExecutor(contractLocation common.AddressLocation, functionName string, ...) runtime.Executor
- func (wr WrappedCadenceRuntime) NewScriptExecutor(s runtime.Script, c runtime.Context) runtime.Executor
- func (wr WrappedCadenceRuntime) NewTransactionExecutor(s runtime.Script, c runtime.Context) runtime.Executor
- func (wr WrappedCadenceRuntime) ParseAndCheckProgram(source []byte, context runtime.Context) (*interpreter.Program, error)
- func (wr WrappedCadenceRuntime) ReadLinked(address common.Address, path cadence.Path, context runtime.Context) (cadence.Value, error)
- func (wr WrappedCadenceRuntime) ReadStored(address common.Address, path cadence.Path, context runtime.Context) (cadence.Value, error)
- func (wr WrappedCadenceRuntime) Storage(context runtime.Context) (*runtime.Storage, *interpreter.Interpreter, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CadenceRuntimeConstructor ¶ added in v0.30.0
type Environment ¶
Note: this is a subset of environment.Environment, redeclared to handle circular dependency.
type ReusableCadenceRuntime ¶
type ReusableCadenceRuntime struct { runtime.Runtime runtime.Environment // contains filtered or unexported fields }
func NewReusableCadenceRuntime ¶
func NewReusableCadenceRuntime(rt runtime.Runtime, config runtime.Config) *ReusableCadenceRuntime
func (*ReusableCadenceRuntime) ExecuteScript ¶
func (*ReusableCadenceRuntime) InvokeContractFunction ¶
func (*ReusableCadenceRuntime) NewTransactionExecutor ¶ added in v0.29.0
func (*ReusableCadenceRuntime) ReadStored ¶
func (*ReusableCadenceRuntime) SetFvmEnvironment ¶
func (reusable *ReusableCadenceRuntime) SetFvmEnvironment(fvmEnv Environment)
type ReusableCadenceRuntimePool ¶
type ReusableCadenceRuntimePool struct {
// contains filtered or unexported fields
}
func NewCustomReusableCadenceRuntimePool ¶
func NewCustomReusableCadenceRuntimePool( poolSize int, newCustomRuntime CadenceRuntimeConstructor, ) ReusableCadenceRuntimePool
func NewReusableCadenceRuntimePool ¶
func NewReusableCadenceRuntimePool( poolSize int, config runtime.Config, ) ReusableCadenceRuntimePool
func (ReusableCadenceRuntimePool) Borrow ¶
func (pool ReusableCadenceRuntimePool) Borrow( fvmEnv Environment, ) *ReusableCadenceRuntime
func (ReusableCadenceRuntimePool) Return ¶
func (pool ReusableCadenceRuntimePool) Return( reusable *ReusableCadenceRuntime, )
type WrappedCadenceExecutor ¶
func (WrappedCadenceExecutor) Execute ¶
func (we WrappedCadenceExecutor) Execute() error
func (WrappedCadenceExecutor) Preprocess ¶
func (we WrappedCadenceExecutor) Preprocess() error
type WrappedCadenceRuntime ¶
WrappedCadenceRuntime wraps cadence runtime to handle errors. Errors from cadence runtime should be handled with `errors.HandleRuntimeError` before the FVM can understand them. Handling all possible locations, where the error could be coming from, here, makes it impossible to forget to handle the error.
func (WrappedCadenceRuntime) ExecuteScript ¶
func (WrappedCadenceRuntime) ExecuteTransaction ¶
func (WrappedCadenceRuntime) InvokeContractFunction ¶
func (WrappedCadenceRuntime) NewContractFunctionExecutor ¶
func (WrappedCadenceRuntime) NewScriptExecutor ¶
func (WrappedCadenceRuntime) NewTransactionExecutor ¶
func (WrappedCadenceRuntime) ParseAndCheckProgram ¶
func (wr WrappedCadenceRuntime) ParseAndCheckProgram(source []byte, context runtime.Context) (*interpreter.Program, error)
func (WrappedCadenceRuntime) ReadLinked ¶
func (WrappedCadenceRuntime) ReadStored ¶
func (WrappedCadenceRuntime) Storage ¶
func (wr WrappedCadenceRuntime) Storage(context runtime.Context) (*runtime.Storage, *interpreter.Interpreter, error)
Click to show internal directories.
Click to hide internal directories.