common

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 12 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.

func MustGetCTokenContract added in v1.0.4

func MustGetCTokenContract(contractAddress string) *sdk.Contract

func MustGetContract added in v1.0.4

func MustGetContract(abiJSON string, contractAddress string) *sdk.Contract

MustGetContract creates an instance to interact with contract at contractAddress.

Types

This section is empty.

Jump to

Keyboard shortcuts

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