github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/fvm/environment/invoker.go (about) 1 package environment 2 3 import ( 4 "github.com/onflow/cadence" 5 "github.com/onflow/cadence/runtime/sema" 6 7 "github.com/onflow/flow-go/model/flow" 8 ) 9 10 // ContractFunctionSpec specify all the information, except the function's 11 // address and arguments, needed to invoke the contract function. 12 type ContractFunctionSpec struct { 13 AddressFromChain func(flow.Chain) flow.Address 14 LocationName string 15 FunctionName string 16 ArgumentTypes []sema.Type 17 } 18 19 // ContractFunctionInvoker invokes a contract function 20 type ContractFunctionInvoker interface { 21 Invoke( 22 spec ContractFunctionSpec, 23 arguments []cadence.Value, 24 ) ( 25 cadence.Value, 26 error, 27 ) 28 }