types

package
v1.0.0-rc06 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	// ModuleName is the module name.
	ModuleName = "callback"
	// StoreKey is the module KV storage prefix key.
	StoreKey = ModuleName
	// QuerierRoute is the querier route for the module.
	QuerierRoute = ModuleName
)

Variables

View Source
var (
	ErrInvalidLengthCallback        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCallback          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCallback = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	DefaultCodespace                = ModuleName
	ErrContractNotFound             = errorsmod.Register(DefaultCodespace, 2, "contract with given address not found")
	ErrCallbackJobIDExists          = errorsmod.Register(DefaultCodespace, 3, "callback with given job id already exists for given height")
	ErrCallbackHeightNotInFuture    = errorsmod.Register(DefaultCodespace, 4, "callback request height is not in the future")
	ErrUnauthorized                 = errorsmod.Register(DefaultCodespace, 5, "sender not authorized to register callback")
	ErrCallbackNotFound             = errorsmod.Register(DefaultCodespace, 6, "callback with given job id does not exist for given height")
	ErrInsufficientFees             = errorsmod.Register(DefaultCodespace, 7, "insufficient fees to register callback")
	ErrCallbackExists               = errorsmod.Register(DefaultCodespace, 8, "callback with given job id already exists for given height")
	ErrCallbackHeightTooFarInFuture = errorsmod.Register(DefaultCodespace, 9, "callback request height is too far in the future")
	ErrBlockFilled                  = errorsmod.Register(DefaultCodespace, 10, "block filled with max capacity of callbacks")
)
View Source
var (
	ErrInvalidLengthEvents        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEvents          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEvents = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ParamsKeyPrefix   = collections.NewPrefix(1)
	CallbackKeyPrefix = collections.NewPrefix(2)
)
View Source
var (
	DefaultCallbackGasLimit               = uint64(1000000)
	DefaultMaxBlockReservationLimit       = uint64(3)
	DefaultMaxFutureReservationLimit      = uint64(10000)
	DefaultBlockReservationFeeMultiplier  = sdk.ZeroDec()
	DefaultFutureReservationFeeMultiplier = sdk.ZeroDec()
	DefaultMinPriceOfGas                  = sdk.NewCoin(sdk.DefaultBondDenom, sdk.ZeroInt())
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)
View Source
var ModuleErrors_name = map[int32]string{
	0: "ERR_UNKNOWN",
	1: "ERR_OUT_OF_GAS",
	2: "ERR_CONTRACT_EXECUTION_FAILED",
}
View Source
var ModuleErrors_value = map[string]int32{
	"ERR_UNKNOWN":                   0,
	"ERR_OUT_OF_GAS":                1,
	"ERR_CONTRACT_EXECUTION_FAILED": 2,
}

Functions

func EmitCallbackCancelledEvent

func EmitCallbackCancelledEvent(
	ctx sdk.Context,
	contractAddress string,
	jobId uint64,
	callbackHeight int64,
	cancelledBy string,
	refundAmount sdk.Coin,
)

func EmitCallbackExecutedFailedEvent

func EmitCallbackExecutedFailedEvent(
	ctx sdk.Context,
	contractAddress string,
	jobId uint64,
	sudoMsg string,
	gasUsed uint64,
	errMsg string,
)

func EmitCallbackExecutedSuccessEvent

func EmitCallbackExecutedSuccessEvent(
	ctx sdk.Context,
	contractAddress string,
	jobId uint64,
	sudoMsg string,
	gasUsed uint64,
)

func EmitCallbackRegisteredEvent

func EmitCallbackRegisteredEvent(
	ctx sdk.Context,
	contractAddress string,
	jobId uint64,
	callbackHeight int64,
	feeSplit *CallbackFeesFeeSplit,
	reservedBy string,
)

func NewSudoError

func NewSudoError(errorCode ModuleErrors, contractAddr string, inputPayload string, errMsg string) cwerrortypes.SudoError

NewSudoError creates a new sudo error instance to pass on to the errors module

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces registers interfaces types with the interface registry.

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type BankKeeperExpected

type BankKeeperExpected interface {
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
	BlockedAddr(addr sdk.AccAddress) bool
}

type Callback

type Callback struct {
	// contract_address is the address of the contract which is requesting the callback (bech32 encoded).
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// job_id is an identifier the callback requestor can pass in to identify the callback when it happens.
	JobId uint64 `protobuf:"varint,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// callback_height is the height at which the callback is executed.
	CallbackHeight int64 `protobuf:"varint,3,opt,name=callback_height,json=callbackHeight,proto3" json:"callback_height,omitempty"`
	// fee_split is the breakdown of the fees paid by the contract to reserve the callback
	FeeSplit *CallbackFeesFeeSplit `protobuf:"bytes,4,opt,name=fee_split,json=feeSplit,proto3" json:"fee_split,omitempty"`
	// reserved_by is the address which reserved the callback (bech32 encoded).
	ReservedBy string `protobuf:"bytes,5,opt,name=reserved_by,json=reservedBy,proto3" json:"reserved_by,omitempty"`
	// callback_gas_limit is the maximum gas that can be consumed by this callback.
	MaxGasLimit uint64 `protobuf:"varint,6,opt,name=max_gas_limit,json=maxGasLimit,proto3" json:"max_gas_limit,omitempty"`
}

Callback defines the callback structure.

func NewCallback

func NewCallback(sender string, contractAddress string, height int64, jobID uint64, txFees sdk.Coin, blockReservationFees sdk.Coin, futureReservationFees sdk.Coin, surplusFees sdk.Coin) Callback

NewCallback creates a new Callback instance.

func (*Callback) Descriptor

func (*Callback) Descriptor() ([]byte, []int)

func (*Callback) GetCallbackHeight

func (m *Callback) GetCallbackHeight() int64

func (*Callback) GetContractAddress

func (m *Callback) GetContractAddress() string

func (*Callback) GetFeeSplit

func (m *Callback) GetFeeSplit() *CallbackFeesFeeSplit

func (*Callback) GetJobId

func (m *Callback) GetJobId() uint64

func (*Callback) GetMaxGasLimit

func (m *Callback) GetMaxGasLimit() uint64

func (*Callback) GetReservedBy

func (m *Callback) GetReservedBy() string

func (*Callback) Marshal

func (m *Callback) Marshal() (dAtA []byte, err error)

func (*Callback) MarshalTo

func (m *Callback) MarshalTo(dAtA []byte) (int, error)

func (*Callback) MarshalToSizedBuffer

func (m *Callback) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Callback) ProtoMessage

func (*Callback) ProtoMessage()

func (*Callback) Reset

func (m *Callback) Reset()

func (*Callback) Size

func (m *Callback) Size() (n int)

func (*Callback) String

func (m *Callback) String() string

func (*Callback) Unmarshal

func (m *Callback) Unmarshal(dAtA []byte) error

func (Callback) Validate

func (c Callback) Validate() error

Validate perform object fields validation.

func (*Callback) XXX_DiscardUnknown

func (m *Callback) XXX_DiscardUnknown()

func (*Callback) XXX_Marshal

func (m *Callback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Callback) XXX_Merge

func (m *Callback) XXX_Merge(src proto.Message)

func (*Callback) XXX_Size

func (m *Callback) XXX_Size() int

func (*Callback) XXX_Unmarshal

func (m *Callback) XXX_Unmarshal(b []byte) error

type CallbackCancelledEvent

type CallbackCancelledEvent struct {
	// cancelled_by is the address of the contract whose callback is being cancelled (bech32 encoded)
	CancelledBy string `protobuf:"bytes,1,opt,name=cancelled_by,json=cancelledBy,proto3" json:"cancelled_by,omitempty"`
	// contract_address is the address of the contract (bech32 encoded)
	ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// job_id is an identifier the callback requestor had passed during registration of the callback
	JobId uint64 `protobuf:"varint,3,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// callback_height is the height at which the callback requestor had registered the callback
	CallbackHeight int64 `protobuf:"varint,4,opt,name=callback_height,json=callbackHeight,proto3" json:"callback_height,omitempty"`
	// refund_amount is the amount of fees which was refunded on cancellation
	RefundAmount types.Coin `protobuf:"bytes,5,opt,name=refund_amount,json=refundAmount,proto3" json:"refund_amount"`
}

CallbackCancelledEvent is emitted when a callback is cancelled.

func (*CallbackCancelledEvent) Descriptor

func (*CallbackCancelledEvent) Descriptor() ([]byte, []int)

func (*CallbackCancelledEvent) GetCallbackHeight

func (m *CallbackCancelledEvent) GetCallbackHeight() int64

func (*CallbackCancelledEvent) GetCancelledBy

func (m *CallbackCancelledEvent) GetCancelledBy() string

func (*CallbackCancelledEvent) GetContractAddress

func (m *CallbackCancelledEvent) GetContractAddress() string

func (*CallbackCancelledEvent) GetJobId

func (m *CallbackCancelledEvent) GetJobId() uint64

func (*CallbackCancelledEvent) GetRefundAmount

func (m *CallbackCancelledEvent) GetRefundAmount() types.Coin

func (*CallbackCancelledEvent) Marshal

func (m *CallbackCancelledEvent) Marshal() (dAtA []byte, err error)

func (*CallbackCancelledEvent) MarshalTo

func (m *CallbackCancelledEvent) MarshalTo(dAtA []byte) (int, error)

func (*CallbackCancelledEvent) MarshalToSizedBuffer

func (m *CallbackCancelledEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CallbackCancelledEvent) ProtoMessage

func (*CallbackCancelledEvent) ProtoMessage()

func (*CallbackCancelledEvent) Reset

func (m *CallbackCancelledEvent) Reset()

func (*CallbackCancelledEvent) Size

func (m *CallbackCancelledEvent) Size() (n int)

func (*CallbackCancelledEvent) String

func (m *CallbackCancelledEvent) String() string

func (*CallbackCancelledEvent) Unmarshal

func (m *CallbackCancelledEvent) Unmarshal(dAtA []byte) error

func (*CallbackCancelledEvent) XXX_DiscardUnknown

func (m *CallbackCancelledEvent) XXX_DiscardUnknown()

func (*CallbackCancelledEvent) XXX_Marshal

func (m *CallbackCancelledEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CallbackCancelledEvent) XXX_Merge

func (m *CallbackCancelledEvent) XXX_Merge(src proto.Message)

func (*CallbackCancelledEvent) XXX_Size

func (m *CallbackCancelledEvent) XXX_Size() int

func (*CallbackCancelledEvent) XXX_Unmarshal

func (m *CallbackCancelledEvent) XXX_Unmarshal(b []byte) error

type CallbackExecutedFailedEvent

type CallbackExecutedFailedEvent struct {
	// contract_address is the address of the contract for which callback is being executed (bech32 encoded).
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// job_id is an identifier of the callback.
	JobId uint64 `protobuf:"varint,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// sudo_msg is the input passed by the module to the contract
	SudoMsg string `protobuf:"bytes,3,opt,name=sudo_msg,json=sudoMsg,proto3" json:"sudo_msg,omitempty"`
	// gas_used is the amount of gas consumed during the callback execution
	GasUsed uint64 `protobuf:"varint,4,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"`
	// error is the error returned during the callback execution
	Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"`
}

CallbackExecutedFailedEvent is emitted when a callback execution fails.

func (*CallbackExecutedFailedEvent) Descriptor

func (*CallbackExecutedFailedEvent) Descriptor() ([]byte, []int)

func (*CallbackExecutedFailedEvent) GetContractAddress

func (m *CallbackExecutedFailedEvent) GetContractAddress() string

func (*CallbackExecutedFailedEvent) GetError

func (m *CallbackExecutedFailedEvent) GetError() string

func (*CallbackExecutedFailedEvent) GetGasUsed

func (m *CallbackExecutedFailedEvent) GetGasUsed() uint64

func (*CallbackExecutedFailedEvent) GetJobId

func (m *CallbackExecutedFailedEvent) GetJobId() uint64

func (*CallbackExecutedFailedEvent) GetSudoMsg

func (m *CallbackExecutedFailedEvent) GetSudoMsg() string

func (*CallbackExecutedFailedEvent) Marshal

func (m *CallbackExecutedFailedEvent) Marshal() (dAtA []byte, err error)

func (*CallbackExecutedFailedEvent) MarshalTo

func (m *CallbackExecutedFailedEvent) MarshalTo(dAtA []byte) (int, error)

func (*CallbackExecutedFailedEvent) MarshalToSizedBuffer

func (m *CallbackExecutedFailedEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CallbackExecutedFailedEvent) ProtoMessage

func (*CallbackExecutedFailedEvent) ProtoMessage()

func (*CallbackExecutedFailedEvent) Reset

func (m *CallbackExecutedFailedEvent) Reset()

func (*CallbackExecutedFailedEvent) Size

func (m *CallbackExecutedFailedEvent) Size() (n int)

func (*CallbackExecutedFailedEvent) String

func (m *CallbackExecutedFailedEvent) String() string

func (*CallbackExecutedFailedEvent) Unmarshal

func (m *CallbackExecutedFailedEvent) Unmarshal(dAtA []byte) error

func (*CallbackExecutedFailedEvent) XXX_DiscardUnknown

func (m *CallbackExecutedFailedEvent) XXX_DiscardUnknown()

func (*CallbackExecutedFailedEvent) XXX_Marshal

func (m *CallbackExecutedFailedEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CallbackExecutedFailedEvent) XXX_Merge

func (m *CallbackExecutedFailedEvent) XXX_Merge(src proto.Message)

func (*CallbackExecutedFailedEvent) XXX_Size

func (m *CallbackExecutedFailedEvent) XXX_Size() int

func (*CallbackExecutedFailedEvent) XXX_Unmarshal

func (m *CallbackExecutedFailedEvent) XXX_Unmarshal(b []byte) error

type CallbackExecutedSuccessEvent

type CallbackExecutedSuccessEvent struct {
	// contract_address is the address of the contract for which callback is being executed (bech32 encoded).
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// job_id is an identifier of the callback.
	JobId uint64 `protobuf:"varint,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// sudo_msg is the input passed by the module to the contract
	SudoMsg string `protobuf:"bytes,3,opt,name=sudo_msg,json=sudoMsg,proto3" json:"sudo_msg,omitempty"`
	// gas_used is the amount of gas consumed during the callback execution
	GasUsed uint64 `protobuf:"varint,4,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"`
}

CallbackExecutedSuccessEvent is emitted when a callback is executed successfully.

func (*CallbackExecutedSuccessEvent) Descriptor

func (*CallbackExecutedSuccessEvent) Descriptor() ([]byte, []int)

func (*CallbackExecutedSuccessEvent) GetContractAddress

func (m *CallbackExecutedSuccessEvent) GetContractAddress() string

func (*CallbackExecutedSuccessEvent) GetGasUsed

func (m *CallbackExecutedSuccessEvent) GetGasUsed() uint64

func (*CallbackExecutedSuccessEvent) GetJobId

func (m *CallbackExecutedSuccessEvent) GetJobId() uint64

func (*CallbackExecutedSuccessEvent) GetSudoMsg

func (m *CallbackExecutedSuccessEvent) GetSudoMsg() string

func (*CallbackExecutedSuccessEvent) Marshal

func (m *CallbackExecutedSuccessEvent) Marshal() (dAtA []byte, err error)

func (*CallbackExecutedSuccessEvent) MarshalTo

func (m *CallbackExecutedSuccessEvent) MarshalTo(dAtA []byte) (int, error)

func (*CallbackExecutedSuccessEvent) MarshalToSizedBuffer

func (m *CallbackExecutedSuccessEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CallbackExecutedSuccessEvent) ProtoMessage

func (*CallbackExecutedSuccessEvent) ProtoMessage()

func (*CallbackExecutedSuccessEvent) Reset

func (m *CallbackExecutedSuccessEvent) Reset()

func (*CallbackExecutedSuccessEvent) Size

func (m *CallbackExecutedSuccessEvent) Size() (n int)

func (*CallbackExecutedSuccessEvent) String

func (*CallbackExecutedSuccessEvent) Unmarshal

func (m *CallbackExecutedSuccessEvent) Unmarshal(dAtA []byte) error

func (*CallbackExecutedSuccessEvent) XXX_DiscardUnknown

func (m *CallbackExecutedSuccessEvent) XXX_DiscardUnknown()

func (*CallbackExecutedSuccessEvent) XXX_Marshal

func (m *CallbackExecutedSuccessEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CallbackExecutedSuccessEvent) XXX_Merge

func (m *CallbackExecutedSuccessEvent) XXX_Merge(src proto.Message)

func (*CallbackExecutedSuccessEvent) XXX_Size

func (m *CallbackExecutedSuccessEvent) XXX_Size() int

func (*CallbackExecutedSuccessEvent) XXX_Unmarshal

func (m *CallbackExecutedSuccessEvent) XXX_Unmarshal(b []byte) error

type CallbackFeesFeeSplit

type CallbackFeesFeeSplit struct {
	// transaction_fees is the transaction fees for the callback based on its gas consumption
	TransactionFees *types.Coin `protobuf:"bytes,1,opt,name=transaction_fees,json=transactionFees,proto3" json:"transaction_fees,omitempty"`
	// block_reservation_fees is the block reservation fees portion of the callback reservation fees
	BlockReservationFees *types.Coin `protobuf:"bytes,2,opt,name=block_reservation_fees,json=blockReservationFees,proto3" json:"block_reservation_fees,omitempty"`
	// future_reservation_fees is the future reservation fees portion of the callback reservation fees
	FutureReservationFees *types.Coin `` /* 126-byte string literal not displayed */
	// surplus_fees is any extra fees passed in for the registration of the callback
	SurplusFees *types.Coin `protobuf:"bytes,4,opt,name=surplus_fees,json=surplusFees,proto3" json:"surplus_fees,omitempty"`
}

CallbackFeesFeeSplit is the breakdown of all the fees that need to be paid by the contract to reserve a callback

func (*CallbackFeesFeeSplit) Descriptor

func (*CallbackFeesFeeSplit) Descriptor() ([]byte, []int)

func (*CallbackFeesFeeSplit) GetBlockReservationFees

func (m *CallbackFeesFeeSplit) GetBlockReservationFees() *types.Coin

func (*CallbackFeesFeeSplit) GetFutureReservationFees

func (m *CallbackFeesFeeSplit) GetFutureReservationFees() *types.Coin

func (*CallbackFeesFeeSplit) GetSurplusFees

func (m *CallbackFeesFeeSplit) GetSurplusFees() *types.Coin

func (*CallbackFeesFeeSplit) GetTransactionFees

func (m *CallbackFeesFeeSplit) GetTransactionFees() *types.Coin

func (*CallbackFeesFeeSplit) Marshal

func (m *CallbackFeesFeeSplit) Marshal() (dAtA []byte, err error)

func (*CallbackFeesFeeSplit) MarshalTo

func (m *CallbackFeesFeeSplit) MarshalTo(dAtA []byte) (int, error)

func (*CallbackFeesFeeSplit) MarshalToSizedBuffer

func (m *CallbackFeesFeeSplit) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CallbackFeesFeeSplit) ProtoMessage

func (*CallbackFeesFeeSplit) ProtoMessage()

func (*CallbackFeesFeeSplit) Reset

func (m *CallbackFeesFeeSplit) Reset()

func (*CallbackFeesFeeSplit) Size

func (m *CallbackFeesFeeSplit) Size() (n int)

func (*CallbackFeesFeeSplit) String

func (m *CallbackFeesFeeSplit) String() string

func (*CallbackFeesFeeSplit) Unmarshal

func (m *CallbackFeesFeeSplit) Unmarshal(dAtA []byte) error

func (*CallbackFeesFeeSplit) XXX_DiscardUnknown

func (m *CallbackFeesFeeSplit) XXX_DiscardUnknown()

func (*CallbackFeesFeeSplit) XXX_Marshal

func (m *CallbackFeesFeeSplit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CallbackFeesFeeSplit) XXX_Merge

func (m *CallbackFeesFeeSplit) XXX_Merge(src proto.Message)

func (*CallbackFeesFeeSplit) XXX_Size

func (m *CallbackFeesFeeSplit) XXX_Size() int

func (*CallbackFeesFeeSplit) XXX_Unmarshal

func (m *CallbackFeesFeeSplit) XXX_Unmarshal(b []byte) error

type CallbackMsg

type CallbackMsg struct {
	// JobID is the user specified job id
	JobID uint64 `json:"job_id"`
}

CallbackMsg is the callback message sent to a contract.

type CallbackRegisteredEvent

type CallbackRegisteredEvent struct {
	// contract_address is the address of the contract for which callback is being registered (bech32 encoded).
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// job_id is an identifier of the callback.
	JobId uint64 `protobuf:"varint,2,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// callback_height is the height at which the callback is executed.
	CallbackHeight int64 `protobuf:"varint,3,opt,name=callback_height,json=callbackHeight,proto3" json:"callback_height,omitempty"`
	// fee_split is the breakdown of the fees paid by the contract to reserve the callback
	FeeSplit *CallbackFeesFeeSplit `protobuf:"bytes,4,opt,name=fee_split,json=feeSplit,proto3" json:"fee_split,omitempty"`
	// reserved_by is the address which reserved the callback (bech32 encoded).
	ReservedBy string `protobuf:"bytes,5,opt,name=reserved_by,json=reservedBy,proto3" json:"reserved_by,omitempty"`
}

CallbackRegisteredEvent is emitted when a callback is registered.

func (*CallbackRegisteredEvent) Descriptor

func (*CallbackRegisteredEvent) Descriptor() ([]byte, []int)

func (*CallbackRegisteredEvent) GetCallbackHeight

func (m *CallbackRegisteredEvent) GetCallbackHeight() int64

func (*CallbackRegisteredEvent) GetContractAddress

func (m *CallbackRegisteredEvent) GetContractAddress() string

func (*CallbackRegisteredEvent) GetFeeSplit

func (*CallbackRegisteredEvent) GetJobId

func (m *CallbackRegisteredEvent) GetJobId() uint64

func (*CallbackRegisteredEvent) GetReservedBy

func (m *CallbackRegisteredEvent) GetReservedBy() string

func (*CallbackRegisteredEvent) Marshal

func (m *CallbackRegisteredEvent) Marshal() (dAtA []byte, err error)

func (*CallbackRegisteredEvent) MarshalTo

func (m *CallbackRegisteredEvent) MarshalTo(dAtA []byte) (int, error)

func (*CallbackRegisteredEvent) MarshalToSizedBuffer

func (m *CallbackRegisteredEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CallbackRegisteredEvent) ProtoMessage

func (*CallbackRegisteredEvent) ProtoMessage()

func (*CallbackRegisteredEvent) Reset

func (m *CallbackRegisteredEvent) Reset()

func (*CallbackRegisteredEvent) Size

func (m *CallbackRegisteredEvent) Size() (n int)

func (*CallbackRegisteredEvent) String

func (m *CallbackRegisteredEvent) String() string

func (*CallbackRegisteredEvent) Unmarshal

func (m *CallbackRegisteredEvent) Unmarshal(dAtA []byte) error

func (*CallbackRegisteredEvent) XXX_DiscardUnknown

func (m *CallbackRegisteredEvent) XXX_DiscardUnknown()

func (*CallbackRegisteredEvent) XXX_Marshal

func (m *CallbackRegisteredEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CallbackRegisteredEvent) XXX_Merge

func (m *CallbackRegisteredEvent) XXX_Merge(src proto.Message)

func (*CallbackRegisteredEvent) XXX_Size

func (m *CallbackRegisteredEvent) XXX_Size() int

func (*CallbackRegisteredEvent) XXX_Unmarshal

func (m *CallbackRegisteredEvent) XXX_Unmarshal(b []byte) error

type ErrorsKeeperExpected

type ErrorsKeeperExpected interface {
	SetError(ctx sdk.Context, sudoErr cwerrortypes.SudoError) error
}

type GenesisState

type GenesisState struct {
	// params defines all the module parameters.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// callbacks defines all the callbacks which are yet to be executed
	Callbacks []*Callback `protobuf:"bytes,2,rep,name=callbacks,proto3" json:"callbacks,omitempty"`
}

GenesisState defines the initial state of the callback module.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesisState returns a default genesis state.

func NewGenesisState

func NewGenesisState(
	params Params,
	callbacks []Callback,
) *GenesisState

NewGenesisState creates a new GenesisState object.

func (*GenesisState) Descriptor

func (*GenesisState) Descriptor() ([]byte, []int)

func (*GenesisState) GetCallbacks

func (m *GenesisState) GetCallbacks() []*Callback

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) Marshal

func (m *GenesisState) Marshal() (dAtA []byte, err error)

func (*GenesisState) MarshalTo

func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)

func (*GenesisState) MarshalToSizedBuffer

func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

func (m *GenesisState) Size() (n int)

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

func (m *GenesisState) Unmarshal(dAtA []byte) error

func (GenesisState) Validate

func (g GenesisState) Validate() error

Validate perform object fields validation.

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GenesisState) XXX_Merge

func (m *GenesisState) XXX_Merge(src proto.Message)

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

func (m *GenesisState) XXX_Unmarshal(b []byte) error

type ModuleErrors

type ModuleErrors int32

ModuleErrors defines the module level error codes

const (
	// ERR_UNKNOWN is the default error code
	ModuleErrors_ERR_UNKNOWN ModuleErrors = 0
	// ERR_OUT_OF_GAS is the error code when the contract callback exceeds the gas limit allowed by the module
	ModuleErrors_ERR_OUT_OF_GAS ModuleErrors = 1
	// ERR_CONTRACT_EXECUTION_FAILED is the error code when the contract callback execution fails
	ModuleErrors_ERR_CONTRACT_EXECUTION_FAILED ModuleErrors = 2
)

func (ModuleErrors) EnumDescriptor

func (ModuleErrors) EnumDescriptor() ([]byte, []int)

func (ModuleErrors) String

func (x ModuleErrors) String() string

type MsgCancelCallback

type MsgCancelCallback struct {
	// sender is the address of the contract which is cancelling the callback (bech32 encoded)
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// contract_address is the address of the contract (bech32 encoded)
	ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// job_id is an identifier the callback requestor had passed during registration of the callback
	JobId uint64 `protobuf:"varint,3,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// callback_height is the height at which the callback requestor had registered the callback
	CallbackHeight int64 `protobuf:"varint,4,opt,name=callback_height,json=callbackHeight,proto3" json:"callback_height,omitempty"`
}

MsgCancelCallback is the Msg/CancelCallback request type.

func NewMsgCancelCallback

func NewMsgCancelCallback(
	senderAddr sdk.AccAddress,
	contractAddr sdk.AccAddress,
	jobId uint64,
	callbackHeight int64,
) *MsgCancelCallback

NewMsgCancelCallback creates a new MsgCancelCallback instance.

func (*MsgCancelCallback) Descriptor

func (*MsgCancelCallback) Descriptor() ([]byte, []int)

func (*MsgCancelCallback) GetCallbackHeight

func (m *MsgCancelCallback) GetCallbackHeight() int64

func (*MsgCancelCallback) GetContractAddress

func (m *MsgCancelCallback) GetContractAddress() string

func (*MsgCancelCallback) GetJobId

func (m *MsgCancelCallback) GetJobId() uint64

func (*MsgCancelCallback) GetSender

func (m *MsgCancelCallback) GetSender() string

func (MsgCancelCallback) GetSigners

func (m MsgCancelCallback) GetSigners() []sdk.AccAddress

GetSigners implements the sdk.Msg interface.

func (*MsgCancelCallback) Marshal

func (m *MsgCancelCallback) Marshal() (dAtA []byte, err error)

func (*MsgCancelCallback) MarshalTo

func (m *MsgCancelCallback) MarshalTo(dAtA []byte) (int, error)

func (*MsgCancelCallback) MarshalToSizedBuffer

func (m *MsgCancelCallback) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCancelCallback) ProtoMessage

func (*MsgCancelCallback) ProtoMessage()

func (*MsgCancelCallback) Reset

func (m *MsgCancelCallback) Reset()

func (*MsgCancelCallback) Size

func (m *MsgCancelCallback) Size() (n int)

func (*MsgCancelCallback) String

func (m *MsgCancelCallback) String() string

func (*MsgCancelCallback) Unmarshal

func (m *MsgCancelCallback) Unmarshal(dAtA []byte) error

func (MsgCancelCallback) ValidateBasic

func (m MsgCancelCallback) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgCancelCallback) XXX_DiscardUnknown

func (m *MsgCancelCallback) XXX_DiscardUnknown()

func (*MsgCancelCallback) XXX_Marshal

func (m *MsgCancelCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCancelCallback) XXX_Merge

func (m *MsgCancelCallback) XXX_Merge(src proto.Message)

func (*MsgCancelCallback) XXX_Size

func (m *MsgCancelCallback) XXX_Size() int

func (*MsgCancelCallback) XXX_Unmarshal

func (m *MsgCancelCallback) XXX_Unmarshal(b []byte) error

type MsgCancelCallbackResponse

type MsgCancelCallbackResponse struct {
	// refund is the amount of fees being refunded due to the cancellation of the callback
	Refund types.Coin `protobuf:"bytes,1,opt,name=refund,proto3" json:"refund"`
}

MsgCancelCallbackResponse defines the response structure for executing a MsgCancelCallback message.

func (*MsgCancelCallbackResponse) Descriptor

func (*MsgCancelCallbackResponse) Descriptor() ([]byte, []int)

func (*MsgCancelCallbackResponse) GetRefund

func (m *MsgCancelCallbackResponse) GetRefund() types.Coin

func (*MsgCancelCallbackResponse) Marshal

func (m *MsgCancelCallbackResponse) Marshal() (dAtA []byte, err error)

func (*MsgCancelCallbackResponse) MarshalTo

func (m *MsgCancelCallbackResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgCancelCallbackResponse) MarshalToSizedBuffer

func (m *MsgCancelCallbackResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCancelCallbackResponse) ProtoMessage

func (*MsgCancelCallbackResponse) ProtoMessage()

func (*MsgCancelCallbackResponse) Reset

func (m *MsgCancelCallbackResponse) Reset()

func (*MsgCancelCallbackResponse) Size

func (m *MsgCancelCallbackResponse) Size() (n int)

func (*MsgCancelCallbackResponse) String

func (m *MsgCancelCallbackResponse) String() string

func (*MsgCancelCallbackResponse) Unmarshal

func (m *MsgCancelCallbackResponse) Unmarshal(dAtA []byte) error

func (*MsgCancelCallbackResponse) XXX_DiscardUnknown

func (m *MsgCancelCallbackResponse) XXX_DiscardUnknown()

func (*MsgCancelCallbackResponse) XXX_Marshal

func (m *MsgCancelCallbackResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCancelCallbackResponse) XXX_Merge

func (m *MsgCancelCallbackResponse) XXX_Merge(src proto.Message)

func (*MsgCancelCallbackResponse) XXX_Size

func (m *MsgCancelCallbackResponse) XXX_Size() int

func (*MsgCancelCallbackResponse) XXX_Unmarshal

func (m *MsgCancelCallbackResponse) XXX_Unmarshal(b []byte) error

type MsgClient

type MsgClient interface {
	// RequestCallback defines a message for registering a callback at a specific height by a given contract
	RequestCallback(ctx context.Context, in *MsgRequestCallback, opts ...grpc.CallOption) (*MsgRequestCallbackResponse, error)
	// CancelCallback defines a message for cancelling an existing callback
	CancelCallback(ctx context.Context, in *MsgCancelCallback, opts ...grpc.CallOption) (*MsgCancelCallbackResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgRequestCallback

type MsgRequestCallback struct {
	// sender is the address who is requesting the callback (bech32 encoded)
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// contract_address is the address of the contract which is requesting the callback (bech32 encoded)
	ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// job_id is an identifier the callback requestor can pass in to identify the callback when it happens
	JobId uint64 `protobuf:"varint,3,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"`
	// callback_height is the height at which the callback is executed.
	CallbackHeight int64 `protobuf:"varint,4,opt,name=callback_height,json=callbackHeight,proto3" json:"callback_height,omitempty"`
	// fees is the amount of fees being paid to register the contract
	Fees types.Coin `protobuf:"bytes,5,opt,name=fees,proto3" json:"fees"`
}

MsgRequestCallback is the Msg/RequestCallback request type.

func NewMsgRequestCallback

func NewMsgRequestCallback(
	senderAddr sdk.AccAddress,
	contractAddr sdk.AccAddress,
	jobId uint64,
	callbackHeight int64,
	fees sdk.Coin,
) *MsgRequestCallback

NewMsgRequestCallback creates a new MsgRequestCallback instance.

func (*MsgRequestCallback) Descriptor

func (*MsgRequestCallback) Descriptor() ([]byte, []int)

func (*MsgRequestCallback) GetCallbackHeight

func (m *MsgRequestCallback) GetCallbackHeight() int64

func (*MsgRequestCallback) GetContractAddress

func (m *MsgRequestCallback) GetContractAddress() string

func (*MsgRequestCallback) GetFees

func (m *MsgRequestCallback) GetFees() types.Coin

func (*MsgRequestCallback) GetJobId

func (m *MsgRequestCallback) GetJobId() uint64

func (*MsgRequestCallback) GetSender

func (m *MsgRequestCallback) GetSender() string

func (MsgRequestCallback) GetSigners

func (m MsgRequestCallback) GetSigners() []sdk.AccAddress

GetSigners implements the sdk.Msg interface.

func (*MsgRequestCallback) Marshal

func (m *MsgRequestCallback) Marshal() (dAtA []byte, err error)

func (*MsgRequestCallback) MarshalTo

func (m *MsgRequestCallback) MarshalTo(dAtA []byte) (int, error)

func (*MsgRequestCallback) MarshalToSizedBuffer

func (m *MsgRequestCallback) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgRequestCallback) ProtoMessage

func (*MsgRequestCallback) ProtoMessage()

func (*MsgRequestCallback) Reset

func (m *MsgRequestCallback) Reset()

func (*MsgRequestCallback) Size

func (m *MsgRequestCallback) Size() (n int)

func (*MsgRequestCallback) String

func (m *MsgRequestCallback) String() string

func (*MsgRequestCallback) Unmarshal

func (m *MsgRequestCallback) Unmarshal(dAtA []byte) error

func (MsgRequestCallback) ValidateBasic

func (m MsgRequestCallback) ValidateBasic() error

ValidateBasic implements the sdk.Msg interface.

func (*MsgRequestCallback) XXX_DiscardUnknown

func (m *MsgRequestCallback) XXX_DiscardUnknown()

func (*MsgRequestCallback) XXX_Marshal

func (m *MsgRequestCallback) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgRequestCallback) XXX_Merge

func (m *MsgRequestCallback) XXX_Merge(src proto.Message)

func (*MsgRequestCallback) XXX_Size

func (m *MsgRequestCallback) XXX_Size() int

func (*MsgRequestCallback) XXX_Unmarshal

func (m *MsgRequestCallback) XXX_Unmarshal(b []byte) error

type MsgRequestCallbackResponse

type MsgRequestCallbackResponse struct {
}

MsgRequestCallbackResponse defines the response structure for executing a MsgRequestCallback message.

func (*MsgRequestCallbackResponse) Descriptor

func (*MsgRequestCallbackResponse) Descriptor() ([]byte, []int)

func (*MsgRequestCallbackResponse) Marshal

func (m *MsgRequestCallbackResponse) Marshal() (dAtA []byte, err error)

func (*MsgRequestCallbackResponse) MarshalTo

func (m *MsgRequestCallbackResponse) MarshalTo(dAtA []byte) (int, error)

func (*MsgRequestCallbackResponse) MarshalToSizedBuffer

func (m *MsgRequestCallbackResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgRequestCallbackResponse) ProtoMessage

func (*MsgRequestCallbackResponse) ProtoMessage()

func (*MsgRequestCallbackResponse) Reset

func (m *MsgRequestCallbackResponse) Reset()

func (*MsgRequestCallbackResponse) Size

func (m *MsgRequestCallbackResponse) Size() (n int)

func (*MsgRequestCallbackResponse) String

func (m *MsgRequestCallbackResponse) String() string

func (*MsgRequestCallbackResponse) Unmarshal

func (m *MsgRequestCallbackResponse) Unmarshal(dAtA []byte) error

func (*MsgRequestCallbackResponse) XXX_DiscardUnknown

func (m *MsgRequestCallbackResponse) XXX_DiscardUnknown()

func (*MsgRequestCallbackResponse) XXX_Marshal

func (m *MsgRequestCallbackResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgRequestCallbackResponse) XXX_Merge

func (m *MsgRequestCallbackResponse) XXX_Merge(src proto.Message)

func (*MsgRequestCallbackResponse) XXX_Size

func (m *MsgRequestCallbackResponse) XXX_Size() int

func (*MsgRequestCallbackResponse) XXX_Unmarshal

func (m *MsgRequestCallbackResponse) XXX_Unmarshal(b []byte) error

type MsgServer

type MsgServer interface {
	// RequestCallback defines a message for registering a callback at a specific height by a given contract
	RequestCallback(context.Context, *MsgRequestCallback) (*MsgRequestCallbackResponse, error)
	// CancelCallback defines a message for cancelling an existing callback
	CancelCallback(context.Context, *MsgCancelCallback) (*MsgCancelCallbackResponse, error)
}

MsgServer is the server API for Msg service.

type Params

type Params struct {
	// callback_gas_limit is the maximum gas that can be consumed by a callback.
	CallbackGasLimit uint64 `protobuf:"varint,1,opt,name=callback_gas_limit,json=callbackGasLimit,proto3" json:"callback_gas_limit,omitempty"`
	// max_block_reservation_limit is the maximum number of callbacks which can be registered in a given block.
	MaxBlockReservationLimit uint64 `` /* 138-byte string literal not displayed */
	// max_future_reservation_limit is the maximum number of blocks in the future that a contract can request a callback in.
	MaxFutureReservationLimit uint64 `` /* 141-byte string literal not displayed */
	// block_reservation_fee_multiplier is used to calculate a part of the reservation fees which will need to be paid when requesting the callback.
	BlockReservationFeeMultiplier github_com_cosmos_cosmos_sdk_types.Dec `` /* 192-byte string literal not displayed */
	// future_reservation_fee_multiplier is used to calculate a part of the reservation fees which will need to be paid while requesting the callback.
	FutureReservationFeeMultiplier github_com_cosmos_cosmos_sdk_types.Dec `` /* 195-byte string literal not displayed */
	// min_price_of_gas defines the minimum price for each single unit of gas in the network.
	MinPriceOfGas types.Coin `protobuf:"bytes,6,opt,name=min_price_of_gas,json=minPriceOfGas,proto3" json:"min_price_of_gas"`
}

Params defines the module parameters.

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func NewParams

func NewParams(
	callbackGasLimit uint64,
	maxBlockReservationLimit uint64,
	maxFutureReservationLimit uint64,
	blockReservationFeeMultiplier sdk.Dec,
	futureReservationFeeMultiplier sdk.Dec,
	minPriceOfGas sdk.Coin,
) Params

NewParams creates a new Params instance.

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) GetCallbackGasLimit

func (m *Params) GetCallbackGasLimit() uint64

func (*Params) GetMaxBlockReservationLimit

func (m *Params) GetMaxBlockReservationLimit() uint64

func (*Params) GetMaxFutureReservationLimit

func (m *Params) GetMaxFutureReservationLimit() uint64

func (*Params) GetMinPriceOfGas

func (m *Params) GetMinPriceOfGas() types.Coin

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) Validate

func (p Params) Validate() error

Validate perform object fields validation.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type QueryCallbacksRequest

type QueryCallbacksRequest struct {
	// block_height is the height at which to query the callbacks
	BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}

QueryCallbacksRequest is the request for Query.Callbacks.

func (*QueryCallbacksRequest) Descriptor

func (*QueryCallbacksRequest) Descriptor() ([]byte, []int)

func (*QueryCallbacksRequest) GetBlockHeight

func (m *QueryCallbacksRequest) GetBlockHeight() int64

func (*QueryCallbacksRequest) Marshal

func (m *QueryCallbacksRequest) Marshal() (dAtA []byte, err error)

func (*QueryCallbacksRequest) MarshalTo

func (m *QueryCallbacksRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryCallbacksRequest) MarshalToSizedBuffer

func (m *QueryCallbacksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryCallbacksRequest) ProtoMessage

func (*QueryCallbacksRequest) ProtoMessage()

func (*QueryCallbacksRequest) Reset

func (m *QueryCallbacksRequest) Reset()

func (*QueryCallbacksRequest) Size

func (m *QueryCallbacksRequest) Size() (n int)

func (*QueryCallbacksRequest) String

func (m *QueryCallbacksRequest) String() string

func (*QueryCallbacksRequest) Unmarshal

func (m *QueryCallbacksRequest) Unmarshal(dAtA []byte) error

func (*QueryCallbacksRequest) XXX_DiscardUnknown

func (m *QueryCallbacksRequest) XXX_DiscardUnknown()

func (*QueryCallbacksRequest) XXX_Marshal

func (m *QueryCallbacksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryCallbacksRequest) XXX_Merge

func (m *QueryCallbacksRequest) XXX_Merge(src proto.Message)

func (*QueryCallbacksRequest) XXX_Size

func (m *QueryCallbacksRequest) XXX_Size() int

func (*QueryCallbacksRequest) XXX_Unmarshal

func (m *QueryCallbacksRequest) XXX_Unmarshal(b []byte) error

type QueryCallbacksResponse

type QueryCallbacksResponse struct {
	// callbacks is the list of callbacks registered at the given height
	Callbacks []*Callback `protobuf:"bytes,1,rep,name=callbacks,proto3" json:"callbacks,omitempty"`
}

QueryCallbacksResponse is the response for Query.Callbacks.

func (*QueryCallbacksResponse) Descriptor

func (*QueryCallbacksResponse) Descriptor() ([]byte, []int)

func (*QueryCallbacksResponse) GetCallbacks

func (m *QueryCallbacksResponse) GetCallbacks() []*Callback

func (*QueryCallbacksResponse) Marshal

func (m *QueryCallbacksResponse) Marshal() (dAtA []byte, err error)

func (*QueryCallbacksResponse) MarshalTo

func (m *QueryCallbacksResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryCallbacksResponse) MarshalToSizedBuffer

func (m *QueryCallbacksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryCallbacksResponse) ProtoMessage

func (*QueryCallbacksResponse) ProtoMessage()

func (*QueryCallbacksResponse) Reset

func (m *QueryCallbacksResponse) Reset()

func (*QueryCallbacksResponse) Size

func (m *QueryCallbacksResponse) Size() (n int)

func (*QueryCallbacksResponse) String

func (m *QueryCallbacksResponse) String() string

func (*QueryCallbacksResponse) Unmarshal

func (m *QueryCallbacksResponse) Unmarshal(dAtA []byte) error

func (*QueryCallbacksResponse) XXX_DiscardUnknown

func (m *QueryCallbacksResponse) XXX_DiscardUnknown()

func (*QueryCallbacksResponse) XXX_Marshal

func (m *QueryCallbacksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryCallbacksResponse) XXX_Merge

func (m *QueryCallbacksResponse) XXX_Merge(src proto.Message)

func (*QueryCallbacksResponse) XXX_Size

func (m *QueryCallbacksResponse) XXX_Size() int

func (*QueryCallbacksResponse) XXX_Unmarshal

func (m *QueryCallbacksResponse) XXX_Unmarshal(b []byte) error

type QueryClient

type QueryClient interface {
	// Params returns module parameters
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// EstimateCallbackFees returns the total amount of callback fees a contract needs to pay to register the callback
	EstimateCallbackFees(ctx context.Context, in *QueryEstimateCallbackFeesRequest, opts ...grpc.CallOption) (*QueryEstimateCallbackFeesResponse, error)
	// Callbacks returns all the callbacks registered at a given height
	Callbacks(ctx context.Context, in *QueryCallbacksRequest, opts ...grpc.CallOption) (*QueryCallbacksResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryEstimateCallbackFeesRequest

type QueryEstimateCallbackFeesRequest struct {
	// block_height is the height at which to estimate the callback fees
	BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"`
}

QueryEstimateCallbackFeesRequest is the request for Query.EstimateCallbackFees.

func (*QueryEstimateCallbackFeesRequest) Descriptor

func (*QueryEstimateCallbackFeesRequest) Descriptor() ([]byte, []int)

func (*QueryEstimateCallbackFeesRequest) GetBlockHeight

func (m *QueryEstimateCallbackFeesRequest) GetBlockHeight() int64

func (*QueryEstimateCallbackFeesRequest) Marshal

func (m *QueryEstimateCallbackFeesRequest) Marshal() (dAtA []byte, err error)

func (*QueryEstimateCallbackFeesRequest) MarshalTo

func (m *QueryEstimateCallbackFeesRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryEstimateCallbackFeesRequest) MarshalToSizedBuffer

func (m *QueryEstimateCallbackFeesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryEstimateCallbackFeesRequest) ProtoMessage

func (*QueryEstimateCallbackFeesRequest) ProtoMessage()

func (*QueryEstimateCallbackFeesRequest) Reset

func (*QueryEstimateCallbackFeesRequest) Size

func (m *QueryEstimateCallbackFeesRequest) Size() (n int)

func (*QueryEstimateCallbackFeesRequest) String

func (*QueryEstimateCallbackFeesRequest) Unmarshal

func (m *QueryEstimateCallbackFeesRequest) Unmarshal(dAtA []byte) error

func (*QueryEstimateCallbackFeesRequest) XXX_DiscardUnknown

func (m *QueryEstimateCallbackFeesRequest) XXX_DiscardUnknown()

func (*QueryEstimateCallbackFeesRequest) XXX_Marshal

func (m *QueryEstimateCallbackFeesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryEstimateCallbackFeesRequest) XXX_Merge

func (*QueryEstimateCallbackFeesRequest) XXX_Size

func (m *QueryEstimateCallbackFeesRequest) XXX_Size() int

func (*QueryEstimateCallbackFeesRequest) XXX_Unmarshal

func (m *QueryEstimateCallbackFeesRequest) XXX_Unmarshal(b []byte) error

type QueryEstimateCallbackFeesResponse

type QueryEstimateCallbackFeesResponse struct {
	// total_fees is the total fees that needs to be paid by the contract to reserve a callback
	TotalFees *types.Coin `protobuf:"bytes,1,opt,name=total_fees,json=totalFees,proto3" json:"total_fees,omitempty"`
	// fee_split is the breakdown of the total_fees
	FeeSplit *CallbackFeesFeeSplit `protobuf:"bytes,2,opt,name=fee_split,json=feeSplit,proto3" json:"fee_split,omitempty"`
}

QueryEstimateCallbackFeesResponse is the response for Query.EstimateCallbackFees.

func (*QueryEstimateCallbackFeesResponse) Descriptor

func (*QueryEstimateCallbackFeesResponse) Descriptor() ([]byte, []int)

func (*QueryEstimateCallbackFeesResponse) GetFeeSplit

func (*QueryEstimateCallbackFeesResponse) GetTotalFees

func (m *QueryEstimateCallbackFeesResponse) GetTotalFees() *types.Coin

func (*QueryEstimateCallbackFeesResponse) Marshal

func (m *QueryEstimateCallbackFeesResponse) Marshal() (dAtA []byte, err error)

func (*QueryEstimateCallbackFeesResponse) MarshalTo

func (m *QueryEstimateCallbackFeesResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryEstimateCallbackFeesResponse) MarshalToSizedBuffer

func (m *QueryEstimateCallbackFeesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryEstimateCallbackFeesResponse) ProtoMessage

func (*QueryEstimateCallbackFeesResponse) ProtoMessage()

func (*QueryEstimateCallbackFeesResponse) Reset

func (*QueryEstimateCallbackFeesResponse) Size

func (m *QueryEstimateCallbackFeesResponse) Size() (n int)

func (*QueryEstimateCallbackFeesResponse) String

func (*QueryEstimateCallbackFeesResponse) Unmarshal

func (m *QueryEstimateCallbackFeesResponse) Unmarshal(dAtA []byte) error

func (*QueryEstimateCallbackFeesResponse) XXX_DiscardUnknown

func (m *QueryEstimateCallbackFeesResponse) XXX_DiscardUnknown()

func (*QueryEstimateCallbackFeesResponse) XXX_Marshal

func (m *QueryEstimateCallbackFeesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryEstimateCallbackFeesResponse) XXX_Merge

func (*QueryEstimateCallbackFeesResponse) XXX_Size

func (m *QueryEstimateCallbackFeesResponse) XXX_Size() int

func (*QueryEstimateCallbackFeesResponse) XXX_Unmarshal

func (m *QueryEstimateCallbackFeesResponse) XXX_Unmarshal(b []byte) error

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request for Query.Params.

func (*QueryParamsRequest) Descriptor

func (*QueryParamsRequest) Descriptor() ([]byte, []int)

func (*QueryParamsRequest) Marshal

func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)

func (*QueryParamsRequest) MarshalTo

func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsRequest) MarshalToSizedBuffer

func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

func (m *QueryParamsRequest) Size() (n int)

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsRequest) XXX_Merge

func (m *QueryParamsRequest) XXX_Merge(src proto.Message)

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error

type QueryParamsResponse

type QueryParamsResponse struct {
	// params defines all the module parameters.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response for Query.Params.

func (*QueryParamsResponse) Descriptor

func (*QueryParamsResponse) Descriptor() ([]byte, []int)

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)

func (*QueryParamsResponse) MarshalTo

func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)

func (*QueryParamsResponse) MarshalToSizedBuffer

func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

func (m *QueryParamsResponse) Size() (n int)

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*QueryParamsResponse) XXX_Merge

func (m *QueryParamsResponse) XXX_Merge(src proto.Message)

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error

type QueryServer

type QueryServer interface {
	// Params returns module parameters
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// EstimateCallbackFees returns the total amount of callback fees a contract needs to pay to register the callback
	EstimateCallbackFees(context.Context, *QueryEstimateCallbackFeesRequest) (*QueryEstimateCallbackFeesResponse, error)
	// Callbacks returns all the callbacks registered at a given height
	Callbacks(context.Context, *QueryCallbacksRequest) (*QueryCallbacksResponse, error)
}

QueryServer is the server API for Query service.

type SudoMsg

type SudoMsg struct {
	// Callback is the endpoint name at the contract which is called
	Callback *CallbackMsg `json:"callback,omitempty"`
}

SudoMsg callback message sent to a contract. This is encoded as JSON input to the contract when executing the callback

func NewCallbackMsg

func NewCallbackMsg(jobID uint64) SudoMsg

NewCallback creates a new Callback instance.

func (SudoMsg) Bytes

func (s SudoMsg) Bytes() []byte

Bytes returns the callback message as JSON bytes

func (SudoMsg) String

func (s SudoMsg) String() string

String returns the callback message as JSON string

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CancelCallback

func (*UnimplementedMsgServer) RequestCallback

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Callbacks

func (*UnimplementedQueryServer) Params

type WasmKeeperExpected

type WasmKeeperExpected interface {
	HasContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress) bool
	GetContractInfo(ctx sdk.Context, contractAddress sdk.AccAddress) *wasmdtypes.ContractInfo
	Sudo(ctx sdk.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error)
}

Jump to

Keyboard shortcuts

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