types

package
v1.11.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// module name
	ModuleName = "_erc20"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey to be used for message routing
	RouterKey = ModuleName
)
View Source
const (
	ProposalTypeRegisterCoin          string = "RegisterCoin"
	ProposalTypeRegisterERC20         string = "RegisterERC20"
	ProposalTypeToggleTokenConversion string = "ToggleTokenConversion" // #nosec
)

constants

Variables

View Source
var (

	// ModuleCdc references the global erc20 module codec. Note, the codec should
	// ONLY be used in certain instances of tests and for JSON encoding.
	//
	// The actual codec used for serialization should be provided to modules/erc20 and
	// defined at the application level.
	ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())

	// AminoCdc is a amino codec created to support amino JSON compatible msgs.
	AminoCdc = codec.NewAminoCodec(amino)
)
View Source
var (
	ErrInvalidLengthErc20        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowErc20          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupErc20 = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	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 Owner_name = map[int32]string{
	0: "OWNER_UNSPECIFIED",
	1: "OWNER_MODULE",
	2: "OWNER_EXTERNAL",
}
View Source
var Owner_value = map[string]int32{
	"OWNER_UNSPECIFIED": 0,
	"OWNER_MODULE":      1,
	"OWNER_EXTERNAL":    2,
}

Functions

func NewRegisterCoinProposal

func NewRegisterCoinProposal(title, description string, coinMetadata ...banktypes.Metadata) v1beta1.Content

NewRegisterCoinProposal returns new instance of RegisterCoinProposal

func NewRegisterERC20Proposal

func NewRegisterERC20Proposal(title, description string, erc20Addreses ...string) v1beta1.Content

NewRegisterERC20Proposal returns new instance of RegisterERC20Proposal

func NewToggleTokenConversionProposal

func NewToggleTokenConversionProposal(title, description string, token string) v1beta1.Content

NewToggleTokenConversionProposal returns new instance of ToggleTokenConversionProposal

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register implementations

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers the necessary x/erc20 interfaces and concrete types on the provided LegacyAmino codec. These types are used for Amino JSON serialization and EIP-712 compatibility.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

Types

type GenesisState

type GenesisState struct {
	// params are the erc20 module parameters at genesis
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// token_pairs is a slice of the registered token pairs at genesis
	TokenPairs []TokenPair `protobuf:"bytes,2,rep,name=token_pairs,json=tokenPairs,proto3" json:"token_pairs"`
}

GenesisState defines the module's genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (*GenesisState) GetTokenPairs

func (m *GenesisState) GetTokenPairs() []TokenPair

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) 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 {
	// ConvertCoin mints a ERC20 representation of the native Cosmos coin denom
	// that is registered on the token mapping.
	ConvertCoin(ctx context.Context, in *MsgConvertCoin, opts ...grpc.CallOption) (*MsgConvertCoinResponse, error)
	// ConvertERC20 mints a native Cosmos coin representation of the ERC20 token
	// contract that is registered on the token mapping.
	ConvertERC20(ctx context.Context, in *MsgConvertERC20, opts ...grpc.CallOption) (*MsgConvertERC20Response, error)
	// UpdateParams defined a governance operation for updating the x/erc20 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)
}

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 MsgConvertCoin

type MsgConvertCoin struct {
	// coin is a Cosmos coin whose denomination is registered in a token pair. The coin
	// amount defines the amount of coins to convert.
	Coin types.Coin `protobuf:"bytes,1,opt,name=coin,proto3" json:"coin"`
	// receiver is the hex address to receive ERC20 token
	Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// sender is the cosmos bech32 address from the owner of the given Cosmos coins
	Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
}

MsgConvertCoin defines a Msg to convert a native Cosmos coin to a ERC20 token

func (*MsgConvertCoin) Descriptor

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

func (*MsgConvertCoin) GetCoin

func (m *MsgConvertCoin) GetCoin() types.Coin

func (*MsgConvertCoin) GetReceiver

func (m *MsgConvertCoin) GetReceiver() string

func (*MsgConvertCoin) GetSender

func (m *MsgConvertCoin) GetSender() string

func (*MsgConvertCoin) Marshal

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

func (*MsgConvertCoin) MarshalTo

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

func (*MsgConvertCoin) MarshalToSizedBuffer

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

func (*MsgConvertCoin) ProtoMessage

func (*MsgConvertCoin) ProtoMessage()

func (*MsgConvertCoin) Reset

func (m *MsgConvertCoin) Reset()

func (*MsgConvertCoin) Size

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

func (*MsgConvertCoin) String

func (m *MsgConvertCoin) String() string

func (*MsgConvertCoin) Unmarshal

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

func (*MsgConvertCoin) XXX_DiscardUnknown

func (m *MsgConvertCoin) XXX_DiscardUnknown()

func (*MsgConvertCoin) XXX_Marshal

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

func (*MsgConvertCoin) XXX_Merge

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

func (*MsgConvertCoin) XXX_Size

func (m *MsgConvertCoin) XXX_Size() int

func (*MsgConvertCoin) XXX_Unmarshal

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

type MsgConvertCoinResponse

type MsgConvertCoinResponse struct {
}

MsgConvertCoinResponse returns no fields

func (*MsgConvertCoinResponse) Descriptor

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

func (*MsgConvertCoinResponse) Marshal

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

func (*MsgConvertCoinResponse) MarshalTo

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

func (*MsgConvertCoinResponse) MarshalToSizedBuffer

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

func (*MsgConvertCoinResponse) ProtoMessage

func (*MsgConvertCoinResponse) ProtoMessage()

func (*MsgConvertCoinResponse) Reset

func (m *MsgConvertCoinResponse) Reset()

func (*MsgConvertCoinResponse) Size

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

func (*MsgConvertCoinResponse) String

func (m *MsgConvertCoinResponse) String() string

func (*MsgConvertCoinResponse) Unmarshal

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

func (*MsgConvertCoinResponse) XXX_DiscardUnknown

func (m *MsgConvertCoinResponse) XXX_DiscardUnknown()

func (*MsgConvertCoinResponse) XXX_Marshal

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

func (*MsgConvertCoinResponse) XXX_Merge

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

func (*MsgConvertCoinResponse) XXX_Size

func (m *MsgConvertCoinResponse) XXX_Size() int

func (*MsgConvertCoinResponse) XXX_Unmarshal

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

type MsgConvertERC20

type MsgConvertERC20 struct {
	// contract_address of an ERC20 token contract, that is registered in a token pair
	ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// amount of ERC20 tokens to convert
	Amount cosmossdk_io_math.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=cosmossdk.io/math.Int" json:"amount"`
	// receiver is the bech32 address to receive native Cosmos coins
	Receiver string `protobuf:"bytes,3,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// sender is the hex address from the owner of the given ERC20 tokens
	Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"`
}

MsgConvertERC20 defines a Msg to convert a ERC20 token to a native Cosmos coin.

func (*MsgConvertERC20) Descriptor

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

func (*MsgConvertERC20) GetContractAddress

func (m *MsgConvertERC20) GetContractAddress() string

func (*MsgConvertERC20) GetReceiver

func (m *MsgConvertERC20) GetReceiver() string

func (*MsgConvertERC20) GetSender

func (m *MsgConvertERC20) GetSender() string

func (*MsgConvertERC20) Marshal

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

func (*MsgConvertERC20) MarshalTo

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

func (*MsgConvertERC20) MarshalToSizedBuffer

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

func (*MsgConvertERC20) ProtoMessage

func (*MsgConvertERC20) ProtoMessage()

func (*MsgConvertERC20) Reset

func (m *MsgConvertERC20) Reset()

func (*MsgConvertERC20) Size

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

func (*MsgConvertERC20) String

func (m *MsgConvertERC20) String() string

func (*MsgConvertERC20) Unmarshal

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

func (*MsgConvertERC20) XXX_DiscardUnknown

func (m *MsgConvertERC20) XXX_DiscardUnknown()

func (*MsgConvertERC20) XXX_Marshal

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

func (*MsgConvertERC20) XXX_Merge

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

func (*MsgConvertERC20) XXX_Size

func (m *MsgConvertERC20) XXX_Size() int

func (*MsgConvertERC20) XXX_Unmarshal

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

type MsgConvertERC20Response

type MsgConvertERC20Response struct {
}

MsgConvertERC20Response returns no fields

func (*MsgConvertERC20Response) Descriptor

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

func (*MsgConvertERC20Response) Marshal

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

func (*MsgConvertERC20Response) MarshalTo

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

func (*MsgConvertERC20Response) MarshalToSizedBuffer

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

func (*MsgConvertERC20Response) ProtoMessage

func (*MsgConvertERC20Response) ProtoMessage()

func (*MsgConvertERC20Response) Reset

func (m *MsgConvertERC20Response) Reset()

func (*MsgConvertERC20Response) Size

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

func (*MsgConvertERC20Response) String

func (m *MsgConvertERC20Response) String() string

func (*MsgConvertERC20Response) Unmarshal

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

func (*MsgConvertERC20Response) XXX_DiscardUnknown

func (m *MsgConvertERC20Response) XXX_DiscardUnknown()

func (*MsgConvertERC20Response) XXX_Marshal

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

func (*MsgConvertERC20Response) XXX_Merge

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

func (*MsgConvertERC20Response) XXX_Size

func (m *MsgConvertERC20Response) XXX_Size() int

func (*MsgConvertERC20Response) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// ConvertCoin mints a ERC20 representation of the native Cosmos coin denom
	// that is registered on the token mapping.
	ConvertCoin(context.Context, *MsgConvertCoin) (*MsgConvertCoinResponse, error)
	// ConvertERC20 mints a native Cosmos coin representation of the ERC20 token
	// contract that is registered on the token mapping.
	ConvertERC20(context.Context, *MsgConvertERC20) (*MsgConvertERC20Response, error)
	// UpdateParams defined a governance operation for updating the x/erc20 module parameters.
	// The authority is hard-coded to the Cosmos SDK x/gov module account
	UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateParams

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

MsgUpdateParams is the Msg/UpdateParams request type for Erc20 parameters. Since: cosmos-sdk 0.47

func (*MsgUpdateParams) Descriptor

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

func (*MsgUpdateParams) GetAuthority

func (m *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (m *MsgUpdateParams) GetParams() Params

func (*MsgUpdateParams) 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. Since: cosmos-sdk 0.47

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 Owner

type Owner int32

Owner enumerates the ownership of a ERC20 contract.

const (
	// OWNER_UNSPECIFIED defines an invalid/undefined owner.
	OWNER_UNSPECIFIED Owner = 0
	// OWNER_MODULE - erc20 is owned by the erc20 module account.
	OWNER_MODULE Owner = 1
	// OWNER_EXTERNAL - erc20 is owned by an external account.
	OWNER_EXTERNAL Owner = 2
)

func (Owner) EnumDescriptor

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

func (Owner) String

func (x Owner) String() string

type Params

type Params struct {
	// enable_erc20 is the parameter to enable the conversion of Cosmos coins <--> ERC20 tokens.
	EnableErc20 bool `protobuf:"varint,1,opt,name=enable_erc20,json=enableErc20,proto3" json:"enable_erc20,omitempty"`
	// enable_evm_hook is the parameter to enable the EVM hook that converts an ERC20 token to a Cosmos
	// Coin by transferring the Tokens through a MsgEthereumTx to the ModuleAddress Ethereum address.
	EnableEVMHook bool `protobuf:"varint,2,opt,name=enable_evm_hook,json=enableEvmHook,proto3" json:"enable_evm_hook,omitempty"`
}

Params defines the erc20 module params

func (*Params) Descriptor

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

func (*Params) GetEnableEVMHook

func (m *Params) GetEnableEVMHook() bool

func (*Params) GetEnableErc20

func (m *Params) GetEnableErc20() bool

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

type ProposalMetadata struct {
	// metadata slice of the native Cosmos coins
	Metadata []types.Metadata `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata"`
}

ProposalMetadata is used to parse a slice of denom metadata and generate the RegisterCoinProposal content.

func (*ProposalMetadata) Descriptor

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

func (*ProposalMetadata) GetMetadata

func (m *ProposalMetadata) GetMetadata() []types.Metadata

func (*ProposalMetadata) Marshal

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

func (*ProposalMetadata) MarshalTo

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

func (*ProposalMetadata) MarshalToSizedBuffer

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

func (*ProposalMetadata) ProtoMessage

func (*ProposalMetadata) ProtoMessage()

func (*ProposalMetadata) Reset

func (m *ProposalMetadata) Reset()

func (*ProposalMetadata) Size

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

func (*ProposalMetadata) String

func (m *ProposalMetadata) String() string

func (*ProposalMetadata) Unmarshal

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

func (*ProposalMetadata) XXX_DiscardUnknown

func (m *ProposalMetadata) XXX_DiscardUnknown()

func (*ProposalMetadata) XXX_Marshal

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

func (*ProposalMetadata) XXX_Merge

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

func (*ProposalMetadata) XXX_Size

func (m *ProposalMetadata) XXX_Size() int

func (*ProposalMetadata) XXX_Unmarshal

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

type RegisterCoinProposal

type RegisterCoinProposal struct {
	// title of the proposal
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// description of the proposal
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// metadata slice of the native Cosmos coins
	Metadata []types.Metadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata"`
}

RegisterCoinProposal is a gov Content type to register a token pair for a native Cosmos coin.

func (*RegisterCoinProposal) Descriptor

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

func (*RegisterCoinProposal) GetDescription

func (m *RegisterCoinProposal) GetDescription() string

func (*RegisterCoinProposal) GetMetadata

func (m *RegisterCoinProposal) GetMetadata() []types.Metadata

func (*RegisterCoinProposal) GetTitle

func (m *RegisterCoinProposal) GetTitle() string

func (*RegisterCoinProposal) Marshal

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

func (*RegisterCoinProposal) MarshalTo

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

func (*RegisterCoinProposal) MarshalToSizedBuffer

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

func (*RegisterCoinProposal) ProposalRoute

func (*RegisterCoinProposal) ProposalRoute() string

ProposalRoute returns router key for this proposal

func (*RegisterCoinProposal) ProposalType

func (*RegisterCoinProposal) ProposalType() string

ProposalType returns proposal type for this proposal

func (*RegisterCoinProposal) ProtoMessage

func (*RegisterCoinProposal) ProtoMessage()

func (*RegisterCoinProposal) Reset

func (m *RegisterCoinProposal) Reset()

func (*RegisterCoinProposal) Size

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

func (*RegisterCoinProposal) String

func (m *RegisterCoinProposal) String() string

func (*RegisterCoinProposal) Unmarshal

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

func (*RegisterCoinProposal) ValidateBasic

func (rtbp *RegisterCoinProposal) ValidateBasic() error

ValidateBasic performs a stateless check of the proposal fields

func (*RegisterCoinProposal) XXX_DiscardUnknown

func (m *RegisterCoinProposal) XXX_DiscardUnknown()

func (*RegisterCoinProposal) XXX_Marshal

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

func (*RegisterCoinProposal) XXX_Merge

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

func (*RegisterCoinProposal) XXX_Size

func (m *RegisterCoinProposal) XXX_Size() int

func (*RegisterCoinProposal) XXX_Unmarshal

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

type RegisterERC20Proposal

type RegisterERC20Proposal struct {
	// title of the proposal
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// description of the proposal
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// erc20addresses is a slice of  ERC20 token contract addresses
	Erc20Addresses []string `protobuf:"bytes,3,rep,name=erc20addresses,proto3" json:"erc20addresses,omitempty"`
}

RegisterERC20Proposal is a gov Content type to register a token pair for an ERC20 token

func (*RegisterERC20Proposal) Descriptor

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

func (*RegisterERC20Proposal) GetDescription

func (m *RegisterERC20Proposal) GetDescription() string

func (*RegisterERC20Proposal) GetErc20Addresses

func (m *RegisterERC20Proposal) GetErc20Addresses() []string

func (*RegisterERC20Proposal) GetTitle

func (m *RegisterERC20Proposal) GetTitle() string

func (*RegisterERC20Proposal) Marshal

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

func (*RegisterERC20Proposal) MarshalTo

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

func (*RegisterERC20Proposal) MarshalToSizedBuffer

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

func (*RegisterERC20Proposal) ProposalRoute

func (*RegisterERC20Proposal) ProposalRoute() string

ProposalRoute returns router key for this proposal

func (*RegisterERC20Proposal) ProposalType

func (*RegisterERC20Proposal) ProposalType() string

ProposalType returns proposal type for this proposal

func (*RegisterERC20Proposal) ProtoMessage

func (*RegisterERC20Proposal) ProtoMessage()

func (*RegisterERC20Proposal) Reset

func (m *RegisterERC20Proposal) Reset()

func (*RegisterERC20Proposal) Size

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

func (*RegisterERC20Proposal) String

func (m *RegisterERC20Proposal) String() string

func (*RegisterERC20Proposal) Unmarshal

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

func (*RegisterERC20Proposal) ValidateBasic

func (rtbp *RegisterERC20Proposal) ValidateBasic() error

ValidateBasic performs a stateless check of the proposal fields

func (*RegisterERC20Proposal) XXX_DiscardUnknown

func (m *RegisterERC20Proposal) XXX_DiscardUnknown()

func (*RegisterERC20Proposal) XXX_Marshal

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

func (*RegisterERC20Proposal) XXX_Merge

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

func (*RegisterERC20Proposal) XXX_Size

func (m *RegisterERC20Proposal) XXX_Size() int

func (*RegisterERC20Proposal) XXX_Unmarshal

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

type ToggleTokenConversionProposal

type ToggleTokenConversionProposal struct {
	// title of the proposal
	Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	// description of the proposal
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// token identifier can be either the hex contract address of the ERC20 or the
	// Cosmos base denomination
	Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`
}

ToggleTokenConversionProposal is a gov Content type to toggle the conversion of a token pair.

func (*ToggleTokenConversionProposal) Descriptor

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

func (*ToggleTokenConversionProposal) Equal

func (this *ToggleTokenConversionProposal) Equal(that interface{}) bool

func (*ToggleTokenConversionProposal) GetDescription

func (m *ToggleTokenConversionProposal) GetDescription() string

func (*ToggleTokenConversionProposal) GetTitle

func (m *ToggleTokenConversionProposal) GetTitle() string

func (*ToggleTokenConversionProposal) GetToken

func (m *ToggleTokenConversionProposal) GetToken() string

func (*ToggleTokenConversionProposal) Marshal

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

func (*ToggleTokenConversionProposal) MarshalTo

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

func (*ToggleTokenConversionProposal) MarshalToSizedBuffer

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

func (*ToggleTokenConversionProposal) ProposalRoute

func (*ToggleTokenConversionProposal) ProposalRoute() string

ProposalRoute returns router key for this proposal

func (*ToggleTokenConversionProposal) ProposalType

func (*ToggleTokenConversionProposal) ProposalType() string

ProposalType returns proposal type for this proposal

func (*ToggleTokenConversionProposal) ProtoMessage

func (*ToggleTokenConversionProposal) ProtoMessage()

func (*ToggleTokenConversionProposal) Reset

func (m *ToggleTokenConversionProposal) Reset()

func (*ToggleTokenConversionProposal) Size

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

func (*ToggleTokenConversionProposal) String

func (*ToggleTokenConversionProposal) Unmarshal

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

func (*ToggleTokenConversionProposal) ValidateBasic

func (ttcp *ToggleTokenConversionProposal) ValidateBasic() error

ValidateBasic performs a stateless check of the proposal fields

func (*ToggleTokenConversionProposal) XXX_DiscardUnknown

func (m *ToggleTokenConversionProposal) XXX_DiscardUnknown()

func (*ToggleTokenConversionProposal) XXX_Marshal

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

func (*ToggleTokenConversionProposal) XXX_Merge

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

func (*ToggleTokenConversionProposal) XXX_Size

func (m *ToggleTokenConversionProposal) XXX_Size() int

func (*ToggleTokenConversionProposal) XXX_Unmarshal

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

type TokenPair

type TokenPair struct {
	// erc20_address is the hex address of ERC20 contract token
	Erc20Address string `protobuf:"bytes,1,opt,name=erc20_address,json=erc20Address,proto3" json:"erc20_address,omitempty"`
	// denom defines the cosmos base denomination to be mapped to
	Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"`
	// enabled defines the token mapping enable status
	Enabled bool `protobuf:"varint,3,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// contract_owner is the an ENUM specifying the type of ERC20 owner (0 invalid, 1 ModuleAccount, 2 external address)
	ContractOwner Owner `` /* 127-byte string literal not displayed */
}

TokenPair defines an instance that records a pairing consisting of a native

Cosmos Coin and an ERC20 token address.

func (*TokenPair) Descriptor

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

func (*TokenPair) Equal

func (this *TokenPair) Equal(that interface{}) bool

func (*TokenPair) GetContractOwner

func (m *TokenPair) GetContractOwner() Owner

func (*TokenPair) GetDenom

func (m *TokenPair) GetDenom() string

func (*TokenPair) GetEnabled

func (m *TokenPair) GetEnabled() bool

func (*TokenPair) GetErc20Address

func (m *TokenPair) GetErc20Address() string

func (*TokenPair) Marshal

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

func (*TokenPair) MarshalTo

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

func (*TokenPair) MarshalToSizedBuffer

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

func (*TokenPair) ProtoMessage

func (*TokenPair) ProtoMessage()

func (*TokenPair) Reset

func (m *TokenPair) Reset()

func (*TokenPair) Size

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

func (*TokenPair) String

func (m *TokenPair) String() string

func (*TokenPair) Unmarshal

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

func (*TokenPair) XXX_DiscardUnknown

func (m *TokenPair) XXX_DiscardUnknown()

func (*TokenPair) XXX_Marshal

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

func (*TokenPair) XXX_Merge

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

func (*TokenPair) XXX_Size

func (m *TokenPair) XXX_Size() int

func (*TokenPair) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) ConvertCoin

func (*UnimplementedMsgServer) ConvertERC20

func (*UnimplementedMsgServer) UpdateParams

Jump to

Keyboard shortcuts

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