utils

package
v1.8.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: LGPL-3.0 Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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.8.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.8.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 byte) *types.MutableTransaction

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