types

package
v0.0.0-...-74c1675 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: LGPL-3.0 Imports: 35 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeCustomPrecompiledContractDeployed = "cpc_deployed"
	EventTypeCustomPrecompiledContractUpdated  = "cpc_updated"

	AttributeKeyCpcAddress   = "address"
	AttributeKeyCpcName      = "name"
	AttributeKeyCpcTypedMeta = "typed_meta"
	AttributeKeyCpcType      = "type"
)

CPC module events

View Source
const (
	// ModuleName defines the module name
	ModuleName = "cpc"

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

	// RouterKey defines the module's message routing key
	RouterKey = ModuleName
)
View Source
const (
	CpcTypeErc20 uint32 = iota + 1
	CpcTypeStaking
	CpcTypeBech32
)
View Source
const EmptyTypedMeta = "{}"
View Source
const (
	GasVerifyEIP712 = 200_000
)

Variables

View Source
var (
	// ErrInvalidCpcInput returns an error if the input for the custom-precompiled-contract is invalid
	ErrInvalidCpcInput = errorsmod.Register(ModuleName, codeErrInvalidCpcInput, "invalid input for custom precompiled contract")

	// ErrNotSupportedByCpc returns an error if the method is not supported by current custom-precompiled-contract implementation
	ErrNotSupportedByCpc = errorsmod.Register(ModuleName, codeErrNotSupportedByCpc, "currently not supported by custom precompiled contract")

	// ErrExecFailure returns an error if the execution of the custom precompiled contract fails
	ErrExecFailure = errorsmod.Register(ModuleName, codeErrExecFailure, "execution of the custom precompiled contract failed")
)
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 (
	KeyPrefixParams                        = []byte{prefixParams}
	KeyPrefixCustomPrecompiledContractMeta = []byte{prefixCustomPrecompiledContractMeta}
	KeyPrefixErc20CpcDenomToAddress        = []byte{prefixErc20CpcDenomToAddress}
	KeyPrefixErc20CpcAllowance             = []byte{prefixErc20CpcAllowance}
)

KVStore key prefixes

View Source
var (
	// CpcStakingFixedAddress is the address of the staking custom precompiled contract.
	CpcStakingFixedAddress common.Address

	// CpcBech32FixedAddress is the address of the bech32 custom precompiled contract.
	CpcBech32FixedAddress common.Address
)
View Source
var (
	ErrInvalidLengthPrecompiles        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPrecompiles          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPrecompiles = 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")
)
View Source
var BigMaxUint256 = new(big.Int).SetBytes([]byte{
	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
	0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
})
View Source
var CpcModuleAddress common.Address

CpcModuleAddress is the ethereum address of the module account

View Source
var PseudoCodePrecompiled []byte

PseudoCodePrecompiled is the pseudocode for the custom precompiled contracts. Used to work around the issue that the UI fetches the contract code to check if the contract is a contract, while precompiled contracts do not have code.

Functions

func CustomPrecompiledContractMetaKey

func CustomPrecompiledContractMetaKey(contractAddr common.Address) []byte

func Erc20CustomPrecompiledContractAllowanceKey

func Erc20CustomPrecompiledContractAllowanceKey(owner, spender common.Address) []byte

func Erc20CustomPrecompiledContractMinDenomToAddressKey

func Erc20CustomPrecompiledContractMinDenomToAddressKey(minDenom string) []byte

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers the necessary types and interfaces for the module

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers implementations by its interface, for the module

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 CustomPrecompiledContractMeta

type CustomPrecompiledContractMeta struct {
	// address is the address of the precompiled contract.
	Address []byte `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// custom_precompiled_type presents the type of the precompiled contract, eg: erc20, staking,...
	CustomPrecompiledType uint32 `` /* 127-byte string literal not displayed */
	// name of the precompiled contract.
	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	// typed_meta is the json-encoded metadata of the precompiled contract, type-based.
	TypedMeta string `protobuf:"bytes,4,opt,name=typed_meta,json=typedMeta,proto3" json:"typed_meta,omitempty"`
	// disabled is the flag to disable the precompiled contract.
	Disabled bool `protobuf:"varint,5,opt,name=disabled,proto3" json:"disabled,omitempty"`
}

CustomPrecompiledContractMeta is metadata of the custom precompiled contract. It is used to define the custom precompiled contract and its metadata.

func (*CustomPrecompiledContractMeta) Descriptor

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

func (*CustomPrecompiledContractMeta) GetAddress

func (m *CustomPrecompiledContractMeta) GetAddress() []byte

func (*CustomPrecompiledContractMeta) GetCustomPrecompiledType

func (m *CustomPrecompiledContractMeta) GetCustomPrecompiledType() uint32

func (*CustomPrecompiledContractMeta) GetDisabled

func (m *CustomPrecompiledContractMeta) GetDisabled() bool

func (*CustomPrecompiledContractMeta) GetName

func (*CustomPrecompiledContractMeta) GetTypedMeta

func (m *CustomPrecompiledContractMeta) GetTypedMeta() string

func (*CustomPrecompiledContractMeta) Marshal

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

func (*CustomPrecompiledContractMeta) MarshalTo

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

func (*CustomPrecompiledContractMeta) MarshalToSizedBuffer

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

func (*CustomPrecompiledContractMeta) ProtoMessage

func (*CustomPrecompiledContractMeta) ProtoMessage()

func (*CustomPrecompiledContractMeta) Reset

func (m *CustomPrecompiledContractMeta) Reset()

func (*CustomPrecompiledContractMeta) Size

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

func (*CustomPrecompiledContractMeta) String

func (*CustomPrecompiledContractMeta) Unmarshal

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

func (CustomPrecompiledContractMeta) Validate

func (*CustomPrecompiledContractMeta) XXX_DiscardUnknown

func (m *CustomPrecompiledContractMeta) XXX_DiscardUnknown()

func (*CustomPrecompiledContractMeta) XXX_Marshal

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

func (*CustomPrecompiledContractMeta) XXX_Merge

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

func (*CustomPrecompiledContractMeta) XXX_Size

func (m *CustomPrecompiledContractMeta) XXX_Size() int

func (*CustomPrecompiledContractMeta) XXX_Unmarshal

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

type Erc20CustomPrecompiledContractMeta

type Erc20CustomPrecompiledContractMeta struct {
	// Symbol is the symbol of the ERC20 token.
	Symbol string `json:"symbol"`
	// Decimals is the number of decimals the ERC20 token uses.
	Decimals uint8 `json:"decimals"`
	// MinDenom is the minimum denomination of the ERC20 token, present the corresponding denom in the `x/bank` module.
	MinDenom string `json:"min_denom"`
}

Erc20CustomPrecompiledContractMeta is the metadata for the ERC20 custom precompiled contract. ERC20 custom precompiled contract is a contract that can be used to interact with `x/bank` module to directly manage the assets using ERC20 interface.

func (Erc20CustomPrecompiledContractMeta) Validate

type GenesisState

type GenesisState struct {
	// params defines all the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// deploy_erc20_native defines if the module should deploy the ERC20 contract for native coin.
	// The denom of the native coin is the same as staking denom.
	DeployErc20Native bool `protobuf:"varint,2,opt,name=deploy_erc20_native,json=deployErc20Native,proto3" json:"deploy_erc20_native,omitempty"`
	// deploy_staking_contract defines if the module should deploy the staking contract.
	DeployStakingContract bool `` /* 127-byte string literal not displayed */
}

GenesisState defines the 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) GetDeployErc20Native

func (m *GenesisState) GetDeployErc20Native() bool

func (*GenesisState) GetDeployStakingContract

func (m *GenesisState) GetDeployStakingContract() bool

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (m 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 {
	// UpdateParams defined a governance operation for updating the x/cpc module parameters.
	// The authority is hard-coded to the Cosmos SDK x/gov module account
	UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
	// DeployErc20Contract defines a method deploying a new ERC20 contract.
	DeployErc20Contract(ctx context.Context, in *MsgDeployErc20ContractRequest, opts ...grpc.CallOption) (*MsgDeployErc20ContractResponse, error)
	// DeployStakingContract defines a method deploying a new staking contract.
	DeployStakingContract(ctx context.Context, in *MsgDeployStakingContractRequest, opts ...grpc.CallOption) (*MsgDeployStakingContractResponse, 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 MsgDeployErc20ContractRequest

type MsgDeployErc20ContractRequest struct {
	// authority is the address of the deployer account, must be available as whitelisted in module params.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// name is the name of the ERC20 token.
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// symbol is the symbol of the ERC20 token.
	Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// decimals is the number of decimals of the ERC20 token.
	Decimals uint32 `protobuf:"varint,4,opt,name=decimals,proto3" json:"decimals,omitempty"`
	// min_denom is the minimum denomination of the ERC20 token.
	MinDenom string `protobuf:"bytes,5,opt,name=min_denom,json=minDenom,proto3" json:"min_denom,omitempty"`
}

MsgDeployErc20ContractRequest defines a Msg for deploying a new ERC20 contract.

func (*MsgDeployErc20ContractRequest) Descriptor

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

func (*MsgDeployErc20ContractRequest) GetAuthority

func (m *MsgDeployErc20ContractRequest) GetAuthority() string

func (*MsgDeployErc20ContractRequest) GetDecimals

func (m *MsgDeployErc20ContractRequest) GetDecimals() uint32

func (*MsgDeployErc20ContractRequest) GetMinDenom

func (m *MsgDeployErc20ContractRequest) GetMinDenom() string

func (*MsgDeployErc20ContractRequest) GetName

func (*MsgDeployErc20ContractRequest) GetSymbol

func (m *MsgDeployErc20ContractRequest) GetSymbol() string

func (*MsgDeployErc20ContractRequest) Marshal

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

func (*MsgDeployErc20ContractRequest) MarshalTo

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

func (*MsgDeployErc20ContractRequest) MarshalToSizedBuffer

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

func (*MsgDeployErc20ContractRequest) ProtoMessage

func (*MsgDeployErc20ContractRequest) ProtoMessage()

func (*MsgDeployErc20ContractRequest) Reset

func (m *MsgDeployErc20ContractRequest) Reset()

func (*MsgDeployErc20ContractRequest) Size

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

func (*MsgDeployErc20ContractRequest) String

func (*MsgDeployErc20ContractRequest) Unmarshal

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

func (MsgDeployErc20ContractRequest) ValidateBasic

func (m MsgDeployErc20ContractRequest) ValidateBasic() error

func (*MsgDeployErc20ContractRequest) XXX_DiscardUnknown

func (m *MsgDeployErc20ContractRequest) XXX_DiscardUnknown()

func (*MsgDeployErc20ContractRequest) XXX_Marshal

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

func (*MsgDeployErc20ContractRequest) XXX_Merge

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

func (*MsgDeployErc20ContractRequest) XXX_Size

func (m *MsgDeployErc20ContractRequest) XXX_Size() int

func (*MsgDeployErc20ContractRequest) XXX_Unmarshal

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

type MsgDeployErc20ContractResponse

type MsgDeployErc20ContractResponse struct {
	// contract_address is the address of the deployed ERC20 contract.
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
}

MsgDeployErc20ContractResponse defines the Msg/DeployErc20Contract response type.

func (*MsgDeployErc20ContractResponse) Descriptor

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

func (*MsgDeployErc20ContractResponse) GetContractAddress

func (m *MsgDeployErc20ContractResponse) GetContractAddress() string

func (*MsgDeployErc20ContractResponse) Marshal

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

func (*MsgDeployErc20ContractResponse) MarshalTo

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

func (*MsgDeployErc20ContractResponse) MarshalToSizedBuffer

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

func (*MsgDeployErc20ContractResponse) ProtoMessage

func (*MsgDeployErc20ContractResponse) ProtoMessage()

func (*MsgDeployErc20ContractResponse) Reset

func (m *MsgDeployErc20ContractResponse) Reset()

func (*MsgDeployErc20ContractResponse) Size

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

func (*MsgDeployErc20ContractResponse) String

func (*MsgDeployErc20ContractResponse) Unmarshal

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

func (*MsgDeployErc20ContractResponse) XXX_DiscardUnknown

func (m *MsgDeployErc20ContractResponse) XXX_DiscardUnknown()

func (*MsgDeployErc20ContractResponse) XXX_Marshal

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

func (*MsgDeployErc20ContractResponse) XXX_Merge

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

func (*MsgDeployErc20ContractResponse) XXX_Size

func (m *MsgDeployErc20ContractResponse) XXX_Size() int

func (*MsgDeployErc20ContractResponse) XXX_Unmarshal

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

type MsgDeployStakingContractRequest

type MsgDeployStakingContractRequest struct {
	// authority is the address of the deployer account, must be available as whitelisted in module params.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// symbol is the symbol of the staking coin.
	Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// decimals is the number of decimals of the staking coin.
	Decimals uint32 `protobuf:"varint,3,opt,name=decimals,proto3" json:"decimals,omitempty"`
}

MsgDeployStakingContractRequest defines a Msg for deploying a new Staking contract.

func (*MsgDeployStakingContractRequest) Descriptor

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

func (*MsgDeployStakingContractRequest) GetAuthority

func (m *MsgDeployStakingContractRequest) GetAuthority() string

func (*MsgDeployStakingContractRequest) GetDecimals

func (m *MsgDeployStakingContractRequest) GetDecimals() uint32

func (*MsgDeployStakingContractRequest) GetSymbol

func (m *MsgDeployStakingContractRequest) GetSymbol() string

func (*MsgDeployStakingContractRequest) Marshal

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

func (*MsgDeployStakingContractRequest) MarshalTo

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

func (*MsgDeployStakingContractRequest) MarshalToSizedBuffer

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

func (*MsgDeployStakingContractRequest) ProtoMessage

func (*MsgDeployStakingContractRequest) ProtoMessage()

func (*MsgDeployStakingContractRequest) Reset

func (*MsgDeployStakingContractRequest) Size

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

func (*MsgDeployStakingContractRequest) String

func (*MsgDeployStakingContractRequest) Unmarshal

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

func (MsgDeployStakingContractRequest) ValidateBasic

func (m MsgDeployStakingContractRequest) ValidateBasic() error

func (*MsgDeployStakingContractRequest) XXX_DiscardUnknown

func (m *MsgDeployStakingContractRequest) XXX_DiscardUnknown()

func (*MsgDeployStakingContractRequest) XXX_Marshal

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

func (*MsgDeployStakingContractRequest) XXX_Merge

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

func (*MsgDeployStakingContractRequest) XXX_Size

func (m *MsgDeployStakingContractRequest) XXX_Size() int

func (*MsgDeployStakingContractRequest) XXX_Unmarshal

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

type MsgDeployStakingContractResponse

type MsgDeployStakingContractResponse struct {
	// contract_address is the address of the deployed staking contract.
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
}

MsgDeployErc20ContractResponse defines the Msg/DeployStakingContract response type.

func (*MsgDeployStakingContractResponse) Descriptor

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

func (*MsgDeployStakingContractResponse) GetContractAddress

func (m *MsgDeployStakingContractResponse) GetContractAddress() string

func (*MsgDeployStakingContractResponse) Marshal

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

func (*MsgDeployStakingContractResponse) MarshalTo

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

func (*MsgDeployStakingContractResponse) MarshalToSizedBuffer

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

func (*MsgDeployStakingContractResponse) ProtoMessage

func (*MsgDeployStakingContractResponse) ProtoMessage()

func (*MsgDeployStakingContractResponse) Reset

func (*MsgDeployStakingContractResponse) Size

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

func (*MsgDeployStakingContractResponse) String

func (*MsgDeployStakingContractResponse) Unmarshal

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

func (*MsgDeployStakingContractResponse) XXX_DiscardUnknown

func (m *MsgDeployStakingContractResponse) XXX_DiscardUnknown()

func (*MsgDeployStakingContractResponse) XXX_Marshal

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

func (*MsgDeployStakingContractResponse) XXX_Merge

func (*MsgDeployStakingContractResponse) XXX_Size

func (m *MsgDeployStakingContractResponse) XXX_Size() int

func (*MsgDeployStakingContractResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// UpdateParams defined a governance operation for updating the x/cpc module parameters.
	// The authority is hard-coded to the Cosmos SDK x/gov module account
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
	// DeployErc20Contract defines a method deploying a new ERC20 contract.
	DeployErc20Contract(context.Context, *MsgDeployErc20ContractRequest) (*MsgDeployErc20ContractResponse, error)
	// DeployStakingContract defines a method deploying a new staking contract.
	DeployStakingContract(context.Context, *MsgDeployStakingContractRequest) (*MsgDeployStakingContractResponse, 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"`
	// new_params for the x/cpc module.
	NewParams Params `protobuf:"bytes,2,opt,name=new_params,json=newParams,proto3" json:"new_params"`
}

MsgUpdateParams defines a Msg for updating the x/cpc module parameters.

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetNewParams

func (m *MsgUpdateParams) GetNewParams() Params

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

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

func (*MsgUpdateParams) String

func (m *MsgUpdateParams) String() string

func (*MsgUpdateParams) Unmarshal

func (m *MsgUpdateParams) Unmarshal(dAtA []byte) 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 {
}

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.

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 {
	// protocol_version is the protocol version of the cpc module
	ProtocolVersion uint32 `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"`
	// whitelisted_deployers is the address of the accounts permitted to deploy the Custom Precompiled Contracts
	WhitelistedDeployers []string `protobuf:"bytes,2,rep,name=whitelisted_deployers,json=whitelistedDeployers,proto3" json:"whitelisted_deployers,omitempty"`
}

Params defines the cpc module params

func DefaultParams

func DefaultParams() Params

func (*Params) Descriptor

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

func (*Params) GetProtocolVersion

func (m *Params) GetProtocolVersion() uint32

func (*Params) GetWhitelistedDeployers

func (m *Params) GetWhitelistedDeployers() []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) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (m 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 ProtocolCpc

type ProtocolCpc uint32
const (
	ProtocolCpcV1 ProtocolCpc = 1

	LatestProtocolCpc = ProtocolCpcV1
)

type QueryClient

type QueryClient interface {
	// CustomPrecompiledContracts queries the list of deployed custom precompiled contracts.
	CustomPrecompiledContracts(ctx context.Context, in *QueryCustomPrecompiledContractsRequest, opts ...grpc.CallOption) (*QueryCustomPrecompiledContractsResponse, error)
	// CustomPrecompiledContract queries the list of deployed custom precompiled contract.
	CustomPrecompiledContract(ctx context.Context, in *QueryCustomPrecompiledContractRequest, opts ...grpc.CallOption) (*QueryCustomPrecompiledContractResponse, error)
	// Erc20CustomPrecompiledContractByDenom queries the list of deployed custom precompiled contract by denom.
	Erc20CustomPrecompiledContractByDenom(ctx context.Context, in *QueryErc20CustomPrecompiledContractByDenomRequest, opts ...grpc.CallOption) (*QueryErc20CustomPrecompiledContractByDenomResponse, error)
	// Params queries the parameters of x/cpc module.
	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 QueryCustomPrecompiledContractRequest

type QueryCustomPrecompiledContractRequest struct {
	// address is the ethereum hex address to query the custom precompiled contract for.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryCustomPrecompiledContractRequest is the request type for the Query/CustomPrecompiledContract RPC method.

func (*QueryCustomPrecompiledContractRequest) Descriptor

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

func (*QueryCustomPrecompiledContractRequest) GetAddress

func (*QueryCustomPrecompiledContractRequest) Marshal

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

func (*QueryCustomPrecompiledContractRequest) MarshalTo

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

func (*QueryCustomPrecompiledContractRequest) MarshalToSizedBuffer

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

func (*QueryCustomPrecompiledContractRequest) ProtoMessage

func (*QueryCustomPrecompiledContractRequest) ProtoMessage()

func (*QueryCustomPrecompiledContractRequest) Reset

func (*QueryCustomPrecompiledContractRequest) Size

func (*QueryCustomPrecompiledContractRequest) String

func (*QueryCustomPrecompiledContractRequest) Unmarshal

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

func (*QueryCustomPrecompiledContractRequest) XXX_DiscardUnknown

func (m *QueryCustomPrecompiledContractRequest) XXX_DiscardUnknown()

func (*QueryCustomPrecompiledContractRequest) XXX_Marshal

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

func (*QueryCustomPrecompiledContractRequest) XXX_Merge

func (*QueryCustomPrecompiledContractRequest) XXX_Size

func (*QueryCustomPrecompiledContractRequest) XXX_Unmarshal

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

type QueryCustomPrecompiledContractResponse

type QueryCustomPrecompiledContractResponse struct {
	// contract is the deployed custom precompiled contract
	Contract WrappedCustomPrecompiledContractMeta `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract"`
}

QueryCustomPrecompiledContractResponse is the response type for the Query/CustomPrecompiledContract RPC method.

func (*QueryCustomPrecompiledContractResponse) Descriptor

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

func (*QueryCustomPrecompiledContractResponse) GetContract

func (*QueryCustomPrecompiledContractResponse) Marshal

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

func (*QueryCustomPrecompiledContractResponse) MarshalTo

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

func (*QueryCustomPrecompiledContractResponse) MarshalToSizedBuffer

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

func (*QueryCustomPrecompiledContractResponse) ProtoMessage

func (*QueryCustomPrecompiledContractResponse) Reset

func (*QueryCustomPrecompiledContractResponse) Size

func (*QueryCustomPrecompiledContractResponse) String

func (*QueryCustomPrecompiledContractResponse) Unmarshal

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

func (*QueryCustomPrecompiledContractResponse) XXX_DiscardUnknown

func (m *QueryCustomPrecompiledContractResponse) XXX_DiscardUnknown()

func (*QueryCustomPrecompiledContractResponse) XXX_Marshal

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

func (*QueryCustomPrecompiledContractResponse) XXX_Merge

func (*QueryCustomPrecompiledContractResponse) XXX_Size

func (*QueryCustomPrecompiledContractResponse) XXX_Unmarshal

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

type QueryCustomPrecompiledContractsRequest

type QueryCustomPrecompiledContractsRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryCustomPrecompiledContractsRequest is the request type for the Query/CustomPrecompiledContracts RPC method.

func (*QueryCustomPrecompiledContractsRequest) Descriptor

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

func (*QueryCustomPrecompiledContractsRequest) GetPagination

func (*QueryCustomPrecompiledContractsRequest) Marshal

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

func (*QueryCustomPrecompiledContractsRequest) MarshalTo

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

func (*QueryCustomPrecompiledContractsRequest) MarshalToSizedBuffer

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

func (*QueryCustomPrecompiledContractsRequest) ProtoMessage

func (*QueryCustomPrecompiledContractsRequest) Reset

func (*QueryCustomPrecompiledContractsRequest) Size

func (*QueryCustomPrecompiledContractsRequest) String

func (*QueryCustomPrecompiledContractsRequest) Unmarshal

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

func (*QueryCustomPrecompiledContractsRequest) XXX_DiscardUnknown

func (m *QueryCustomPrecompiledContractsRequest) XXX_DiscardUnknown()

func (*QueryCustomPrecompiledContractsRequest) XXX_Marshal

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

func (*QueryCustomPrecompiledContractsRequest) XXX_Merge

func (*QueryCustomPrecompiledContractsRequest) XXX_Size

func (*QueryCustomPrecompiledContractsRequest) XXX_Unmarshal

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

type QueryCustomPrecompiledContractsResponse

type QueryCustomPrecompiledContractsResponse struct {
	// contracts is a slice of deployed custom precompiled contracts.
	Contracts []WrappedCustomPrecompiledContractMeta `protobuf:"bytes,1,rep,name=contracts,proto3" json:"contracts"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryCustomPrecompiledContractsResponse is the response type for the Query/CustomPrecompiledContracts RPC method.

func (*QueryCustomPrecompiledContractsResponse) Descriptor

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

func (*QueryCustomPrecompiledContractsResponse) GetContracts

func (*QueryCustomPrecompiledContractsResponse) GetPagination

func (*QueryCustomPrecompiledContractsResponse) Marshal

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

func (*QueryCustomPrecompiledContractsResponse) MarshalTo

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

func (*QueryCustomPrecompiledContractsResponse) MarshalToSizedBuffer

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

func (*QueryCustomPrecompiledContractsResponse) ProtoMessage

func (*QueryCustomPrecompiledContractsResponse) Reset

func (*QueryCustomPrecompiledContractsResponse) Size

func (*QueryCustomPrecompiledContractsResponse) String

func (*QueryCustomPrecompiledContractsResponse) Unmarshal

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

func (*QueryCustomPrecompiledContractsResponse) XXX_DiscardUnknown

func (m *QueryCustomPrecompiledContractsResponse) XXX_DiscardUnknown()

func (*QueryCustomPrecompiledContractsResponse) XXX_Marshal

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

func (*QueryCustomPrecompiledContractsResponse) XXX_Merge

func (*QueryCustomPrecompiledContractsResponse) XXX_Size

func (*QueryCustomPrecompiledContractsResponse) XXX_Unmarshal

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

type QueryErc20CustomPrecompiledContractByDenomRequest

type QueryErc20CustomPrecompiledContractByDenomRequest struct {
	// min_denom is the minimum denomination to query the custom precompiled contract for.
	MinDenom string `protobuf:"bytes,1,opt,name=min_denom,json=minDenom,proto3" json:"min_denom,omitempty"`
}

QueryErc20CustomPrecompiledContractByDenomRequest is the request type for the Query/Erc20CustomPrecompiledContractByDenom RPC method.

func (*QueryErc20CustomPrecompiledContractByDenomRequest) Descriptor

func (*QueryErc20CustomPrecompiledContractByDenomRequest) GetMinDenom

func (*QueryErc20CustomPrecompiledContractByDenomRequest) Marshal

func (*QueryErc20CustomPrecompiledContractByDenomRequest) MarshalTo

func (*QueryErc20CustomPrecompiledContractByDenomRequest) MarshalToSizedBuffer

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

func (*QueryErc20CustomPrecompiledContractByDenomRequest) ProtoMessage

func (*QueryErc20CustomPrecompiledContractByDenomRequest) Reset

func (*QueryErc20CustomPrecompiledContractByDenomRequest) Size

func (*QueryErc20CustomPrecompiledContractByDenomRequest) String

func (*QueryErc20CustomPrecompiledContractByDenomRequest) Unmarshal

func (*QueryErc20CustomPrecompiledContractByDenomRequest) XXX_DiscardUnknown

func (m *QueryErc20CustomPrecompiledContractByDenomRequest) XXX_DiscardUnknown()

func (*QueryErc20CustomPrecompiledContractByDenomRequest) XXX_Marshal

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

func (*QueryErc20CustomPrecompiledContractByDenomRequest) XXX_Merge

func (*QueryErc20CustomPrecompiledContractByDenomRequest) XXX_Size

func (*QueryErc20CustomPrecompiledContractByDenomRequest) XXX_Unmarshal

type QueryErc20CustomPrecompiledContractByDenomResponse

type QueryErc20CustomPrecompiledContractByDenomResponse struct {
	Contract WrappedCustomPrecompiledContractMeta `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract"`
}

QueryErc20CustomPrecompiledContractByDenomResponse is the response type for the Query/Erc20CustomPrecompiledContractByDenom RPC method.

func (*QueryErc20CustomPrecompiledContractByDenomResponse) Descriptor

func (*QueryErc20CustomPrecompiledContractByDenomResponse) GetContract

func (*QueryErc20CustomPrecompiledContractByDenomResponse) Marshal

func (*QueryErc20CustomPrecompiledContractByDenomResponse) MarshalTo

func (*QueryErc20CustomPrecompiledContractByDenomResponse) MarshalToSizedBuffer

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

func (*QueryErc20CustomPrecompiledContractByDenomResponse) ProtoMessage

func (*QueryErc20CustomPrecompiledContractByDenomResponse) Reset

func (*QueryErc20CustomPrecompiledContractByDenomResponse) Size

func (*QueryErc20CustomPrecompiledContractByDenomResponse) String

func (*QueryErc20CustomPrecompiledContractByDenomResponse) Unmarshal

func (*QueryErc20CustomPrecompiledContractByDenomResponse) XXX_DiscardUnknown

func (*QueryErc20CustomPrecompiledContractByDenomResponse) XXX_Marshal

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

func (*QueryErc20CustomPrecompiledContractByDenomResponse) XXX_Merge

func (*QueryErc20CustomPrecompiledContractByDenomResponse) XXX_Size

func (*QueryErc20CustomPrecompiledContractByDenomResponse) XXX_Unmarshal

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest defines the request type for querying x/cpc module parameters.

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 define the cpc module parameters.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse defines the response type for querying x/cpc module parameters.

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 {
	// CustomPrecompiledContracts queries the list of deployed custom precompiled contracts.
	CustomPrecompiledContracts(context.Context, *QueryCustomPrecompiledContractsRequest) (*QueryCustomPrecompiledContractsResponse, error)
	// CustomPrecompiledContract queries the list of deployed custom precompiled contract.
	CustomPrecompiledContract(context.Context, *QueryCustomPrecompiledContractRequest) (*QueryCustomPrecompiledContractResponse, error)
	// Erc20CustomPrecompiledContractByDenom queries the list of deployed custom precompiled contract by denom.
	Erc20CustomPrecompiledContractByDenom(context.Context, *QueryErc20CustomPrecompiledContractByDenomRequest) (*QueryErc20CustomPrecompiledContractByDenomResponse, error)
	// Params queries the parameters of x/cpc module.
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
}

QueryServer is the server API for Query service.

type StakingCustomPrecompiledContractMeta

type StakingCustomPrecompiledContractMeta struct {
	// Symbol is the symbol of the staking coin.
	Symbol string `json:"symbol"`
	// Decimals is the number of decimals the ERC20 token uses.
	Decimals uint8 `json:"decimals"`
}

StakingCustomPrecompiledContractMeta is the metadata for the staking custom precompiled contract. Staking custom precompiled contract is a contract that can be used to interact with `x/staking` and `x/distribution` modules to directly manage staking assets.

func (StakingCustomPrecompiledContractMeta) Validate

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) DeployErc20Contract

func (*UnimplementedMsgServer) DeployStakingContract

func (*UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Params

type WrappedCustomPrecompiledContractMeta

type WrappedCustomPrecompiledContractMeta struct {
	// address is the ethereum hex address of the custom precompiled contract.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// type_name is the friendly name of the custom precompiled contract type.
	TypeName string `protobuf:"bytes,2,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
	// meta is the custom precompiled contract meta
	Meta CustomPrecompiledContractMeta `protobuf:"bytes,3,opt,name=meta,proto3" json:"meta"`
}

func (*WrappedCustomPrecompiledContractMeta) Descriptor

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

func (*WrappedCustomPrecompiledContractMeta) GetAddress

func (*WrappedCustomPrecompiledContractMeta) GetMeta

func (*WrappedCustomPrecompiledContractMeta) GetTypeName

func (*WrappedCustomPrecompiledContractMeta) Marshal

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

func (*WrappedCustomPrecompiledContractMeta) MarshalTo

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

func (*WrappedCustomPrecompiledContractMeta) MarshalToSizedBuffer

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

func (*WrappedCustomPrecompiledContractMeta) ProtoMessage

func (*WrappedCustomPrecompiledContractMeta) ProtoMessage()

func (*WrappedCustomPrecompiledContractMeta) Reset

func (*WrappedCustomPrecompiledContractMeta) Size

func (*WrappedCustomPrecompiledContractMeta) String

func (*WrappedCustomPrecompiledContractMeta) Unmarshal

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

func (*WrappedCustomPrecompiledContractMeta) XXX_DiscardUnknown

func (m *WrappedCustomPrecompiledContractMeta) XXX_DiscardUnknown()

func (*WrappedCustomPrecompiledContractMeta) XXX_Marshal

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

func (*WrappedCustomPrecompiledContractMeta) XXX_Merge

func (*WrappedCustomPrecompiledContractMeta) XXX_Size

func (*WrappedCustomPrecompiledContractMeta) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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