common

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddContractVar

func AddContractVar(cmd *cobra.Command)

AddContractVar adds contract variable for specified command.

func MustAddress2Bytes20

func MustAddress2Bytes20(address string) [20]byte

MustAddress2Bytes20 converts address in HEX format to [20]byte.

func MustCall

func MustCall(contract *sdk.Contract, resultPtr interface{}, method string, args ...interface{})

MustCall call contract for the specified method and arguments.

func MustCallAddress

func MustCallAddress(contract *sdk.Contract, method string, args ...interface{}) string

MustCallAddress call contract and return address value for the specified method and arguments.

func MustCreateContract

func MustCreateContract(abiJSON string) *sdk.Contract

MustCreateContract creates an instance to interact with contract.

func MustExecuteTx

func MustExecuteTx(contract *sdk.Contract, option *types.ContractMethodSendOption, method string, args ...interface{}) string

MustExecuteTx call contract and wait for the succeeded receipt.

Types

This section is empty.

Jump to

Keyboard shortcuts

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