utils

package
v1.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2024 License: LGPL-3.0 Imports: 12 Imported by: 38

Documentation

Index

Constants

View Source
const NATIVE_INVOKE_NAME = "Ontology.Native.Invoke" // copy from smartcontract/service/neovm/config.go to avoid cycle dependences

Variables

This section is empty.

Functions

func BuildNativeInvokeCode added in v1.6.0

func BuildNativeInvokeCode(contractAddress common.Address, version byte, method string, params []interface{}) ([]byte, error)

func BuildNativeTransaction

func BuildNativeTransaction(addr common.Address, initMethod string, args []byte) *types.MutableTransaction

func BuildNeoVMInvokeCode added in v1.8.0

func BuildNeoVMInvokeCode(smartContractAddress common.Address, params []interface{}) ([]byte, error)

BuildNeoVMInvokeCode build NeoVM Invoke code for params

func BuildNeoVMParam added in v1.6.0

func BuildNeoVMParam(builder *vm.ParamsBuilder, smartContractParams []interface{}) error

buildNeoVMParamInter build neovm invoke param code

func BuildWasmContractParam added in v1.8.0

func BuildWasmContractParam(params []interface{}) ([]byte, error)

build param bytes for wasm contract

func BuildWasmVMInvokeCode added in v1.8.0

func BuildWasmVMInvokeCode(contractAddress common.Address, params []interface{}) ([]byte, error)

build param bytes for wasm contract

func NewDeployTransaction

func NewDeployTransaction(code []byte, name, version, author, email, desp string, vmType payload.VmType) (*types.MutableTransaction, error)

NewDeployTransaction returns a deploy Transaction

func NewInvokeTransaction

func NewInvokeTransaction(code []byte) *types.MutableTransaction

NewInvokeTransaction returns an invoke Transaction

func NewWasmSmartContractTransaction added in v1.8.0

func NewWasmSmartContractTransaction(gasPrice, gasLimit uint64, invokeCode []byte) (*types.MutableTransaction, error)

func NewWasmVMInvokeTransaction added in v1.8.0

func NewWasmVMInvokeTransaction(gasPrice, gasLimit uint64, contractAddress common.Address, params []interface{}) (*types.MutableTransaction, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL