types

package
v13.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeSetContractPriviledge   = "set_privileged_contract"
	EventTypeUnsetContractPriviledge = "unset_privileged_contract"
)
View Source
const (
	// ModuleName defines the module name
	ModuleName = "cron"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_cron"
)
View Source
const (
	TypeMsgPromoteToPrivilegedContract  = "promote_to_privileged_contract"
	TypeMsgDemoteFromPrivilegedContract = "demote_from_privileged_contract"
	TypeMsgUpdateParams                 = "update_params"
)

msg types

View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default global index

Variables

View Source
var (
	ErrInvalidLengthCron        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCron          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCron = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrContractDoesNotExist    = errorsmod.Register(ModuleName, 2, "contract does not exist to modify its privilege")
	ErrContractPrivilegeNotSet = errorsmod.Register(ModuleName, 3, "contract does not have privilege set and therefore cannot unset its privilege")
	ErrUnauthorized            = errorsmod.Register(ModuleName, 4, "sender is unauthorized to perform the operation")
)

x/cron module sentinel errors

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 (
	PrivilegedContractsPrefix = []byte{0x01}
	ParamsKey                 = []byte{0x02}
)
View Source
var (
	ErrInvalidLengthProposal        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProposal          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProposal = fmt.Errorf("proto: unexpected end of group")
)
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")
)

EnableAllProposals contains all twasm gov types as keys.

View Source
var KeyAdminAddress = []byte("AdminAddress")

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

func PrivilegedContractsKey

func PrivilegedContractsKey(contractAddr sdk.AccAddress) []byte

func RegisterCodec

func RegisterCodec(_ *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the account types and interface

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 DemotePrivilegedContractProposal deprecated

type DemotePrivilegedContractProposal struct {
	// Title is a short summary
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"`
	// Description is a human readable text
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"`
	// Contract is the bech32 address of the smart contract
	Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty" yaml:"contract"`
}

Deprecated: Do not use. To demote a contract, a MsgDemoteFromPrivilegedContract can be invoked from the x/gov module via a v1 governance proposal

Deprecated: Do not use.

func (*DemotePrivilegedContractProposal) Descriptor

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

func (*DemotePrivilegedContractProposal) GetContract

func (m *DemotePrivilegedContractProposal) GetContract() string

func (*DemotePrivilegedContractProposal) GetDescription

func (m *DemotePrivilegedContractProposal) GetDescription() string

func (*DemotePrivilegedContractProposal) GetTitle

func (*DemotePrivilegedContractProposal) Marshal

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

func (*DemotePrivilegedContractProposal) MarshalTo

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

func (*DemotePrivilegedContractProposal) MarshalToSizedBuffer

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

func (DemotePrivilegedContractProposal) MarshalYAML

func (p DemotePrivilegedContractProposal) MarshalYAML() (interface{}, error)

MarshalYAML pretty prints the wasm byte code

func (DemotePrivilegedContractProposal) ProposalRoute

func (p DemotePrivilegedContractProposal) ProposalRoute() string

ProposalRoute returns the routing key of a parameter change proposal.

func (DemotePrivilegedContractProposal) ProposalType

func (p DemotePrivilegedContractProposal) ProposalType() string

ProposalType returns the type

func (*DemotePrivilegedContractProposal) ProtoMessage

func (*DemotePrivilegedContractProposal) ProtoMessage()

func (*DemotePrivilegedContractProposal) Reset

func (*DemotePrivilegedContractProposal) Size

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

func (*DemotePrivilegedContractProposal) String

func (*DemotePrivilegedContractProposal) Unmarshal

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

func (DemotePrivilegedContractProposal) ValidateBasic

func (p DemotePrivilegedContractProposal) ValidateBasic() error

ValidateBasic validates the proposal

func (*DemotePrivilegedContractProposal) XXX_DiscardUnknown

func (m *DemotePrivilegedContractProposal) XXX_DiscardUnknown()

func (*DemotePrivilegedContractProposal) XXX_Marshal

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

func (*DemotePrivilegedContractProposal) XXX_Merge

func (*DemotePrivilegedContractProposal) XXX_Size

func (m *DemotePrivilegedContractProposal) XXX_Size() int

func (*DemotePrivilegedContractProposal) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	// List of all the contracts that have been given the privilege status via
	// governance. They can set up hooks to abci.EndBlocker
	PrivilegedContractAddresses []string `` /* 144-byte string literal not displayed */
	// Module params
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`
}

GenesisState defines the cron module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetPrivilegedContractAddresses

func (m *GenesisState) GetPrivilegedContractAddresses() []string

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 (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 MsgClient

type MsgClient interface {
	// PromoteToPrivilegedContract promotes a contract to privileged status.
	PromoteToPrivilegedContract(ctx context.Context, in *MsgPromoteToPrivilegedContract, opts ...grpc.CallOption) (*MsgPromoteToPrivilegedContractResponse, error)
	// DemoteFromPrivilegedContract demotes a contract from privileged status.
	DemoteFromPrivilegedContract(ctx context.Context, in *MsgDemoteFromPrivilegedContract, opts ...grpc.CallOption) (*MsgDemoteFromPrivilegedContractResponse, error)
	// UpdateParams updates the cron module's parameters.
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, 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 MsgDemoteFromPrivilegedContract

type MsgDemoteFromPrivilegedContract struct {
	// Authority is the address of the governance account or any whitelisted
	// address
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Contract is the bech32 address of the smart contract
	Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"`
}

func NewMsgDemoteFromPrivilegedContract

func NewMsgDemoteFromPrivilegedContract(sender string, contractAddr string) *MsgDemoteFromPrivilegedContract

func (*MsgDemoteFromPrivilegedContract) Descriptor

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

func (*MsgDemoteFromPrivilegedContract) GetAuthority

func (m *MsgDemoteFromPrivilegedContract) GetAuthority() string

func (*MsgDemoteFromPrivilegedContract) GetContract

func (m *MsgDemoteFromPrivilegedContract) GetContract() string

func (MsgDemoteFromPrivilegedContract) GetSignBytes

func (msg MsgDemoteFromPrivilegedContract) GetSignBytes() []byte

func (MsgDemoteFromPrivilegedContract) GetSigners

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

func (*MsgDemoteFromPrivilegedContract) Marshal

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

func (*MsgDemoteFromPrivilegedContract) MarshalTo

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

func (*MsgDemoteFromPrivilegedContract) MarshalToSizedBuffer

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

func (*MsgDemoteFromPrivilegedContract) ProtoMessage

func (*MsgDemoteFromPrivilegedContract) ProtoMessage()

func (*MsgDemoteFromPrivilegedContract) Reset

func (MsgDemoteFromPrivilegedContract) Route

func (*MsgDemoteFromPrivilegedContract) Size

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

func (*MsgDemoteFromPrivilegedContract) String

func (MsgDemoteFromPrivilegedContract) Type

func (*MsgDemoteFromPrivilegedContract) Unmarshal

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

func (MsgDemoteFromPrivilegedContract) ValidateBasic

func (msg MsgDemoteFromPrivilegedContract) ValidateBasic() error

func (*MsgDemoteFromPrivilegedContract) XXX_DiscardUnknown

func (m *MsgDemoteFromPrivilegedContract) XXX_DiscardUnknown()

func (*MsgDemoteFromPrivilegedContract) XXX_Marshal

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

func (*MsgDemoteFromPrivilegedContract) XXX_Merge

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

func (*MsgDemoteFromPrivilegedContract) XXX_Size

func (m *MsgDemoteFromPrivilegedContract) XXX_Size() int

func (*MsgDemoteFromPrivilegedContract) XXX_Unmarshal

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

type MsgDemoteFromPrivilegedContractResponse

type MsgDemoteFromPrivilegedContractResponse struct {
}

func (*MsgDemoteFromPrivilegedContractResponse) Descriptor

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

func (*MsgDemoteFromPrivilegedContractResponse) Marshal

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

func (*MsgDemoteFromPrivilegedContractResponse) MarshalTo

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

func (*MsgDemoteFromPrivilegedContractResponse) MarshalToSizedBuffer

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

func (*MsgDemoteFromPrivilegedContractResponse) ProtoMessage

func (*MsgDemoteFromPrivilegedContractResponse) Reset

func (*MsgDemoteFromPrivilegedContractResponse) Size

func (*MsgDemoteFromPrivilegedContractResponse) String

func (*MsgDemoteFromPrivilegedContractResponse) Unmarshal

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

func (*MsgDemoteFromPrivilegedContractResponse) XXX_DiscardUnknown

func (m *MsgDemoteFromPrivilegedContractResponse) XXX_DiscardUnknown()

func (*MsgDemoteFromPrivilegedContractResponse) XXX_Marshal

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

func (*MsgDemoteFromPrivilegedContractResponse) XXX_Merge

func (*MsgDemoteFromPrivilegedContractResponse) XXX_Size

func (*MsgDemoteFromPrivilegedContractResponse) XXX_Unmarshal

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

type MsgPromoteToPrivilegedContract

type MsgPromoteToPrivilegedContract struct {
	// Authority is the address of the governance account or any whitelisted
	// address
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// Contract is the bech32 address of the smart contract
	Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"`
}

MsgPromoteToPrivilegedContract defines the Msg/PromoteToPrivilegedContract

func NewMsgPromoteToPrivilegedContract

func NewMsgPromoteToPrivilegedContract(sender string, contractAddr string) *MsgPromoteToPrivilegedContract

func (*MsgPromoteToPrivilegedContract) Descriptor

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

func (*MsgPromoteToPrivilegedContract) GetAuthority

func (m *MsgPromoteToPrivilegedContract) GetAuthority() string

func (*MsgPromoteToPrivilegedContract) GetContract

func (m *MsgPromoteToPrivilegedContract) GetContract() string

func (MsgPromoteToPrivilegedContract) GetSignBytes

func (msg MsgPromoteToPrivilegedContract) GetSignBytes() []byte

func (MsgPromoteToPrivilegedContract) GetSigners

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

func (*MsgPromoteToPrivilegedContract) Marshal

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

func (*MsgPromoteToPrivilegedContract) MarshalTo

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

func (*MsgPromoteToPrivilegedContract) MarshalToSizedBuffer

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

func (*MsgPromoteToPrivilegedContract) ProtoMessage

func (*MsgPromoteToPrivilegedContract) ProtoMessage()

func (*MsgPromoteToPrivilegedContract) Reset

func (m *MsgPromoteToPrivilegedContract) Reset()

func (MsgPromoteToPrivilegedContract) Route

func (*MsgPromoteToPrivilegedContract) Size

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

func (*MsgPromoteToPrivilegedContract) String

func (MsgPromoteToPrivilegedContract) Type

func (*MsgPromoteToPrivilegedContract) Unmarshal

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

func (MsgPromoteToPrivilegedContract) ValidateBasic

func (msg MsgPromoteToPrivilegedContract) ValidateBasic() error

func (*MsgPromoteToPrivilegedContract) XXX_DiscardUnknown

func (m *MsgPromoteToPrivilegedContract) XXX_DiscardUnknown()

func (*MsgPromoteToPrivilegedContract) XXX_Marshal

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

func (*MsgPromoteToPrivilegedContract) XXX_Merge

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

func (*MsgPromoteToPrivilegedContract) XXX_Size

func (m *MsgPromoteToPrivilegedContract) XXX_Size() int

func (*MsgPromoteToPrivilegedContract) XXX_Unmarshal

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

type MsgPromoteToPrivilegedContractResponse

type MsgPromoteToPrivilegedContractResponse struct {
}

func (*MsgPromoteToPrivilegedContractResponse) Descriptor

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

func (*MsgPromoteToPrivilegedContractResponse) Marshal

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

func (*MsgPromoteToPrivilegedContractResponse) MarshalTo

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

func (*MsgPromoteToPrivilegedContractResponse) MarshalToSizedBuffer

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

func (*MsgPromoteToPrivilegedContractResponse) ProtoMessage

func (*MsgPromoteToPrivilegedContractResponse) Reset

func (*MsgPromoteToPrivilegedContractResponse) Size

func (*MsgPromoteToPrivilegedContractResponse) String

func (*MsgPromoteToPrivilegedContractResponse) Unmarshal

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

func (*MsgPromoteToPrivilegedContractResponse) XXX_DiscardUnknown

func (m *MsgPromoteToPrivilegedContractResponse) XXX_DiscardUnknown()

func (*MsgPromoteToPrivilegedContractResponse) XXX_Marshal

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

func (*MsgPromoteToPrivilegedContractResponse) XXX_Merge

func (*MsgPromoteToPrivilegedContractResponse) XXX_Size

func (*MsgPromoteToPrivilegedContractResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// PromoteToPrivilegedContract promotes a contract to privileged status.
	PromoteToPrivilegedContract(context.Context, *MsgPromoteToPrivilegedContract) (*MsgPromoteToPrivilegedContractResponse, error)
	// DemoteFromPrivilegedContract demotes a contract from privileged status.
	DemoteFromPrivilegedContract(context.Context, *MsgDemoteFromPrivilegedContract) (*MsgDemoteFromPrivilegedContractResponse, error)
	// UpdateParams updates the cron module's parameters.
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateParams

type MsgUpdateParams struct {
	// Authority is the address of the governance account.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// NOTE: All parameters must be supplied.
	Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`
}

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (MsgUpdateParams) GetSignBytes

func (msg MsgUpdateParams) GetSignBytes() []byte

func (MsgUpdateParams) GetSigners

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

func (*MsgUpdateParams) Marshal

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

func (*MsgUpdateParams) MarshalTo

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

func (*MsgUpdateParams) MarshalToSizedBuffer

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

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) Reset

func (m *MsgUpdateParams) Reset()

func (MsgUpdateParams) Route

func (msg MsgUpdateParams) Route() string

func (*MsgUpdateParams) Size

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (MsgUpdateParams) Type

func (msg MsgUpdateParams) Type() string

func (*MsgUpdateParams) Unmarshal

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

func (MsgUpdateParams) ValidateBasic

func (msg MsgUpdateParams) ValidateBasic() error

func (*MsgUpdateParams) XXX_DiscardUnknown

func (m *MsgUpdateParams) XXX_DiscardUnknown()

func (*MsgUpdateParams) XXX_Marshal

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

func (*MsgUpdateParams) XXX_Merge

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

func (*MsgUpdateParams) XXX_Size

func (m *MsgUpdateParams) XXX_Size() int

func (*MsgUpdateParams) XXX_Unmarshal

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

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
}

func (*MsgUpdateParamsResponse) Descriptor

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

func (*MsgUpdateParamsResponse) Marshal

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

func (*MsgUpdateParamsResponse) MarshalTo

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

func (*MsgUpdateParamsResponse) MarshalToSizedBuffer

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

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) Reset

func (m *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) Size

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

func (*MsgUpdateParamsResponse) String

func (m *MsgUpdateParamsResponse) String() string

func (*MsgUpdateParamsResponse) Unmarshal

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

func (*MsgUpdateParamsResponse) XXX_DiscardUnknown

func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()

func (*MsgUpdateParamsResponse) XXX_Marshal

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

func (*MsgUpdateParamsResponse) XXX_Merge

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

func (*MsgUpdateParamsResponse) XXX_Size

func (m *MsgUpdateParamsResponse) XXX_Size() int

func (*MsgUpdateParamsResponse) XXX_Unmarshal

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

type Params

type Params struct {
	// Addresses which act as admins of the module. They can promote and demote
	// contracts without having to go via governance.
	AdminAddresses []string `protobuf:"bytes,1,rep,name=admin_addresses,json=adminAddresses,proto3" json:"admin_addresses,omitempty"`
}

Params holds parameters for the cron module.

func DefaultParams

func DefaultParams() Params

default module parameters

func NewParams

func NewParams(addresses []string) Params

func (*Params) Descriptor

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

func (*Params) GetAdminAddresses

func (m *Params) GetAdminAddresses() []string

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) ParamSetPairs

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

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 (p Params) String() string

String implements the Stringer interface.

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

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 PromoteToPrivilegedContractProposal deprecated

type PromoteToPrivilegedContractProposal struct {
	// Title is a short summary
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"`
	// Description is a human readable text
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"`
	// Contract is the bech32 address of the smart contract
	Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty" yaml:"contract"`
}

Deprecated: Do not use. To promote a contract, a MsgPromoteToPrivilegedContract can be invoked from the x/gov module via a v1 governance proposal

Deprecated: Do not use.

func (*PromoteToPrivilegedContractProposal) Descriptor

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

func (*PromoteToPrivilegedContractProposal) GetContract

func (*PromoteToPrivilegedContractProposal) GetDescription

func (m *PromoteToPrivilegedContractProposal) GetDescription() string

func (*PromoteToPrivilegedContractProposal) GetTitle

func (*PromoteToPrivilegedContractProposal) Marshal

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

func (*PromoteToPrivilegedContractProposal) MarshalTo

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

func (*PromoteToPrivilegedContractProposal) MarshalToSizedBuffer

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

func (PromoteToPrivilegedContractProposal) MarshalYAML

func (p PromoteToPrivilegedContractProposal) MarshalYAML() (interface{}, error)

MarshalYAML pretty prints the wasm byte code

func (PromoteToPrivilegedContractProposal) ProposalRoute

func (p PromoteToPrivilegedContractProposal) ProposalRoute() string

ProposalRoute returns the routing key of a parameter change proposal.

func (PromoteToPrivilegedContractProposal) ProposalType

ProposalType returns the type

func (*PromoteToPrivilegedContractProposal) ProtoMessage

func (*PromoteToPrivilegedContractProposal) ProtoMessage()

func (*PromoteToPrivilegedContractProposal) Reset

func (*PromoteToPrivilegedContractProposal) Size

func (*PromoteToPrivilegedContractProposal) String

func (*PromoteToPrivilegedContractProposal) Unmarshal

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

func (PromoteToPrivilegedContractProposal) ValidateBasic

func (p PromoteToPrivilegedContractProposal) ValidateBasic() error

ValidateBasic validates the proposal

func (*PromoteToPrivilegedContractProposal) XXX_DiscardUnknown

func (m *PromoteToPrivilegedContractProposal) XXX_DiscardUnknown()

func (*PromoteToPrivilegedContractProposal) XXX_Marshal

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

func (*PromoteToPrivilegedContractProposal) XXX_Merge

func (*PromoteToPrivilegedContractProposal) XXX_Size

func (*PromoteToPrivilegedContractProposal) XXX_Unmarshal

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

type ProposalType

type ProposalType string
const (
	ProposalTypePromoteContract ProposalType = "PromoteToPrivilegedContract"
	ProposalTypeDemoteContract  ProposalType = "DemotePrivilegedContract"
)

type QueryClient

type QueryClient interface {
	// ListPrivileged queries the contracts which have the priviledge status
	ListPrivileged(ctx context.Context, in *QueryListPrivilegedRequest, opts ...grpc.CallOption) (*QueryListPrivilegedResponse, error)
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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 QueryListPrivilegedRequest

type QueryListPrivilegedRequest struct {
}

QueryListPrivilegedRequest is request type for the Query/ListPrivileged RPC method.

func (*QueryListPrivilegedRequest) Descriptor

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

func (*QueryListPrivilegedRequest) Marshal

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

func (*QueryListPrivilegedRequest) MarshalTo

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

func (*QueryListPrivilegedRequest) MarshalToSizedBuffer

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

func (*QueryListPrivilegedRequest) ProtoMessage

func (*QueryListPrivilegedRequest) ProtoMessage()

func (*QueryListPrivilegedRequest) Reset

func (m *QueryListPrivilegedRequest) Reset()

func (*QueryListPrivilegedRequest) Size

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

func (*QueryListPrivilegedRequest) String

func (m *QueryListPrivilegedRequest) String() string

func (*QueryListPrivilegedRequest) Unmarshal

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

func (*QueryListPrivilegedRequest) XXX_DiscardUnknown

func (m *QueryListPrivilegedRequest) XXX_DiscardUnknown()

func (*QueryListPrivilegedRequest) XXX_Marshal

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

func (*QueryListPrivilegedRequest) XXX_Merge

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

func (*QueryListPrivilegedRequest) XXX_Size

func (m *QueryListPrivilegedRequest) XXX_Size() int

func (*QueryListPrivilegedRequest) XXX_Unmarshal

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

type QueryListPrivilegedResponse

type QueryListPrivilegedResponse struct {
	// contract_addresses holds all the smart contract addresses which have
	// privilege status.
	ContractAddresses []string `protobuf:"bytes,1,rep,name=contract_addresses,json=contractAddresses,proto3" json:"privileged_contract_addresses,omitempty"`
}

QueryListPrivilegedResponse is response type for the Query/ListPrivileged RPC method.

func (*QueryListPrivilegedResponse) Descriptor

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

func (*QueryListPrivilegedResponse) GetContractAddresses

func (m *QueryListPrivilegedResponse) GetContractAddresses() []string

func (*QueryListPrivilegedResponse) Marshal

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

func (*QueryListPrivilegedResponse) MarshalTo

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

func (*QueryListPrivilegedResponse) MarshalToSizedBuffer

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

func (*QueryListPrivilegedResponse) ProtoMessage

func (*QueryListPrivilegedResponse) ProtoMessage()

func (*QueryListPrivilegedResponse) Reset

func (m *QueryListPrivilegedResponse) Reset()

func (*QueryListPrivilegedResponse) Size

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

func (*QueryListPrivilegedResponse) String

func (m *QueryListPrivilegedResponse) String() string

func (*QueryListPrivilegedResponse) Unmarshal

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

func (*QueryListPrivilegedResponse) XXX_DiscardUnknown

func (m *QueryListPrivilegedResponse) XXX_DiscardUnknown()

func (*QueryListPrivilegedResponse) XXX_Marshal

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

func (*QueryListPrivilegedResponse) XXX_Merge

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

func (*QueryListPrivilegedResponse) XXX_Size

func (m *QueryListPrivilegedResponse) XXX_Size() int

func (*QueryListPrivilegedResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is request type for the Query/Params RPC method.

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 Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
}

QueryParamsResponse is response type for the Query/Params RPC method.

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 {
	// ListPrivileged queries the contracts which have the priviledge status
	ListPrivileged(context.Context, *QueryListPrivilegedRequest) (*QueryListPrivilegedResponse, error)
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) ListPrivileged

func (*UnimplementedQueryServer) Params

type WasmKeeper

type WasmKeeper interface {
	// HasContractInfo checks if a contract with given address exists
	HasContractInfo(ctx sdk.Context, contractAddr sdk.AccAddress) bool
	// Sudo allows priviledged access to a contract
	Sudo(ctx sdk.Context, contractAddress sdk.AccAddress, msg []byte) ([]byte, error)
}

WasmKeeper defines the expected interface needed to setup and execute privilege contracts.

Jump to

Keyboard shortcuts

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