Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func AllPrivilegeTypeNames() []string
- func ConsensusParamsFixture(mutators ...func(*abci.ConsensusParams)) *abci.ConsensusParams
- func DefaultParams() wasmtypes.Params
- func RandomAddress(_ *testing.T) sdk.AccAddress
- func RandomBech32Address(t *testing.T) string
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- 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 BankKeeper
- type Contract
- func (*Contract) Descriptor() ([]byte, []int)
- func (m *Contract) GetContractAddress() string
- func (m *Contract) GetContractInfo() types.ContractInfo
- func (m *Contract) GetContractState() isContract_ContractState
- func (m *Contract) GetCustomModel() *CustomModel
- func (m *Contract) GetKvModel() *KVModel
- func (m *Contract) Marshal() (dAtA []byte, err error)
- func (m *Contract) MarshalTo(dAtA []byte) (int, error)
- func (m *Contract) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Contract) ProtoMessage()
- func (m *Contract) Reset()
- func (m *Contract) Size() (n int)
- func (m *Contract) String() string
- func (m *Contract) Unmarshal(dAtA []byte) error
- func (m *Contract) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
- func (m *Contract) XXX_DiscardUnknown()
- func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Contract) XXX_Merge(src proto.Message)
- func (*Contract) XXX_OneofWrappers() []interface{}
- func (m *Contract) XXX_Size() int
- func (m *Contract) XXX_Unmarshal(b []byte) error
- type Contract_CustomModel
- type Contract_KvModel
- type CustomModel
- func (*CustomModel) Descriptor() ([]byte, []int)
- func (m *CustomModel) GetMsg() github_com_CosmWasm_wasmd_x_wasm_types.RawContractMessage
- func (m *CustomModel) Marshal() (dAtA []byte, err error)
- func (m *CustomModel) MarshalTo(dAtA []byte) (int, error)
- func (m *CustomModel) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CustomModel) ProtoMessage()
- func (m *CustomModel) Reset()
- func (m *CustomModel) Size() (n int)
- func (m *CustomModel) String() string
- func (m *CustomModel) Unmarshal(dAtA []byte) error
- func (m *CustomModel) XXX_DiscardUnknown()
- func (m *CustomModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CustomModel) XXX_Merge(src proto.Message)
- func (m *CustomModel) XXX_Size() int
- func (m *CustomModel) XXX_Unmarshal(b []byte) error
- type DemotePrivilegedContractProposal
- func (*DemotePrivilegedContractProposal) Descriptor() ([]byte, []int)
- func (this *DemotePrivilegedContractProposal) Equal(that interface{}) bool
- func (p DemotePrivilegedContractProposal) GetDescription() string
- func (p *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 (p 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) GetCodes() []types.Code
- func (m *GenesisState) GetContracts() []Contract
- func (m *GenesisState) GetGenMsgs() []types.GenesisState_GenMsgs
- func (m *GenesisState) GetParams() types.Params
- func (m *GenesisState) GetPinnedCodeIDs() []uint64
- func (m *GenesisState) GetPrivilegedContractAddresses() []string
- func (m *GenesisState) GetSequences() []types.Sequence
- 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 (g GenesisState) RawWasmState() wasmtypes.GenesisState
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (g GenesisState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
- func (g GenesisState) ValidateBasic() 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 KVModel
- func (*KVModel) Descriptor() ([]byte, []int)
- func (m *KVModel) GetModels() []types.Model
- func (m *KVModel) Marshal() (dAtA []byte, err error)
- func (m *KVModel) MarshalTo(dAtA []byte) (int, error)
- func (m *KVModel) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*KVModel) ProtoMessage()
- func (m *KVModel) Reset()
- func (m *KVModel) Size() (n int)
- func (m *KVModel) String() string
- func (m *KVModel) Unmarshal(dAtA []byte) error
- func (m *KVModel) XXX_DiscardUnknown()
- func (m *KVModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *KVModel) XXX_Merge(src proto.Message)
- func (m *KVModel) XXX_Size() int
- func (m *KVModel) XXX_Unmarshal(b []byte) error
- type Minter
- type PrivilegeType
- type PromoteToPrivilegedContractProposal
- func (*PromoteToPrivilegedContractProposal) Descriptor() ([]byte, []int)
- func (this *PromoteToPrivilegedContractProposal) Equal(that interface{}) bool
- func (p PromoteToPrivilegedContractProposal) GetDescription() string
- func (p *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 (p 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 QueryContractsByPrivilegeTypeRequest
- func (*QueryContractsByPrivilegeTypeRequest) Descriptor() ([]byte, []int)
- func (m *QueryContractsByPrivilegeTypeRequest) GetPrivilegeType() string
- func (m *QueryContractsByPrivilegeTypeRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryContractsByPrivilegeTypeRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryContractsByPrivilegeTypeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryContractsByPrivilegeTypeRequest) ProtoMessage()
- func (m *QueryContractsByPrivilegeTypeRequest) Reset()
- func (m *QueryContractsByPrivilegeTypeRequest) Size() (n int)
- func (m *QueryContractsByPrivilegeTypeRequest) String() string
- func (m *QueryContractsByPrivilegeTypeRequest) Unmarshal(dAtA []byte) error
- func (m *QueryContractsByPrivilegeTypeRequest) XXX_DiscardUnknown()
- func (m *QueryContractsByPrivilegeTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryContractsByPrivilegeTypeRequest) XXX_Merge(src proto.Message)
- func (m *QueryContractsByPrivilegeTypeRequest) XXX_Size() int
- func (m *QueryContractsByPrivilegeTypeRequest) XXX_Unmarshal(b []byte) error
- type QueryContractsByPrivilegeTypeResponse
- func (*QueryContractsByPrivilegeTypeResponse) Descriptor() ([]byte, []int)
- func (m *QueryContractsByPrivilegeTypeResponse) GetContracts() []string
- func (m *QueryContractsByPrivilegeTypeResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryContractsByPrivilegeTypeResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryContractsByPrivilegeTypeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryContractsByPrivilegeTypeResponse) ProtoMessage()
- func (m *QueryContractsByPrivilegeTypeResponse) Reset()
- func (m *QueryContractsByPrivilegeTypeResponse) Size() (n int)
- func (m *QueryContractsByPrivilegeTypeResponse) String() string
- func (m *QueryContractsByPrivilegeTypeResponse) Unmarshal(dAtA []byte) error
- func (m *QueryContractsByPrivilegeTypeResponse) XXX_DiscardUnknown()
- func (m *QueryContractsByPrivilegeTypeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryContractsByPrivilegeTypeResponse) XXX_Merge(src proto.Message)
- func (m *QueryContractsByPrivilegeTypeResponse) XXX_Size() int
- func (m *QueryContractsByPrivilegeTypeResponse) XXX_Unmarshal(b []byte) error
- type QueryPrivilegedContractsRequest
- func (*QueryPrivilegedContractsRequest) Descriptor() ([]byte, []int)
- func (m *QueryPrivilegedContractsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryPrivilegedContractsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPrivilegedContractsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPrivilegedContractsRequest) ProtoMessage()
- func (m *QueryPrivilegedContractsRequest) Reset()
- func (m *QueryPrivilegedContractsRequest) Size() (n int)
- func (m *QueryPrivilegedContractsRequest) String() string
- func (m *QueryPrivilegedContractsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryPrivilegedContractsRequest) XXX_DiscardUnknown()
- func (m *QueryPrivilegedContractsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPrivilegedContractsRequest) XXX_Merge(src proto.Message)
- func (m *QueryPrivilegedContractsRequest) XXX_Size() int
- func (m *QueryPrivilegedContractsRequest) XXX_Unmarshal(b []byte) error
- type QueryPrivilegedContractsResponse
- func (*QueryPrivilegedContractsResponse) Descriptor() ([]byte, []int)
- func (m *QueryPrivilegedContractsResponse) GetContracts() []string
- func (m *QueryPrivilegedContractsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryPrivilegedContractsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryPrivilegedContractsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryPrivilegedContractsResponse) ProtoMessage()
- func (m *QueryPrivilegedContractsResponse) Reset()
- func (m *QueryPrivilegedContractsResponse) Size() (n int)
- func (m *QueryPrivilegedContractsResponse) String() string
- func (m *QueryPrivilegedContractsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryPrivilegedContractsResponse) XXX_DiscardUnknown()
- func (m *QueryPrivilegedContractsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryPrivilegedContractsResponse) XXX_Merge(src proto.Message)
- func (m *QueryPrivilegedContractsResponse) XXX_Size() int
- func (m *QueryPrivilegedContractsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type RegisteredPrivilege
- func (*RegisteredPrivilege) Descriptor() ([]byte, []int)
- func (this *RegisteredPrivilege) Equal(that interface{}) bool
- func (m *RegisteredPrivilege) Marshal() (dAtA []byte, err error)
- func (m *RegisteredPrivilege) MarshalTo(dAtA []byte) (int, error)
- func (m *RegisteredPrivilege) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RegisteredPrivilege) ProtoMessage()
- func (m *RegisteredPrivilege) Reset()
- func (m *RegisteredPrivilege) Size() (n int)
- func (m *RegisteredPrivilege) String() string
- func (m *RegisteredPrivilege) Unmarshal(dAtA []byte) error
- func (r RegisteredPrivilege) ValidateBasic() error
- func (m *RegisteredPrivilege) XXX_DiscardUnknown()
- func (m *RegisteredPrivilege) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RegisteredPrivilege) XXX_Merge(src proto.Message)
- func (m *RegisteredPrivilege) XXX_Size() int
- func (m *RegisteredPrivilege) XXX_Unmarshal(b []byte) error
- type Staker
- type TWasmConfig
- type TgradeContractDetails
- func (d *TgradeContractDetails) AddRegisteredPrivilege(t PrivilegeType, pos uint8)
- func (*TgradeContractDetails) Descriptor() ([]byte, []int)
- func (this *TgradeContractDetails) Equal(that interface{}) bool
- func (d *TgradeContractDetails) HasRegisteredPrivilege(c PrivilegeType) bool
- func (d TgradeContractDetails) IterateRegisteredPrivileges(cb func(c PrivilegeType, pos uint8) bool)
- func (m *TgradeContractDetails) Marshal() (dAtA []byte, err error)
- func (m *TgradeContractDetails) MarshalTo(dAtA []byte) (int, error)
- func (m *TgradeContractDetails) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TgradeContractDetails) ProtoMessage()
- func (d *TgradeContractDetails) RemoveRegisteredPrivilege(t PrivilegeType, pos uint8)
- func (m *TgradeContractDetails) Reset()
- func (m *TgradeContractDetails) Size() (n int)
- func (m *TgradeContractDetails) String() string
- func (m *TgradeContractDetails) Unmarshal(dAtA []byte) error
- func (d TgradeContractDetails) ValidateBasic() error
- func (m *TgradeContractDetails) XXX_DiscardUnknown()
- func (m *TgradeContractDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TgradeContractDetails) XXX_Merge(src proto.Message)
- func (m *TgradeContractDetails) XXX_Size() int
- func (m *TgradeContractDetails) XXX_Unmarshal(b []byte) error
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) ContractsByPrivilegeType(ctx context.Context, req *QueryContractsByPrivilegeTypeRequest) (*QueryContractsByPrivilegeTypeResponse, error)
- func (*UnimplementedQueryServer) PrivilegedContracts(ctx context.Context, req *QueryPrivilegedContractsRequest) (*QueryPrivilegedContractsResponse, error)
Constants ¶
const ( EventTypeSetPrivileged = "set_privileged_contract" EventTypeUnsetPrivileged = "unset_privileged_contract" EventTypeRegisterPrivilege = "register_privilege" EventTypeReleasePrivilege = "release_privilege" EventTypeMintTokens = "mint" EventTypeDelegateTokens = "delegate" EventTypeUndelegateTokens = "undelegate" )
const ( AttributeKeyCallbackType = "privilege_type" AttributeKeyRecipient = "recipient" AttributeKeySender = "sender" )
const ( // ModuleName is the name of this module. ModuleName = wasmtypes.ModuleName // RouterKey is used to route governance proposals RouterKey = wasmtypes.RouterKey // StoreKey is the prefix under which we store this module's data StoreKey = wasmtypes.StoreKey )
const ( // DefaultParamspace for params keeper DefaultParamspace = ModuleName )
Variables ¶
var ( ErrInvalidLengthContractExtension = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowContractExtension = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupContractExtension = fmt.Errorf("proto: unexpected end of group") )
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 ( PrivilegedContractsSecondaryIndexPrefix = []byte{0xa0} ContractCallbacksSecondaryIndexPrefix = []byte{0xa1} )
nolint
var ( // PrivilegeTypeBeginBlock called every block before the TX are processed // Multiple contracts can register for this callback privilege PrivilegeTypeBeginBlock = registerCallbackType(0x1, "begin_blocker", false) // PrivilegeTypeEndBlock called every block after the TX are processed // Multiple contracts can register for this callback privilege PrivilegeTypeEndBlock = registerCallbackType(0x2, "end_blocker", false) // PrivilegeTypeValidatorSetUpdate end-blocker that can modify the validator set // This callback privilege is exclusive to one contract instance, only. PrivilegeTypeValidatorSetUpdate = registerCallbackType(0x3, "validator_set_updater", true) // PrivilegeTypeGovProposalExecutor is a permission privilege to execute governance proposals. PrivilegeTypeGovProposalExecutor = registerCallbackType(0x4, "gov_proposal_executor", false) // PrivilegeTypeTokenMinter is a permission to mint native tokens on the chain. PrivilegeTypeTokenMinter = registerCallbackType(0x5, "token_minter", false) // PrivilegeConsensusParamChanger is a permission to modify the consensus parameters PrivilegeConsensusParamChanger = registerCallbackType(0x6, "consensus_param_changer", false) // PrivilegeDelegator is a permission to let accounts send tokens via delegation to this contract. Can be used by vesting accounts PrivilegeDelegator = registerCallbackType(0x7, "delegator", false) // PrivilegeStateExporterImporter is a permission to let contracts manage their state export on a dump and genesis import (in non seed mode) // The contract receives a sudo message of type export where the result is stored in genesis. For the import path the json object containing state // is passed to the contract via sudo import method. PrivilegeStateExporterImporter = registerCallbackType(0x8, "state_exporter_importer", false) )
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 (
ModuleCdc = codec.NewAminoCodec(amino)
)
Functions ¶
func AllPrivilegeTypeNames ¶
func AllPrivilegeTypeNames() []string
AllPrivilegeTypeNames returns a list of all callback type names
func ConsensusParamsFixture ¶
func ConsensusParamsFixture(mutators ...func(*abci.ConsensusParams)) *abci.ConsensusParams
func DefaultParams ¶
func RandomAddress ¶
func RandomAddress(_ *testing.T) sdk.AccAddress
func RandomBech32Address ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers the account types and interface
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 BankKeeper ¶
type BankKeeper interface { wasmtypes.BankKeeper Minter Staker }
type Contract ¶ added in v1.0.0
type Contract struct { ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` ContractInfo types.ContractInfo `protobuf:"bytes,2,opt,name=contract_info,json=contractInfo,proto3" json:"contract_info"` // ContractSate is one of default wasmd Model or custom state model // // Types that are valid to be assigned to ContractState: // *Contract_KvModel // *Contract_CustomModel ContractState isContract_ContractState `protobuf_oneof:"contract_state"` }
Contract struct encompasses ContractAddress, ContractInfo, and ContractState
func ContractFixture ¶ added in v1.0.0
ContractFixture test data factory
func (*Contract) Descriptor ¶ added in v1.0.0
func (*Contract) GetContractAddress ¶ added in v1.0.0
func (*Contract) GetContractInfo ¶ added in v1.0.0
func (m *Contract) GetContractInfo() types.ContractInfo
func (*Contract) GetContractState ¶ added in v1.0.0
func (m *Contract) GetContractState() isContract_ContractState
func (*Contract) GetCustomModel ¶ added in v1.0.0
func (m *Contract) GetCustomModel() *CustomModel
func (*Contract) GetKvModel ¶ added in v1.0.0
func (*Contract) MarshalToSizedBuffer ¶ added in v1.0.0
func (*Contract) ProtoMessage ¶ added in v1.0.0
func (*Contract) ProtoMessage()
func (*Contract) UnpackInterfaces ¶ added in v1.0.0
func (m *Contract) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
UnpackInterfaces implements codectypes.UnpackInterfaces
func (*Contract) XXX_DiscardUnknown ¶ added in v1.0.0
func (m *Contract) XXX_DiscardUnknown()
func (*Contract) XXX_Marshal ¶ added in v1.0.0
func (*Contract) XXX_OneofWrappers ¶ added in v1.0.0
func (*Contract) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*Contract) XXX_Unmarshal ¶ added in v1.0.0
type Contract_CustomModel ¶ added in v1.0.0
type Contract_CustomModel struct {
CustomModel *CustomModel `protobuf:"bytes,4,opt,name=custom_model,json=customModel,proto3,oneof" json:"custom_model,omitempty"`
}
func (*Contract_CustomModel) MarshalTo ¶ added in v1.0.0
func (m *Contract_CustomModel) MarshalTo(dAtA []byte) (int, error)
func (*Contract_CustomModel) MarshalToSizedBuffer ¶ added in v1.0.0
func (m *Contract_CustomModel) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Contract_CustomModel) Size ¶ added in v1.0.0
func (m *Contract_CustomModel) Size() (n int)
type Contract_KvModel ¶ added in v1.0.0
type Contract_KvModel struct {
KvModel *KVModel `protobuf:"bytes,3,opt,name=kv_model,json=kvModel,proto3,oneof" json:"kv_model,omitempty"`
}
func (*Contract_KvModel) MarshalTo ¶ added in v1.0.0
func (m *Contract_KvModel) MarshalTo(dAtA []byte) (int, error)
func (*Contract_KvModel) MarshalToSizedBuffer ¶ added in v1.0.0
func (m *Contract_KvModel) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Contract_KvModel) Size ¶ added in v1.0.0
func (m *Contract_KvModel) Size() (n int)
type CustomModel ¶ added in v1.0.0
type CustomModel struct { // Msg json encoded message to be passed to the contract on import Msg github_com_CosmWasm_wasmd_x_wasm_types.RawContractMessage `` /* 126-byte string literal not displayed */ }
CustomModel contains the raw json data for a contract to seed its state on import
func (*CustomModel) Descriptor ¶ added in v1.0.0
func (*CustomModel) Descriptor() ([]byte, []int)
func (*CustomModel) GetMsg ¶ added in v1.0.0
func (m *CustomModel) GetMsg() github_com_CosmWasm_wasmd_x_wasm_types.RawContractMessage
func (*CustomModel) Marshal ¶ added in v1.0.0
func (m *CustomModel) Marshal() (dAtA []byte, err error)
func (*CustomModel) MarshalTo ¶ added in v1.0.0
func (m *CustomModel) MarshalTo(dAtA []byte) (int, error)
func (*CustomModel) MarshalToSizedBuffer ¶ added in v1.0.0
func (m *CustomModel) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CustomModel) ProtoMessage ¶ added in v1.0.0
func (*CustomModel) ProtoMessage()
func (*CustomModel) Reset ¶ added in v1.0.0
func (m *CustomModel) Reset()
func (*CustomModel) Size ¶ added in v1.0.0
func (m *CustomModel) Size() (n int)
func (*CustomModel) String ¶ added in v1.0.0
func (m *CustomModel) String() string
func (*CustomModel) Unmarshal ¶ added in v1.0.0
func (m *CustomModel) Unmarshal(dAtA []byte) error
func (*CustomModel) XXX_DiscardUnknown ¶ added in v1.0.0
func (m *CustomModel) XXX_DiscardUnknown()
func (*CustomModel) XXX_Marshal ¶ added in v1.0.0
func (m *CustomModel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CustomModel) XXX_Merge ¶ added in v1.0.0
func (m *CustomModel) XXX_Merge(src proto.Message)
func (*CustomModel) XXX_Size ¶ added in v1.0.0
func (m *CustomModel) XXX_Size() int
func (*CustomModel) XXX_Unmarshal ¶ added in v1.0.0
func (m *CustomModel) XXX_Unmarshal(b []byte) error
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 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 remove "privileges" from a contract
func DemoteProposalFixture ¶
func DemoteProposalFixture(mutators ...func(proposal *DemotePrivilegedContractProposal)) *DemotePrivilegedContractProposal
func (*DemotePrivilegedContractProposal) Descriptor ¶
func (*DemotePrivilegedContractProposal) Descriptor() ([]byte, []int)
func (*DemotePrivilegedContractProposal) Equal ¶
func (this *DemotePrivilegedContractProposal) Equal(that interface{}) bool
func (DemotePrivilegedContractProposal) GetDescription ¶
func (p DemotePrivilegedContractProposal) GetDescription() string
GetDescription returns the human readable description of the proposal
func (*DemotePrivilegedContractProposal) GetTitle ¶
func (p *DemotePrivilegedContractProposal) GetTitle() string
GetTitle returns the title of the proposal
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 (p DemotePrivilegedContractProposal) String() string
String implements the Stringer interface.
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 { // Params sdk type Params for wasmd Params types.Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` // Codes has all stored wasm codes and metadata Codes []types.Code `protobuf:"bytes,2,rep,name=codes,proto3" json:"codes,omitempty"` // Contracts contains all instantiated contracts, state and metadata Contracts []Contract `protobuf:"bytes,3,rep,name=contracts,proto3" json:"contracts,omitempty"` // Sequences names and values Sequences []types.Sequence `protobuf:"bytes,4,rep,name=sequences,proto3" json:"sequences,omitempty"` // GenMsgs has wasmd sdk type messages to execute in the genesis phase GenMsgs []types.GenesisState_GenMsgs `protobuf:"bytes,5,rep,name=gen_msgs,json=genMsgs,proto3" json:"gen_msgs,omitempty"` // PrivilegedContractAddresses is a list of contract addresses that can have // special permissions PrivilegedContractAddresses []string `` /* 144-byte string literal not displayed */ // PinnedCodeIDs has codeInfo ids for wasm codes that are pinned in cache PinnedCodeIDs []uint64 `protobuf:"varint,7,rep,packed,name=pinned_code_ids,json=pinnedCodeIds,proto3" json:"pinned_code_ids,omitempty"` }
func DeterministicGenesisStateFixture ¶ added in v1.0.0
func DeterministicGenesisStateFixture(t *testing.T, mutators ...func(*GenesisState)) GenesisState
DeterministicGenesisStateFixture is the same as GenesisStateFixture but with deterministic addresses and codes
func GenesisStateFixture ¶
func GenesisStateFixture(t *testing.T, mutators ...func(*GenesisState)) GenesisState
GenesisStateFixture test data fixture
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetCodes ¶ added in v1.0.0
func (m *GenesisState) GetCodes() []types.Code
func (*GenesisState) GetContracts ¶ added in v1.0.0
func (m *GenesisState) GetContracts() []Contract
func (*GenesisState) GetGenMsgs ¶ added in v1.0.0
func (m *GenesisState) GetGenMsgs() []types.GenesisState_GenMsgs
func (*GenesisState) GetParams ¶ added in v1.0.0
func (m *GenesisState) GetParams() types.Params
func (*GenesisState) GetPinnedCodeIDs ¶
func (m *GenesisState) GetPinnedCodeIDs() []uint64
func (*GenesisState) GetPrivilegedContractAddresses ¶
func (m *GenesisState) GetPrivilegedContractAddresses() []string
func (*GenesisState) GetSequences ¶ added in v1.0.0
func (m *GenesisState) GetSequences() []types.Sequence
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) RawWasmState ¶ added in v1.0.0
func (g GenesisState) RawWasmState() wasmtypes.GenesisState
RawWasmState convert to wasm genesis state for vanilla import. Custom data models for privileged contracts are not included
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) UnpackInterfaces ¶ added in v1.0.0
func (g GenesisState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
UnpackInterfaces implements codectypes.UnpackInterfaces
func (GenesisState) ValidateBasic ¶
func (g GenesisState) ValidateBasic() error
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 KVModel ¶ added in v1.0.0
type KVModel struct {
Models []types.Model `protobuf:"bytes,1,rep,name=models,proto3" json:"models"`
}
KVModel is a wrapper around the wasmd default key value model.
func (*KVModel) Descriptor ¶ added in v1.0.0
func (*KVModel) MarshalToSizedBuffer ¶ added in v1.0.0
func (*KVModel) ProtoMessage ¶ added in v1.0.0
func (*KVModel) ProtoMessage()
func (*KVModel) XXX_DiscardUnknown ¶ added in v1.0.0
func (m *KVModel) XXX_DiscardUnknown()
func (*KVModel) XXX_Marshal ¶ added in v1.0.0
func (*KVModel) XXX_Unmarshal ¶ added in v1.0.0
type PrivilegeType ¶
type PrivilegeType byte
PrivilegeType is a system callback to a contract
const PrivilegeTypeEmpty PrivilegeType = 0
PrivilegeTypeEmpty is empty value
func PrivilegeTypeFrom ¶
func PrivilegeTypeFrom(name string) *PrivilegeType
PrivilegeTypeFrom convert name to type. Returns nil when none matches
func (PrivilegeType) IsSingleton ¶
func (t PrivilegeType) IsSingleton() bool
IsSingleton returns if only a single contract instance for this type can register (true) or multiple (false)
func (PrivilegeType) MarshalJSON ¶
func (t PrivilegeType) MarshalJSON() ([]byte, error)
func (PrivilegeType) String ¶
func (t PrivilegeType) String() string
func (*PrivilegeType) UnmarshalJSON ¶
func (t *PrivilegeType) UnmarshalJSON(raw []byte) error
func (PrivilegeType) ValidateBasic ¶
func (t PrivilegeType) ValidateBasic() error
ValidateBasic checks if the callback type was registered
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 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) Equal ¶
func (this *PromoteToPrivilegedContractProposal) Equal(that interface{}) bool
func (PromoteToPrivilegedContractProposal) GetDescription ¶
func (p PromoteToPrivilegedContractProposal) GetDescription() string
GetDescription returns the human readable description of the proposal
func (*PromoteToPrivilegedContractProposal) GetTitle ¶
func (p *PromoteToPrivilegedContractProposal) GetTitle() string
GetTitle returns the title of the proposal
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 (p PromoteToPrivilegedContractProposal) String() string
String implements the Stringer interface.
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 { // PrivilegedContracts returns all privileged contracts PrivilegedContracts(ctx context.Context, in *QueryPrivilegedContractsRequest, opts ...grpc.CallOption) (*QueryPrivilegedContractsResponse, error) // ContractsByPrivilegeType returns all contracts that have registered for the // privilege type ContractsByPrivilegeType(ctx context.Context, in *QueryContractsByPrivilegeTypeRequest, opts ...grpc.CallOption) (*QueryContractsByPrivilegeTypeResponse, 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 QueryContractsByPrivilegeTypeRequest ¶
type QueryContractsByPrivilegeTypeRequest struct {
PrivilegeType string `protobuf:"bytes,1,opt,name=privilege_type,json=privilegeType,proto3" json:"privilege_type,omitempty"`
}
QueryContractsByPrivilegeTypeRequest is the request type for the Query/ContractsByPrivilegeType RPC method
func (*QueryContractsByPrivilegeTypeRequest) Descriptor ¶
func (*QueryContractsByPrivilegeTypeRequest) Descriptor() ([]byte, []int)
func (*QueryContractsByPrivilegeTypeRequest) GetPrivilegeType ¶
func (m *QueryContractsByPrivilegeTypeRequest) GetPrivilegeType() string
func (*QueryContractsByPrivilegeTypeRequest) Marshal ¶
func (m *QueryContractsByPrivilegeTypeRequest) Marshal() (dAtA []byte, err error)
func (*QueryContractsByPrivilegeTypeRequest) MarshalTo ¶
func (m *QueryContractsByPrivilegeTypeRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryContractsByPrivilegeTypeRequest) MarshalToSizedBuffer ¶
func (m *QueryContractsByPrivilegeTypeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryContractsByPrivilegeTypeRequest) ProtoMessage ¶
func (*QueryContractsByPrivilegeTypeRequest) ProtoMessage()
func (*QueryContractsByPrivilegeTypeRequest) Reset ¶
func (m *QueryContractsByPrivilegeTypeRequest) Reset()
func (*QueryContractsByPrivilegeTypeRequest) Size ¶
func (m *QueryContractsByPrivilegeTypeRequest) Size() (n int)
func (*QueryContractsByPrivilegeTypeRequest) String ¶
func (m *QueryContractsByPrivilegeTypeRequest) String() string
func (*QueryContractsByPrivilegeTypeRequest) Unmarshal ¶
func (m *QueryContractsByPrivilegeTypeRequest) Unmarshal(dAtA []byte) error
func (*QueryContractsByPrivilegeTypeRequest) XXX_DiscardUnknown ¶
func (m *QueryContractsByPrivilegeTypeRequest) XXX_DiscardUnknown()
func (*QueryContractsByPrivilegeTypeRequest) XXX_Marshal ¶
func (m *QueryContractsByPrivilegeTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryContractsByPrivilegeTypeRequest) XXX_Merge ¶
func (m *QueryContractsByPrivilegeTypeRequest) XXX_Merge(src proto.Message)
func (*QueryContractsByPrivilegeTypeRequest) XXX_Size ¶
func (m *QueryContractsByPrivilegeTypeRequest) XXX_Size() int
func (*QueryContractsByPrivilegeTypeRequest) XXX_Unmarshal ¶
func (m *QueryContractsByPrivilegeTypeRequest) XXX_Unmarshal(b []byte) error
type QueryContractsByPrivilegeTypeResponse ¶
type QueryContractsByPrivilegeTypeResponse struct { // contracts are a set of contract addresses Contracts []string `protobuf:"bytes,1,rep,name=contracts,proto3" json:"contracts,omitempty"` }
QueryContractsByPrivilegeTypeResponse is the response type for the Query/ContractsByPrivilegeType RPC method
func (*QueryContractsByPrivilegeTypeResponse) Descriptor ¶
func (*QueryContractsByPrivilegeTypeResponse) Descriptor() ([]byte, []int)
func (*QueryContractsByPrivilegeTypeResponse) GetContracts ¶
func (m *QueryContractsByPrivilegeTypeResponse) GetContracts() []string
func (*QueryContractsByPrivilegeTypeResponse) Marshal ¶
func (m *QueryContractsByPrivilegeTypeResponse) Marshal() (dAtA []byte, err error)
func (*QueryContractsByPrivilegeTypeResponse) MarshalTo ¶
func (m *QueryContractsByPrivilegeTypeResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryContractsByPrivilegeTypeResponse) MarshalToSizedBuffer ¶
func (m *QueryContractsByPrivilegeTypeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryContractsByPrivilegeTypeResponse) ProtoMessage ¶
func (*QueryContractsByPrivilegeTypeResponse) ProtoMessage()
func (*QueryContractsByPrivilegeTypeResponse) Reset ¶
func (m *QueryContractsByPrivilegeTypeResponse) Reset()
func (*QueryContractsByPrivilegeTypeResponse) Size ¶
func (m *QueryContractsByPrivilegeTypeResponse) Size() (n int)
func (*QueryContractsByPrivilegeTypeResponse) String ¶
func (m *QueryContractsByPrivilegeTypeResponse) String() string
func (*QueryContractsByPrivilegeTypeResponse) Unmarshal ¶
func (m *QueryContractsByPrivilegeTypeResponse) Unmarshal(dAtA []byte) error
func (*QueryContractsByPrivilegeTypeResponse) XXX_DiscardUnknown ¶
func (m *QueryContractsByPrivilegeTypeResponse) XXX_DiscardUnknown()
func (*QueryContractsByPrivilegeTypeResponse) XXX_Marshal ¶
func (m *QueryContractsByPrivilegeTypeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryContractsByPrivilegeTypeResponse) XXX_Merge ¶
func (m *QueryContractsByPrivilegeTypeResponse) XXX_Merge(src proto.Message)
func (*QueryContractsByPrivilegeTypeResponse) XXX_Size ¶
func (m *QueryContractsByPrivilegeTypeResponse) XXX_Size() int
func (*QueryContractsByPrivilegeTypeResponse) XXX_Unmarshal ¶
func (m *QueryContractsByPrivilegeTypeResponse) XXX_Unmarshal(b []byte) error
type QueryPrivilegedContractsRequest ¶
type QueryPrivilegedContractsRequest struct{}
QueryPrivilegedContractsResponse is the request type for the Query/PrivilegedContracts RPC method
func (*QueryPrivilegedContractsRequest) Descriptor ¶
func (*QueryPrivilegedContractsRequest) Descriptor() ([]byte, []int)
func (*QueryPrivilegedContractsRequest) Marshal ¶
func (m *QueryPrivilegedContractsRequest) Marshal() (dAtA []byte, err error)
func (*QueryPrivilegedContractsRequest) MarshalTo ¶
func (m *QueryPrivilegedContractsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryPrivilegedContractsRequest) MarshalToSizedBuffer ¶
func (m *QueryPrivilegedContractsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPrivilegedContractsRequest) ProtoMessage ¶
func (*QueryPrivilegedContractsRequest) ProtoMessage()
func (*QueryPrivilegedContractsRequest) Reset ¶
func (m *QueryPrivilegedContractsRequest) Reset()
func (*QueryPrivilegedContractsRequest) Size ¶
func (m *QueryPrivilegedContractsRequest) Size() (n int)
func (*QueryPrivilegedContractsRequest) String ¶
func (m *QueryPrivilegedContractsRequest) String() string
func (*QueryPrivilegedContractsRequest) Unmarshal ¶
func (m *QueryPrivilegedContractsRequest) Unmarshal(dAtA []byte) error
func (*QueryPrivilegedContractsRequest) XXX_DiscardUnknown ¶
func (m *QueryPrivilegedContractsRequest) XXX_DiscardUnknown()
func (*QueryPrivilegedContractsRequest) XXX_Marshal ¶
func (m *QueryPrivilegedContractsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPrivilegedContractsRequest) XXX_Merge ¶
func (m *QueryPrivilegedContractsRequest) XXX_Merge(src proto.Message)
func (*QueryPrivilegedContractsRequest) XXX_Size ¶
func (m *QueryPrivilegedContractsRequest) XXX_Size() int
func (*QueryPrivilegedContractsRequest) XXX_Unmarshal ¶
func (m *QueryPrivilegedContractsRequest) XXX_Unmarshal(b []byte) error
type QueryPrivilegedContractsResponse ¶
type QueryPrivilegedContractsResponse struct { // contracts are a set of contract addresses Contracts []string `protobuf:"bytes,1,rep,name=contracts,proto3" json:"contracts,omitempty"` }
QueryPrivilegedContractsResponse is the response type for the Query/PrivilegedContracts RPC method
func (*QueryPrivilegedContractsResponse) Descriptor ¶
func (*QueryPrivilegedContractsResponse) Descriptor() ([]byte, []int)
func (*QueryPrivilegedContractsResponse) GetContracts ¶
func (m *QueryPrivilegedContractsResponse) GetContracts() []string
func (*QueryPrivilegedContractsResponse) Marshal ¶
func (m *QueryPrivilegedContractsResponse) Marshal() (dAtA []byte, err error)
func (*QueryPrivilegedContractsResponse) MarshalTo ¶
func (m *QueryPrivilegedContractsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryPrivilegedContractsResponse) MarshalToSizedBuffer ¶
func (m *QueryPrivilegedContractsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryPrivilegedContractsResponse) ProtoMessage ¶
func (*QueryPrivilegedContractsResponse) ProtoMessage()
func (*QueryPrivilegedContractsResponse) Reset ¶
func (m *QueryPrivilegedContractsResponse) Reset()
func (*QueryPrivilegedContractsResponse) Size ¶
func (m *QueryPrivilegedContractsResponse) Size() (n int)
func (*QueryPrivilegedContractsResponse) String ¶
func (m *QueryPrivilegedContractsResponse) String() string
func (*QueryPrivilegedContractsResponse) Unmarshal ¶
func (m *QueryPrivilegedContractsResponse) Unmarshal(dAtA []byte) error
func (*QueryPrivilegedContractsResponse) XXX_DiscardUnknown ¶
func (m *QueryPrivilegedContractsResponse) XXX_DiscardUnknown()
func (*QueryPrivilegedContractsResponse) XXX_Marshal ¶
func (m *QueryPrivilegedContractsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryPrivilegedContractsResponse) XXX_Merge ¶
func (m *QueryPrivilegedContractsResponse) XXX_Merge(src proto.Message)
func (*QueryPrivilegedContractsResponse) XXX_Size ¶
func (m *QueryPrivilegedContractsResponse) XXX_Size() int
func (*QueryPrivilegedContractsResponse) XXX_Unmarshal ¶
func (m *QueryPrivilegedContractsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶
type QueryServer interface { // PrivilegedContracts returns all privileged contracts PrivilegedContracts(context.Context, *QueryPrivilegedContractsRequest) (*QueryPrivilegedContractsResponse, error) // ContractsByPrivilegeType returns all contracts that have registered for the // privilege type ContractsByPrivilegeType(context.Context, *QueryContractsByPrivilegeTypeRequest) (*QueryContractsByPrivilegeTypeResponse, error) }
QueryServer is the server API for Query service.
type RegisteredPrivilege ¶
type RegisteredPrivilege struct { Position uint32 `protobuf:"varint,1,opt,name=position,proto3" json:"position,omitempty"` PrivilegeType string `protobuf:"bytes,2,opt,name=privilege_type,json=privilegeType,proto3" json:"privilege_type,omitempty"` }
RegisteredPrivilege stores position and privilege name
func (*RegisteredPrivilege) Descriptor ¶
func (*RegisteredPrivilege) Descriptor() ([]byte, []int)
func (*RegisteredPrivilege) Equal ¶
func (this *RegisteredPrivilege) Equal(that interface{}) bool
func (*RegisteredPrivilege) Marshal ¶
func (m *RegisteredPrivilege) Marshal() (dAtA []byte, err error)
func (*RegisteredPrivilege) MarshalTo ¶
func (m *RegisteredPrivilege) MarshalTo(dAtA []byte) (int, error)
func (*RegisteredPrivilege) MarshalToSizedBuffer ¶
func (m *RegisteredPrivilege) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RegisteredPrivilege) ProtoMessage ¶
func (*RegisteredPrivilege) ProtoMessage()
func (*RegisteredPrivilege) Reset ¶
func (m *RegisteredPrivilege) Reset()
func (*RegisteredPrivilege) Size ¶
func (m *RegisteredPrivilege) Size() (n int)
func (*RegisteredPrivilege) String ¶
func (m *RegisteredPrivilege) String() string
func (*RegisteredPrivilege) Unmarshal ¶
func (m *RegisteredPrivilege) Unmarshal(dAtA []byte) error
func (RegisteredPrivilege) ValidateBasic ¶
func (r RegisteredPrivilege) ValidateBasic() error
ValidateBasic syntax checks
func (*RegisteredPrivilege) XXX_DiscardUnknown ¶
func (m *RegisteredPrivilege) XXX_DiscardUnknown()
func (*RegisteredPrivilege) XXX_Marshal ¶
func (m *RegisteredPrivilege) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RegisteredPrivilege) XXX_Merge ¶
func (m *RegisteredPrivilege) XXX_Merge(src proto.Message)
func (*RegisteredPrivilege) XXX_Size ¶
func (m *RegisteredPrivilege) XXX_Size() int
func (*RegisteredPrivilege) XXX_Unmarshal ¶
func (m *RegisteredPrivilege) XXX_Unmarshal(b []byte) error
type Staker ¶ added in v0.8.0
type Staker interface { SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error DelegateCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error UndelegateCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error }
Staker for vesting account staking
type TWasmConfig ¶
type TWasmConfig struct {
WasmConfig wasmtypes.WasmConfig
}
func DefaultTWasmConfig ¶
func DefaultTWasmConfig() TWasmConfig
type TgradeContractDetails ¶
type TgradeContractDetails struct {
RegisteredPrivileges []RegisteredPrivilege `protobuf:"bytes,1,rep,name=registered_privileges,json=registeredPrivileges,proto3" json:"registered_privileges"`
}
TgradeContractDetails is a custom extension to the wasmd ContractInfo
func TgradeContractDetailsFixture ¶
func TgradeContractDetailsFixture(t *testing.T, mutators ...func(d *TgradeContractDetails)) TgradeContractDetails
func (*TgradeContractDetails) AddRegisteredPrivilege ¶
func (d *TgradeContractDetails) AddRegisteredPrivilege(t PrivilegeType, pos uint8)
AddRegisteredPrivilege add privilege type to list
func (*TgradeContractDetails) Descriptor ¶
func (*TgradeContractDetails) Descriptor() ([]byte, []int)
func (*TgradeContractDetails) Equal ¶
func (this *TgradeContractDetails) Equal(that interface{}) bool
func (*TgradeContractDetails) HasRegisteredPrivilege ¶
func (d *TgradeContractDetails) HasRegisteredPrivilege(c PrivilegeType) bool
HasRegisteredPrivilege returns true when given type was registered by this contract
func (TgradeContractDetails) IterateRegisteredPrivileges ¶
func (d TgradeContractDetails) IterateRegisteredPrivileges(cb func(c PrivilegeType, pos uint8) bool)
func (*TgradeContractDetails) Marshal ¶
func (m *TgradeContractDetails) Marshal() (dAtA []byte, err error)
func (*TgradeContractDetails) MarshalTo ¶
func (m *TgradeContractDetails) MarshalTo(dAtA []byte) (int, error)
func (*TgradeContractDetails) MarshalToSizedBuffer ¶
func (m *TgradeContractDetails) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TgradeContractDetails) ProtoMessage ¶
func (*TgradeContractDetails) ProtoMessage()
func (*TgradeContractDetails) RemoveRegisteredPrivilege ¶
func (d *TgradeContractDetails) RemoveRegisteredPrivilege(t PrivilegeType, pos uint8)
RemoveRegisteredPrivilege remove privilege type from list
func (*TgradeContractDetails) Reset ¶
func (m *TgradeContractDetails) Reset()
func (*TgradeContractDetails) Size ¶
func (m *TgradeContractDetails) Size() (n int)
func (*TgradeContractDetails) String ¶
func (m *TgradeContractDetails) String() string
func (*TgradeContractDetails) Unmarshal ¶
func (m *TgradeContractDetails) Unmarshal(dAtA []byte) error
func (TgradeContractDetails) ValidateBasic ¶
func (d TgradeContractDetails) ValidateBasic() error
ValidateBasic syntax checks
func (*TgradeContractDetails) XXX_DiscardUnknown ¶
func (m *TgradeContractDetails) XXX_DiscardUnknown()
func (*TgradeContractDetails) XXX_Marshal ¶
func (m *TgradeContractDetails) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TgradeContractDetails) XXX_Merge ¶
func (m *TgradeContractDetails) XXX_Merge(src proto.Message)
func (*TgradeContractDetails) XXX_Size ¶
func (m *TgradeContractDetails) XXX_Size() int
func (*TgradeContractDetails) XXX_Unmarshal ¶
func (m *TgradeContractDetails) XXX_Unmarshal(b []byte) error
type UnimplementedQueryServer ¶
type UnimplementedQueryServer struct{}
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) ContractsByPrivilegeType ¶
func (*UnimplementedQueryServer) ContractsByPrivilegeType(ctx context.Context, req *QueryContractsByPrivilegeTypeRequest) (*QueryContractsByPrivilegeTypeResponse, error)
func (*UnimplementedQueryServer) PrivilegedContracts ¶
func (*UnimplementedQueryServer) PrivilegedContracts(ctx context.Context, req *QueryPrivilegedContractsRequest) (*QueryPrivilegedContractsResponse, error)