types

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "contract"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey is the msg router key for the IBC module
	RouterKey string = ModuleName
)
View Source
const (
	QuerySimulation = "simulation"
)

Variables

View Source
var (
	ErrFailedContractHandle = sdkerrors.Register(ModuleName, 2, "failed to execute contract handler")
	ErrFailedCommitStore    = sdkerrors.Register(ModuleName, 3, "failed to commit updates")
)
View Source
var ModuleCdc = codec.New()

ModuleCdc is the codec for the module

Functions

func EncodeContractSignature

func EncodeContractSignature(c ContractCallInfo) ([]byte, error)

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on the Amino codec

Types

type ContractCallInfo

type ContractCallInfo struct {
	ID     string   `json:"id"`
	Method string   `json:"method"`
	Args   [][]byte `json:"args"`
}

func DecodeContractSignature

func DecodeContractSignature(bz []byte) (*ContractCallInfo, error)

func NewContractCallInfo

func NewContractCallInfo(id, method string, args [][]byte) ContractCallInfo

func (ContractCallInfo) Bytes

func (ci ContractCallInfo) Bytes() []byte

type ContractCallResponse

type ContractCallResponse struct {
	ReturnValue []byte    `json:"return_value"`
	OPs         cross.OPs `json:"ops"`
}

type ContractHandlerResult

type ContractHandlerResult struct {
	Data   []byte
	Events sdk.Events
}

func NewContractHandlerResult

func NewContractHandlerResult(data []byte, events sdk.Events) ContractHandlerResult

func (ContractHandlerResult) GetData

func (r ContractHandlerResult) GetData() []byte

func (ContractHandlerResult) GetEvents

func (r ContractHandlerResult) GetEvents() sdk.Events

type MsgContractCall

type MsgContractCall struct {
	Sender   sdk.AccAddress   `json:"sender" yaml:"sender"`
	Signers  []sdk.AccAddress `json:"signers" yaml:"signers"`
	Contract []byte           `json:"contract" yaml:"contract"`
}

func NewMsgContractCall

func NewMsgContractCall(sender sdk.AccAddress, signers []sdk.AccAddress, contract []byte) MsgContractCall

func (MsgContractCall) GetSignBytes

func (msg MsgContractCall) GetSignBytes() []byte

func (MsgContractCall) GetSigners

func (msg MsgContractCall) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg GetSigners returns the addresses that must sign the transaction. Addresses are returned in a deterministic order. Duplicate addresses will be omitted.

func (MsgContractCall) Route

func (MsgContractCall) Route() string

func (MsgContractCall) Type

func (MsgContractCall) Type() string

func (MsgContractCall) ValidateBasic

func (msg MsgContractCall) ValidateBasic() error

type QuerySimulationResponse

type QuerySimulationResponse = sdk.Result

Jump to

Keyboard shortcuts

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