chainmaker

package module
v0.0.0-...-8a1454d Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Return

func Return(err error) protogo.Response

func ReturnAccount

func ReturnAccount(acc common.Account, err error) protogo.Response

func ReturnBool

func ReturnBool(b bool, err error) protogo.Response

ReturnBool 封装返回Bool类型为Response,如果有error则忽略bool,封装error @param b @param err @return Response

func ReturnJson

func ReturnJson(obj interface{}, err error) protogo.Response

ReturnJson 封装返回对象类型为json格式到Response,如果有error则忽略对象,封装error @param obj @param err @return Response

func ReturnString

func ReturnString(str string, err error) protogo.Response

ReturnString 封装返回string类型为Response,如果有error则忽略str,封装error @param str @param err @return Response

func ReturnUint256

func ReturnUint256(num *common.SafeUint256, err error) protogo.Response

ReturnUint256 封装返回SafeUint256类型为Response,如果有error则忽略num,封装error @param num @param err @return Response

func ReturnUint8

func ReturnUint8(num uint8, err error) protogo.Response

ReturnUint8 封装返回uint8类型为Response,如果有error则忽略num,封装error @param num @param err @return Response

Types

type Address

type Address struct {
	// contains filtered or unexported fields
}

func (*Address) Bytes

func (a *Address) Bytes() []byte

func (*Address) Equal

func (a *Address) Equal(account common.Account) bool

func (*Address) IsZero

func (a *Address) IsZero() bool

func (*Address) ToString

func (a *Address) ToString() string

type SdkAdapter

type SdkAdapter struct {
	// contains filtered or unexported fields
}

func NewSdkAdapter

func NewSdkAdapter(cmsdk sdk.SDKInterface) *SdkAdapter

func (SdkAdapter) CallContract

func (s SdkAdapter) CallContract(account common.Account, method string, args []common.KeyValue) common.Response

func (SdkAdapter) CreateCompositeKey

func (s SdkAdapter) CreateCompositeKey(prefix string, data ...string) (string, error)

func (SdkAdapter) DelState

func (s SdkAdapter) DelState(key string) error

func (SdkAdapter) EmitEvent

func (s SdkAdapter) EmitEvent(topic string, data ...string) error

func (SdkAdapter) GetState

func (s SdkAdapter) GetState(key string) (value []byte, err error)

func (SdkAdapter) GetTxSender

func (s SdkAdapter) GetTxSender() (common.Account, error)

func (SdkAdapter) IsContract

func (s SdkAdapter) IsContract(account common.Account) bool

func (SdkAdapter) NewAccountFromBytes

func (s SdkAdapter) NewAccountFromBytes(b []byte) (common.Account, error)

func (SdkAdapter) NewAccountFromString

func (s SdkAdapter) NewAccountFromString(str string) (common.Account, error)

func (SdkAdapter) NewZeroAccount

func (s SdkAdapter) NewZeroAccount() common.Account

func (SdkAdapter) PutState

func (s SdkAdapter) PutState(key string, value []byte) error

Directories

Path Synopsis
example

Jump to

Keyboard shortcuts

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