Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func ParamKeyTable() paramtypes.KeyTable
- func PrivilegedContractsKey(contractAddr sdk.AccAddress) []byte
- func RandomAddress(_ *testing.T) sdk.AccAddress
- func RandomBech32Address(t *testing.T) string
- func RegisterCodec(_ *codec.LegacyAmino)
- func RegisterInterfaces(registry cdctypes.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- type DemotePrivilegedContractProposal
- func (*DemotePrivilegedContractProposal) Descriptor() ([]byte, []int)
- func (m *DemotePrivilegedContractProposal) GetContract() string
- func (m *DemotePrivilegedContractProposal) GetDescription() string
- func (m *DemotePrivilegedContractProposal) GetTitle() string
- func (m *DemotePrivilegedContractProposal) Marshal() (dAtA []byte, err error)
- func (m *DemotePrivilegedContractProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *DemotePrivilegedContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p DemotePrivilegedContractProposal) MarshalYAML() (interface{}, error)
- func (p DemotePrivilegedContractProposal) ProposalRoute() string
- func (p DemotePrivilegedContractProposal) ProposalType() string
- func (*DemotePrivilegedContractProposal) ProtoMessage()
- func (m *DemotePrivilegedContractProposal) Reset()
- func (m *DemotePrivilegedContractProposal) Size() (n int)
- func (m *DemotePrivilegedContractProposal) String() string
- func (m *DemotePrivilegedContractProposal) Unmarshal(dAtA []byte) error
- func (p DemotePrivilegedContractProposal) ValidateBasic() error
- func (m *DemotePrivilegedContractProposal) XXX_DiscardUnknown()
- func (m *DemotePrivilegedContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DemotePrivilegedContractProposal) XXX_Merge(src proto.Message)
- func (m *DemotePrivilegedContractProposal) XXX_Size() int
- func (m *DemotePrivilegedContractProposal) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetPrivilegedContractAddresses() []string
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (p Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type PromoteToPrivilegedContractProposal
- func (*PromoteToPrivilegedContractProposal) Descriptor() ([]byte, []int)
- func (m *PromoteToPrivilegedContractProposal) GetContract() string
- func (m *PromoteToPrivilegedContractProposal) GetDescription() string
- func (m *PromoteToPrivilegedContractProposal) GetTitle() string
- func (m *PromoteToPrivilegedContractProposal) Marshal() (dAtA []byte, err error)
- func (m *PromoteToPrivilegedContractProposal) MarshalTo(dAtA []byte) (int, error)
- func (m *PromoteToPrivilegedContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p PromoteToPrivilegedContractProposal) MarshalYAML() (interface{}, error)
- func (p PromoteToPrivilegedContractProposal) ProposalRoute() string
- func (p PromoteToPrivilegedContractProposal) ProposalType() string
- func (*PromoteToPrivilegedContractProposal) ProtoMessage()
- func (m *PromoteToPrivilegedContractProposal) Reset()
- func (m *PromoteToPrivilegedContractProposal) Size() (n int)
- func (m *PromoteToPrivilegedContractProposal) String() string
- func (m *PromoteToPrivilegedContractProposal) Unmarshal(dAtA []byte) error
- func (p PromoteToPrivilegedContractProposal) ValidateBasic() error
- func (m *PromoteToPrivilegedContractProposal) XXX_DiscardUnknown()
- func (m *PromoteToPrivilegedContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *PromoteToPrivilegedContractProposal) XXX_Merge(src proto.Message)
- func (m *PromoteToPrivilegedContractProposal) XXX_Size() int
- func (m *PromoteToPrivilegedContractProposal) XXX_Unmarshal(b []byte) error
- type ProposalType
- type QueryClient
- type QueryListPrivilegedRequest
- func (*QueryListPrivilegedRequest) Descriptor() ([]byte, []int)
- func (m *QueryListPrivilegedRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryListPrivilegedRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryListPrivilegedRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryListPrivilegedRequest) ProtoMessage()
- func (m *QueryListPrivilegedRequest) Reset()
- func (m *QueryListPrivilegedRequest) Size() (n int)
- func (m *QueryListPrivilegedRequest) String() string
- func (m *QueryListPrivilegedRequest) Unmarshal(dAtA []byte) error
- func (m *QueryListPrivilegedRequest) XXX_DiscardUnknown()
- func (m *QueryListPrivilegedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryListPrivilegedRequest) XXX_Merge(src proto.Message)
- func (m *QueryListPrivilegedRequest) XXX_Size() int
- func (m *QueryListPrivilegedRequest) XXX_Unmarshal(b []byte) error
- type QueryListPrivilegedResponse
- func (*QueryListPrivilegedResponse) Descriptor() ([]byte, []int)
- func (m *QueryListPrivilegedResponse) GetContractAddresses() []string
- func (m *QueryListPrivilegedResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryListPrivilegedResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryListPrivilegedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryListPrivilegedResponse) ProtoMessage()
- func (m *QueryListPrivilegedResponse) Reset()
- func (m *QueryListPrivilegedResponse) Size() (n int)
- func (m *QueryListPrivilegedResponse) String() string
- func (m *QueryListPrivilegedResponse) Unmarshal(dAtA []byte) error
- func (m *QueryListPrivilegedResponse) XXX_DiscardUnknown()
- func (m *QueryListPrivilegedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryListPrivilegedResponse) XXX_Merge(src proto.Message)
- func (m *QueryListPrivilegedResponse) XXX_Size() int
- func (m *QueryListPrivilegedResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- type WasmKeeper
Constants ¶
const ( EventTypeSetContractPriviledge = "set_privileged_contract" EventTypeUnsetContractPriviledge = "unset_privileged_contract" )
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" )
const DefaultIndex uint64 = 1
DefaultIndex is the default global index
Variables ¶
var ( Amino = codec.NewLegacyAmino() ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) )
var ( ErrContractDoesNotExist = sdkerrors.Register(ModuleName, 2, "contract does not exist to modify its privilege") ErrContractPrivilegeNotSet = sdkerrors.Register(ModuleName, 3, "contract does not have privilege set and therefore cannot unset its privilege") )
x/cron module sentinel errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthParams = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowParams = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthProposal = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowProposal = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupProposal = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var EnableAllProposals = []ProposalType{ ProposalTypePromoteContract, ProposalTypeDemoteContract, }
EnableAllProposals contains all twasm gov types as keys.
var PrivilegedContractsPrefix = []byte{0x01}
Functions ¶
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable the param key table for launch module
func PrivilegedContractsKey ¶
func PrivilegedContractsKey(contractAddr sdk.AccAddress) []byte
func RandomAddress ¶
func RandomAddress(_ *testing.T) sdk.AccAddress
func RandomBech32Address ¶
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 RegisterQueryHandler ¶
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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.
func RegisterQueryServer ¶
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
Types ¶
type DemotePrivilegedContractProposal ¶
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"` }
DemotePrivilegedContractProposal gov proposal content type to remove "privileges" from a contract
func DemoteProposalFixture ¶
func DemoteProposalFixture(mutators ...func(proposal *DemotePrivilegedContractProposal)) *DemotePrivilegedContractProposal
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 (m *DemotePrivilegedContractProposal) GetTitle() string
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 (m *DemotePrivilegedContractProposal) Reset()
func (*DemotePrivilegedContractProposal) Size ¶
func (m *DemotePrivilegedContractProposal) Size() (n int)
func (*DemotePrivilegedContractProposal) String ¶
func (m *DemotePrivilegedContractProposal) String() 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 (m *DemotePrivilegedContractProposal) XXX_Merge(src proto.Message)
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 */ }
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) GetPrivilegedContractAddresses ¶
func (m *GenesisState) GetPrivilegedContractAddresses() []string
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err 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 { }
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 Params ¶
type Params struct { }
Params defines the parameters for the module.
func (*Params) Descriptor ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs get the params.ParamSet
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type PromoteToPrivilegedContractProposal ¶
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"` }
PromoteToPrivilegedContractProposal gov proposal content type to add "privileges" to a contract
func PromoteProposalFixture ¶
func PromoteProposalFixture(mutators ...func(*PromoteToPrivilegedContractProposal)) *PromoteToPrivilegedContractProposal
func (*PromoteToPrivilegedContractProposal) Descriptor ¶
func (*PromoteToPrivilegedContractProposal) Descriptor() ([]byte, []int)
func (*PromoteToPrivilegedContractProposal) GetContract ¶
func (m *PromoteToPrivilegedContractProposal) GetContract() string
func (*PromoteToPrivilegedContractProposal) GetDescription ¶
func (m *PromoteToPrivilegedContractProposal) GetDescription() string
func (*PromoteToPrivilegedContractProposal) GetTitle ¶
func (m *PromoteToPrivilegedContractProposal) GetTitle() string
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 ¶
func (p PromoteToPrivilegedContractProposal) ProposalType() string
ProposalType returns the type
func (*PromoteToPrivilegedContractProposal) ProtoMessage ¶
func (*PromoteToPrivilegedContractProposal) ProtoMessage()
func (*PromoteToPrivilegedContractProposal) Reset ¶
func (m *PromoteToPrivilegedContractProposal) Reset()
func (*PromoteToPrivilegedContractProposal) Size ¶
func (m *PromoteToPrivilegedContractProposal) Size() (n int)
func (*PromoteToPrivilegedContractProposal) String ¶
func (m *PromoteToPrivilegedContractProposal) String() 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 (m *PromoteToPrivilegedContractProposal) XXX_Merge(src proto.Message)
func (*PromoteToPrivilegedContractProposal) XXX_Size ¶
func (m *PromoteToPrivilegedContractProposal) XXX_Size() int
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) }
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 QueryServer ¶
type QueryServer interface { // ListPrivileged queries the contracts which have the priviledge status ListPrivileged(context.Context, *QueryListPrivilegedRequest) (*QueryListPrivilegedResponse, error) }
QueryServer is the server API for Query service.
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) ListPrivileged ¶
func (*UnimplementedQueryServer) ListPrivileged(ctx context.Context, req *QueryListPrivilegedRequest) (*QueryListPrivilegedResponse, error)
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.