Documentation
¶
Index ¶
- Constants
- Variables
- func EncodeContractCallInfo(c ContractCallInfo) ([]byte, error)
- func RegisterCodec(cdc *codec.Codec)
- type ContractCallInfo
- type ContractCallResponse
- type ContractHandlerResult
- type HTTPObject
- type HTTPResolver
- type HTTPServerInfo
- type HTTPServerRouter
- type MsgContractCall
- type QuerySimulationResponse
- type ServerRouter
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 (
ObjectTypeHTTP cross.ObjectType = 10
)
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 EncodeContractCallInfo ¶ added in v0.0.5
func EncodeContractCallInfo(c ContractCallInfo) ([]byte, error)
func RegisterCodec ¶
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 DecodeContractCallInfo ¶ added in v0.0.5
func DecodeContractCallInfo(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 ContractHandlerResult ¶
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 HTTPObject ¶ added in v0.0.5
type HTTPObject struct {
K []byte
ServerInfo *HTTPServerInfo
}
func (HTTPObject) Key ¶ added in v0.0.5
func (o HTTPObject) Key() []byte
func (HTTPObject) Type ¶ added in v0.0.5
func (HTTPObject) Type() cross.ObjectType
type HTTPResolver ¶ added in v0.0.5
type HTTPResolver struct {
Router ServerRouter
}
func NewHTTPResolver ¶ added in v0.0.5
func NewHTTPResolver(router ServerRouter) HTTPResolver
type HTTPServerInfo ¶ added in v0.0.5
type HTTPServerInfo struct {
Address string
}
type HTTPServerRouter ¶ added in v0.0.5
type HTTPServerRouter struct {
// contains filtered or unexported fields
}
func NewHTTPServerRouter ¶ added in v0.0.5
func NewHTTPServerRouter() *HTTPServerRouter
func (*HTTPServerRouter) AddRoute ¶ added in v0.0.5
func (r *HTTPServerRouter) AddRoute(id string, info HTTPServerInfo)
type MsgContractCall ¶
type MsgContractCall struct {
Sender sdk.AccAddress `json:"sender" yaml:"sender"`
Signers []sdk.AccAddress `json:"signers" yaml:"signers"`
CallInfo cross.ContractCallInfo `json:"call_info" yaml:"call_info"`
StateConstraintType cross.StateConstraintType `json:"state_constraint_type" yaml:"state_constraint_type"`
}
func NewMsgContractCall ¶
func NewMsgContractCall(sender sdk.AccAddress, signers []sdk.AccAddress, callInfo cross.ContractCallInfo, scType cross.StateConstraintType) 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 ¶
Click to show internal directories.
Click to hide internal directories.