erc20v1

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2025 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Code generated by protoc-gen-go-pulsar. DO NOT EDIT.

Index

Constants

View Source
const (
	Query_TokenPairs_FullMethodName = "/cosmos.evm.erc20.v1.Query/TokenPairs"
	Query_TokenPair_FullMethodName  = "/cosmos.evm.erc20.v1.Query/TokenPair"
	Query_Params_FullMethodName     = "/cosmos.evm.erc20.v1.Query/Params"
)
View Source
const (
	Msg_ConvertERC20_FullMethodName     = "/cosmos.evm.erc20.v1.Msg/ConvertERC20"
	Msg_UpdateParams_FullMethodName     = "/cosmos.evm.erc20.v1.Msg/UpdateParams"
	Msg_RegisterERC20_FullMethodName    = "/cosmos.evm.erc20.v1.Msg/RegisterERC20"
	Msg_ToggleConversion_FullMethodName = "/cosmos.evm.erc20.v1.Msg/ToggleConversion"
)

Variables

View Source
var (
	Owner_name = map[int32]string{
		0: "OWNER_UNSPECIFIED",
		1: "OWNER_MODULE",
		2: "OWNER_EXTERNAL",
	}
	Owner_value = map[string]int32{
		"OWNER_UNSPECIFIED": 0,
		"OWNER_MODULE":      1,
		"OWNER_EXTERNAL":    2,
	}
)

Enum value maps for Owner.

View Source
var File_cosmos_evm_erc20_v1_erc20_proto protoreflect.FileDescriptor
View Source
var File_cosmos_evm_erc20_v1_events_proto protoreflect.FileDescriptor
View Source
var File_cosmos_evm_erc20_v1_genesis_proto protoreflect.FileDescriptor
View Source
var File_cosmos_evm_erc20_v1_query_proto protoreflect.FileDescriptor
View Source
var File_cosmos_evm_erc20_v1_tx_proto protoreflect.FileDescriptor
View Source
var Msg_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cosmos.evm.erc20.v1.Msg",
	HandlerType: (*MsgServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "ConvertERC20",
			Handler:    _Msg_ConvertERC20_Handler,
		},
		{
			MethodName: "UpdateParams",
			Handler:    _Msg_UpdateParams_Handler,
		},
		{
			MethodName: "RegisterERC20",
			Handler:    _Msg_RegisterERC20_Handler,
		},
		{
			MethodName: "ToggleConversion",
			Handler:    _Msg_ToggleConversion_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cosmos/evm/erc20/v1/tx.proto",
}

Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Query_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cosmos.evm.erc20.v1.Query",
	HandlerType: (*QueryServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "TokenPairs",
			Handler:    _Query_TokenPairs_Handler,
		},
		{
			MethodName: "TokenPair",
			Handler:    _Query_TokenPair_Handler,
		},
		{
			MethodName: "Params",
			Handler:    _Query_Params_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "cosmos/evm/erc20/v1/query.proto",
}

Query_ServiceDesc is the grpc.ServiceDesc for Query service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func GetSigners

func GetSigners(msg protov2.Message) ([][]byte, error)

GetSigners gets the signer's address from the Ethereum tx signature

func RegisterMsgServer

func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer)

func RegisterQueryServer

func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer)

Types

type EventConvertCoin

type EventConvertCoin struct {

	// sender is the sender's address.
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// receiver is the receiver's address.
	Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// amount is the amount of coins to be converted.
	Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// denom is the coin's denomination.
	Denom string `protobuf:"bytes,4,opt,name=denom,proto3" json:"denom,omitempty"`
	// erc20_address is the ERC20 contract address.
	Erc20Address string `protobuf:"bytes,5,opt,name=erc20_address,json=erc20Address,proto3" json:"erc20_address,omitempty"`
	// contains filtered or unexported fields
}

EventConvertCoin is an event emitted when a coin is converted.

func (*EventConvertCoin) Descriptor deprecated

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

Deprecated: Use EventConvertCoin.ProtoReflect.Descriptor instead.

func (*EventConvertCoin) GetAmount

func (x *EventConvertCoin) GetAmount() string

func (*EventConvertCoin) GetDenom

func (x *EventConvertCoin) GetDenom() string

func (*EventConvertCoin) GetErc20Address

func (x *EventConvertCoin) GetErc20Address() string

func (*EventConvertCoin) GetReceiver

func (x *EventConvertCoin) GetReceiver() string

func (*EventConvertCoin) GetSender

func (x *EventConvertCoin) GetSender() string

func (*EventConvertCoin) ProtoMessage

func (*EventConvertCoin) ProtoMessage()

func (*EventConvertCoin) ProtoReflect

func (x *EventConvertCoin) ProtoReflect() protoreflect.Message

func (*EventConvertCoin) Reset

func (x *EventConvertCoin) Reset()

func (*EventConvertCoin) String

func (x *EventConvertCoin) String() string

type EventConvertERC20

type EventConvertERC20 struct {

	// sender is the sender's address.
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	// receiver is the receiver's address.
	Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"`
	// amount is the amount of coins to be converted.
	Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// denom is the coin's denomination.
	Denom string `protobuf:"bytes,4,opt,name=denom,proto3" json:"denom,omitempty"`
	// contract_address of an ERC20 token contract, that is registered in a token
	// pair
	ContractAddress string `protobuf:"bytes,5,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"`
	// contains filtered or unexported fields
}

EventConvertERC20 is an event emitted when an ERC20 is converted.

func (*EventConvertERC20) Descriptor deprecated

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

Deprecated: Use EventConvertERC20.ProtoReflect.Descriptor instead.

func (*EventConvertERC20) GetAmount

func (x *EventConvertERC20) GetAmount() string

func (*EventConvertERC20) GetContractAddress

func (x *EventConvertERC20) GetContractAddress() string

func (*EventConvertERC20) GetDenom

func (x *EventConvertERC20) GetDenom() string

func (*EventConvertERC20) GetReceiver

func (x *EventConvertERC20) GetReceiver() string

func (*EventConvertERC20) GetSender

func (x *EventConvertERC20) GetSender() string

func (*EventConvertERC20) ProtoMessage

func (*EventConvertERC20) ProtoMessage()

func (*EventConvertERC20) ProtoReflect

func (x *EventConvertERC20) ProtoReflect() protoreflect.Message

func (*EventConvertERC20) Reset

func (x *EventConvertERC20) Reset()

func (*EventConvertERC20) String

func (x *EventConvertERC20) String() string

type EventRegisterPair

type EventRegisterPair struct {

	// denom is the coin's denomination.
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	// erc20_address is the ERC20 contract address.
	Erc20Address string `protobuf:"bytes,2,opt,name=erc20_address,json=erc20Address,proto3" json:"erc20_address,omitempty"`
	// contains filtered or unexported fields
}

EventRegisterPair is an event emitted when a coin is registered.

func (*EventRegisterPair) Descriptor deprecated

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

Deprecated: Use EventRegisterPair.ProtoReflect.Descriptor instead.

func (*EventRegisterPair) GetDenom

func (x *EventRegisterPair) GetDenom() string

func (*EventRegisterPair) GetErc20Address

func (x *EventRegisterPair) GetErc20Address() string

func (*EventRegisterPair) ProtoMessage

func (*EventRegisterPair) ProtoMessage()

func (*EventRegisterPair) ProtoReflect

func (x *EventRegisterPair) ProtoReflect() protoreflect.Message

func (*EventRegisterPair) Reset

func (x *EventRegisterPair) Reset()

func (*EventRegisterPair) String

func (x *EventRegisterPair) String() string

type EventToggleTokenConversion

type EventToggleTokenConversion struct {

	// denom is the coin's denomination.
	Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"`
	// erc20_address is the ERC20 contract address.
	Erc20Address string `protobuf:"bytes,2,opt,name=erc20_address,json=erc20Address,proto3" json:"erc20_address,omitempty"`
	// contains filtered or unexported fields
}

EventToggleTokenConversion is an event emitted when a coin's token conversion is toggled.

func (*EventToggleTokenConversion) Descriptor deprecated

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

Deprecated: Use EventToggleTokenConversion.ProtoReflect.Descriptor instead.

func (*EventToggleTokenConversion) GetDenom

func (x *EventToggleTokenConversion) GetDenom() string

func (*EventToggleTokenConversion) GetErc20Address

func (x *EventToggleTokenConversion) GetErc20Address() string

func (*EventToggleTokenConversion) ProtoMessage

func (*EventToggleTokenConversion) ProtoMessage()

func (*EventToggleTokenConversion) ProtoReflect

func (*EventToggleTokenConversion) Reset

func (x *EventToggleTokenConversion) Reset()

func (*EventToggleTokenConversion) String

func (x *EventToggleTokenConversion) String() string

type GenesisState

type GenesisState struct {

	// params are the erc20 module parameters at genesis
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	// 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,omitempty"`
	// contains filtered or unexported fields
}

GenesisState defines the module's genesis state.

func (*GenesisState) Descriptor deprecated

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

Deprecated: Use GenesisState.ProtoReflect.Descriptor instead.

func (*GenesisState) GetParams

func (x *GenesisState) GetParams() *Params

func (*GenesisState) GetTokenPairs

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) ProtoReflect

func (x *GenesisState) ProtoReflect() protoreflect.Message

func (*GenesisState) Reset

func (x *GenesisState) Reset()

func (*GenesisState) String

func (x *GenesisState) String() string

type MsgClient

type MsgClient interface {
	// 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 defines 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)
	// RegisterERC20 defines a governance operation for registering a token pair
	// for the specified erc20 contract. The authority is hard-coded to the Cosmos
	// SDK x/gov module account
	RegisterERC20(ctx context.Context, in *MsgRegisterERC20, opts ...grpc.CallOption) (*MsgRegisterERC20Response, error)
	// ToggleConversion defines a governance operation for enabling/disablen a
	// token pair conversion. The authority is hard-coded to the Cosmos SDK x/gov
	// module account
	ToggleConversion(ctx context.Context, in *MsgToggleConversion, opts ...grpc.CallOption) (*MsgToggleConversionResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc.ClientConnInterface) 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 *v1beta1.Coin `protobuf:"bytes,1,opt,name=coin,proto3" json:"coin,omitempty"`
	// 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"`
	// contains filtered or unexported fields
}

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

func (*MsgConvertCoin) Descriptor deprecated

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

Deprecated: Use MsgConvertCoin.ProtoReflect.Descriptor instead.

func (*MsgConvertCoin) GetCoin

func (x *MsgConvertCoin) GetCoin() *v1beta1.Coin

func (*MsgConvertCoin) GetReceiver

func (x *MsgConvertCoin) GetReceiver() string

func (*MsgConvertCoin) GetSender

func (x *MsgConvertCoin) GetSender() string

func (*MsgConvertCoin) ProtoMessage

func (*MsgConvertCoin) ProtoMessage()

func (*MsgConvertCoin) ProtoReflect

func (x *MsgConvertCoin) ProtoReflect() protoreflect.Message

func (*MsgConvertCoin) Reset

func (x *MsgConvertCoin) Reset()

func (*MsgConvertCoin) String

func (x *MsgConvertCoin) String() string

type MsgConvertCoinResponse

type MsgConvertCoinResponse struct {
	// contains filtered or unexported fields
}

MsgConvertCoinResponse returns no fields

func (*MsgConvertCoinResponse) Descriptor deprecated

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

Deprecated: Use MsgConvertCoinResponse.ProtoReflect.Descriptor instead.

func (*MsgConvertCoinResponse) ProtoMessage

func (*MsgConvertCoinResponse) ProtoMessage()

func (*MsgConvertCoinResponse) ProtoReflect

func (x *MsgConvertCoinResponse) ProtoReflect() protoreflect.Message

func (*MsgConvertCoinResponse) Reset

func (x *MsgConvertCoinResponse) Reset()

func (*MsgConvertCoinResponse) String

func (x *MsgConvertCoinResponse) String() string

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 string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// 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"`
	// contains filtered or unexported fields
}

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

func (*MsgConvertERC20) Descriptor deprecated

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

Deprecated: Use MsgConvertERC20.ProtoReflect.Descriptor instead.

func (*MsgConvertERC20) GetAmount

func (x *MsgConvertERC20) GetAmount() string

func (*MsgConvertERC20) GetContractAddress

func (x *MsgConvertERC20) GetContractAddress() string

func (*MsgConvertERC20) GetReceiver

func (x *MsgConvertERC20) GetReceiver() string

func (*MsgConvertERC20) GetSender

func (x *MsgConvertERC20) GetSender() string

func (*MsgConvertERC20) ProtoMessage

func (*MsgConvertERC20) ProtoMessage()

func (*MsgConvertERC20) ProtoReflect

func (x *MsgConvertERC20) ProtoReflect() protoreflect.Message

func (*MsgConvertERC20) Reset

func (x *MsgConvertERC20) Reset()

func (*MsgConvertERC20) String

func (x *MsgConvertERC20) String() string

type MsgConvertERC20Response

type MsgConvertERC20Response struct {
	// contains filtered or unexported fields
}

MsgConvertERC20Response returns no fields

func (*MsgConvertERC20Response) Descriptor deprecated

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

Deprecated: Use MsgConvertERC20Response.ProtoReflect.Descriptor instead.

func (*MsgConvertERC20Response) ProtoMessage

func (*MsgConvertERC20Response) ProtoMessage()

func (*MsgConvertERC20Response) ProtoReflect

func (x *MsgConvertERC20Response) ProtoReflect() protoreflect.Message

func (*MsgConvertERC20Response) Reset

func (x *MsgConvertERC20Response) Reset()

func (*MsgConvertERC20Response) String

func (x *MsgConvertERC20Response) String() string

type MsgRegisterERC20

type MsgRegisterERC20 struct {

	// authority is the address of the governance account.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// erc20addresses is a slice of ERC20 token contract hex addresses
	Erc20Addresses []string `protobuf:"bytes,2,rep,name=erc20addresses,proto3" json:"erc20addresses,omitempty"`
	// contains filtered or unexported fields
}

MsgRegisterERC20 is the Msg/RegisterERC20 request type for registering an Erc20 contract token pair.

func (*MsgRegisterERC20) Descriptor deprecated

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

Deprecated: Use MsgRegisterERC20.ProtoReflect.Descriptor instead.

func (*MsgRegisterERC20) GetAuthority

func (x *MsgRegisterERC20) GetAuthority() string

func (*MsgRegisterERC20) GetErc20Addresses

func (x *MsgRegisterERC20) GetErc20Addresses() []string

func (*MsgRegisterERC20) ProtoMessage

func (*MsgRegisterERC20) ProtoMessage()

func (*MsgRegisterERC20) ProtoReflect

func (x *MsgRegisterERC20) ProtoReflect() protoreflect.Message

func (*MsgRegisterERC20) Reset

func (x *MsgRegisterERC20) Reset()

func (*MsgRegisterERC20) String

func (x *MsgRegisterERC20) String() string

type MsgRegisterERC20Response

type MsgRegisterERC20Response struct {
	// contains filtered or unexported fields
}

MsgRegisterERC20Response defines the response structure for executing a MsgRegisterERC20 message.

func (*MsgRegisterERC20Response) Descriptor deprecated

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

Deprecated: Use MsgRegisterERC20Response.ProtoReflect.Descriptor instead.

func (*MsgRegisterERC20Response) ProtoMessage

func (*MsgRegisterERC20Response) ProtoMessage()

func (*MsgRegisterERC20Response) ProtoReflect

func (x *MsgRegisterERC20Response) ProtoReflect() protoreflect.Message

func (*MsgRegisterERC20Response) Reset

func (x *MsgRegisterERC20Response) Reset()

func (*MsgRegisterERC20Response) String

func (x *MsgRegisterERC20Response) String() string

type MsgServer

type MsgServer interface {
	// 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 defines 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)
	// RegisterERC20 defines a governance operation for registering a token pair
	// for the specified erc20 contract. The authority is hard-coded to the Cosmos
	// SDK x/gov module account
	RegisterERC20(context.Context, *MsgRegisterERC20) (*MsgRegisterERC20Response, error)
	// ToggleConversion defines a governance operation for enabling/disablen a
	// token pair conversion. The authority is hard-coded to the Cosmos SDK x/gov
	// module account
	ToggleConversion(context.Context, *MsgToggleConversion) (*MsgToggleConversionResponse, error)
	// contains filtered or unexported methods
}

MsgServer is the server API for Msg service. All implementations must embed UnimplementedMsgServer for forward compatibility

type MsgToggleConversion

type MsgToggleConversion struct {

	// authority is the address of the governance account.
	Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
	// token identifier can be either the hex contract address of the ERC20 or the
	// Cosmos base denomination
	Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

MsgToggleConversion is the Msg/MsgToggleConversion request type for toggling an Erc20 contract conversion capability.

func (*MsgToggleConversion) Descriptor deprecated

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

Deprecated: Use MsgToggleConversion.ProtoReflect.Descriptor instead.

func (*MsgToggleConversion) GetAuthority

func (x *MsgToggleConversion) GetAuthority() string

func (*MsgToggleConversion) GetToken

func (x *MsgToggleConversion) GetToken() string

func (*MsgToggleConversion) ProtoMessage

func (*MsgToggleConversion) ProtoMessage()

func (*MsgToggleConversion) ProtoReflect

func (x *MsgToggleConversion) ProtoReflect() protoreflect.Message

func (*MsgToggleConversion) Reset

func (x *MsgToggleConversion) Reset()

func (*MsgToggleConversion) String

func (x *MsgToggleConversion) String() string

type MsgToggleConversionResponse

type MsgToggleConversionResponse struct {
	// contains filtered or unexported fields
}

MsgToggleConversionResponse defines the response structure for executing a ToggleConversion message.

func (*MsgToggleConversionResponse) Descriptor deprecated

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

Deprecated: Use MsgToggleConversionResponse.ProtoReflect.Descriptor instead.

func (*MsgToggleConversionResponse) ProtoMessage

func (*MsgToggleConversionResponse) ProtoMessage()

func (*MsgToggleConversionResponse) ProtoReflect

func (*MsgToggleConversionResponse) Reset

func (x *MsgToggleConversionResponse) Reset()

func (*MsgToggleConversionResponse) String

func (x *MsgToggleConversionResponse) String() string

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/vm parameters to update.
	// NOTE: All parameters must be supplied.
	Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

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

func (*MsgUpdateParams) Descriptor deprecated

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

Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead.

func (*MsgUpdateParams) GetAuthority

func (x *MsgUpdateParams) GetAuthority() string

func (*MsgUpdateParams) GetParams

func (x *MsgUpdateParams) GetParams() *Params

func (*MsgUpdateParams) ProtoMessage

func (*MsgUpdateParams) ProtoMessage()

func (*MsgUpdateParams) ProtoReflect

func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message

func (*MsgUpdateParams) Reset

func (x *MsgUpdateParams) Reset()

func (*MsgUpdateParams) String

func (x *MsgUpdateParams) String() string

type MsgUpdateParamsResponse

type MsgUpdateParamsResponse struct {
	// contains filtered or unexported fields
}

MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message. Since: cosmos-sdk 0.47

func (*MsgUpdateParamsResponse) Descriptor deprecated

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

Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead.

func (*MsgUpdateParamsResponse) ProtoMessage

func (*MsgUpdateParamsResponse) ProtoMessage()

func (*MsgUpdateParamsResponse) ProtoReflect

func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message

func (*MsgUpdateParamsResponse) Reset

func (x *MsgUpdateParamsResponse) Reset()

func (*MsgUpdateParamsResponse) String

func (x *MsgUpdateParamsResponse) String() string

type Owner

type Owner int32

Owner enumerates the ownership of a ERC20 contract.

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

func (Owner) Descriptor

func (Owner) Descriptor() protoreflect.EnumDescriptor

func (Owner) Enum

func (x Owner) Enum() *Owner

func (Owner) EnumDescriptor deprecated

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

Deprecated: Use Owner.Descriptor instead.

func (Owner) Number

func (x Owner) Number() protoreflect.EnumNumber

func (Owner) String

func (x Owner) String() string

func (Owner) Type

func (Owner) Type() protoreflect.EnumType

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"`
	// native_precompiles defines the slice of hex addresses of the
	// active precompiles that are used to interact with native staking coins as
	// ERC20s
	NativePrecompiles []string `protobuf:"bytes,3,rep,name=native_precompiles,json=nativePrecompiles,proto3" json:"native_precompiles,omitempty"`
	// dynamic_precompiles defines the slice of hex addresses of the
	// active precompiles that are used to interact with Bank coins as ERC20s
	DynamicPrecompiles []string `protobuf:"bytes,4,rep,name=dynamic_precompiles,json=dynamicPrecompiles,proto3" json:"dynamic_precompiles,omitempty"`
	// contains filtered or unexported fields
}

Params defines the erc20 module params

func (*Params) Descriptor deprecated

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

Deprecated: Use Params.ProtoReflect.Descriptor instead.

func (*Params) GetDynamicPrecompiles

func (x *Params) GetDynamicPrecompiles() []string

func (*Params) GetEnableErc20

func (x *Params) GetEnableErc20() bool

func (*Params) GetNativePrecompiles

func (x *Params) GetNativePrecompiles() []string

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) ProtoReflect

func (x *Params) ProtoReflect() protoreflect.Message

func (*Params) Reset

func (x *Params) Reset()

func (*Params) String

func (x *Params) String() string

type ProposalMetadata deprecated

type ProposalMetadata struct {

	// metadata slice of the native Cosmos coins
	Metadata []*v1beta1.Metadata `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

Deprecated: ProposalMetadata is used to parse a slice of denom metadata and generate the RegisterCoinProposal content. We're keeping it to remove the existing proposals from store. After that, remove this message.

func (*ProposalMetadata) Descriptor deprecated

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

Deprecated: Use ProposalMetadata.ProtoReflect.Descriptor instead.

func (*ProposalMetadata) GetMetadata

func (x *ProposalMetadata) GetMetadata() []*v1beta1.Metadata

func (*ProposalMetadata) ProtoMessage

func (*ProposalMetadata) ProtoMessage()

func (*ProposalMetadata) ProtoReflect

func (x *ProposalMetadata) ProtoReflect() protoreflect.Message

func (*ProposalMetadata) Reset

func (x *ProposalMetadata) Reset()

func (*ProposalMetadata) String

func (x *ProposalMetadata) String() string

type QueryClient

type QueryClient interface {
	// TokenPairs retrieves registered token pairs
	TokenPairs(ctx context.Context, in *QueryTokenPairsRequest, opts ...grpc.CallOption) (*QueryTokenPairsResponse, error)
	// TokenPair retrieves a registered token pair
	TokenPair(ctx context.Context, in *QueryTokenPairRequest, opts ...grpc.CallOption) (*QueryTokenPairResponse, error)
	// Params retrieves the erc20 module params
	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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc.ClientConnInterface) QueryClient

type QueryParamsRequest

type QueryParamsRequest struct {
	// contains filtered or unexported fields
}

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

func (*QueryParamsRequest) Descriptor deprecated

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

Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead.

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) ProtoReflect

func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message

func (*QueryParamsRequest) Reset

func (x *QueryParamsRequest) Reset()

func (*QueryParamsRequest) String

func (x *QueryParamsRequest) String() string

type QueryParamsResponse

type QueryParamsResponse struct {

	// params are the erc20 module parameters
	Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	// contains filtered or unexported fields
}

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

func (*QueryParamsResponse) Descriptor deprecated

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

Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead.

func (*QueryParamsResponse) GetParams

func (x *QueryParamsResponse) GetParams() *Params

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) ProtoReflect

func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message

func (*QueryParamsResponse) Reset

func (x *QueryParamsResponse) Reset()

func (*QueryParamsResponse) String

func (x *QueryParamsResponse) String() string

type QueryServer

type QueryServer interface {
	// TokenPairs retrieves registered token pairs
	TokenPairs(context.Context, *QueryTokenPairsRequest) (*QueryTokenPairsResponse, error)
	// TokenPair retrieves a registered token pair
	TokenPair(context.Context, *QueryTokenPairRequest) (*QueryTokenPairResponse, error)
	// Params retrieves the erc20 module params
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// contains filtered or unexported methods
}

QueryServer is the server API for Query service. All implementations must embed UnimplementedQueryServer for forward compatibility

type QueryTokenPairRequest

type QueryTokenPairRequest struct {

	// token identifier can be either the hex contract address of the ERC20 or the
	// Cosmos base denomination
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

QueryTokenPairRequest is the request type for the Query/TokenPair RPC method.

func (*QueryTokenPairRequest) Descriptor deprecated

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

Deprecated: Use QueryTokenPairRequest.ProtoReflect.Descriptor instead.

func (*QueryTokenPairRequest) GetToken

func (x *QueryTokenPairRequest) GetToken() string

func (*QueryTokenPairRequest) ProtoMessage

func (*QueryTokenPairRequest) ProtoMessage()

func (*QueryTokenPairRequest) ProtoReflect

func (x *QueryTokenPairRequest) ProtoReflect() protoreflect.Message

func (*QueryTokenPairRequest) Reset

func (x *QueryTokenPairRequest) Reset()

func (*QueryTokenPairRequest) String

func (x *QueryTokenPairRequest) String() string

type QueryTokenPairResponse

type QueryTokenPairResponse struct {

	// token_pairs returns the info about a registered token pair for the erc20
	// module
	TokenPair *TokenPair `protobuf:"bytes,1,opt,name=token_pair,json=tokenPair,proto3" json:"token_pair,omitempty"`
	// contains filtered or unexported fields
}

QueryTokenPairResponse is the response type for the Query/TokenPair RPC method.

func (*QueryTokenPairResponse) Descriptor deprecated

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

Deprecated: Use QueryTokenPairResponse.ProtoReflect.Descriptor instead.

func (*QueryTokenPairResponse) GetTokenPair

func (x *QueryTokenPairResponse) GetTokenPair() *TokenPair

func (*QueryTokenPairResponse) ProtoMessage

func (*QueryTokenPairResponse) ProtoMessage()

func (*QueryTokenPairResponse) ProtoReflect

func (x *QueryTokenPairResponse) ProtoReflect() protoreflect.Message

func (*QueryTokenPairResponse) Reset

func (x *QueryTokenPairResponse) Reset()

func (*QueryTokenPairResponse) String

func (x *QueryTokenPairResponse) String() string

type QueryTokenPairsRequest

type QueryTokenPairsRequest struct {

	// pagination defines an optional pagination for the request.
	Pagination *v1beta1.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

QueryTokenPairsRequest is the request type for the Query/TokenPairs RPC method.

func (*QueryTokenPairsRequest) Descriptor deprecated

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

Deprecated: Use QueryTokenPairsRequest.ProtoReflect.Descriptor instead.

func (*QueryTokenPairsRequest) GetPagination

func (x *QueryTokenPairsRequest) GetPagination() *v1beta1.PageRequest

func (*QueryTokenPairsRequest) ProtoMessage

func (*QueryTokenPairsRequest) ProtoMessage()

func (*QueryTokenPairsRequest) ProtoReflect

func (x *QueryTokenPairsRequest) ProtoReflect() protoreflect.Message

func (*QueryTokenPairsRequest) Reset

func (x *QueryTokenPairsRequest) Reset()

func (*QueryTokenPairsRequest) String

func (x *QueryTokenPairsRequest) String() string

type QueryTokenPairsResponse

type QueryTokenPairsResponse struct {

	// token_pairs is a slice of registered token pairs for the erc20 module
	TokenPairs []*TokenPair `protobuf:"bytes,1,rep,name=token_pairs,json=tokenPairs,proto3" json:"token_pairs,omitempty"`
	// pagination defines the pagination in the response.
	Pagination *v1beta1.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// contains filtered or unexported fields
}

QueryTokenPairsResponse is the response type for the Query/TokenPairs RPC method.

func (*QueryTokenPairsResponse) Descriptor deprecated

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

Deprecated: Use QueryTokenPairsResponse.ProtoReflect.Descriptor instead.

func (*QueryTokenPairsResponse) GetPagination

func (x *QueryTokenPairsResponse) GetPagination() *v1beta1.PageResponse

func (*QueryTokenPairsResponse) GetTokenPairs

func (x *QueryTokenPairsResponse) GetTokenPairs() []*TokenPair

func (*QueryTokenPairsResponse) ProtoMessage

func (*QueryTokenPairsResponse) ProtoMessage()

func (*QueryTokenPairsResponse) ProtoReflect

func (x *QueryTokenPairsResponse) ProtoReflect() protoreflect.Message

func (*QueryTokenPairsResponse) Reset

func (x *QueryTokenPairsResponse) Reset()

func (*QueryTokenPairsResponse) String

func (x *QueryTokenPairsResponse) String() string

type RegisterCoinProposal deprecated

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 []*v1beta1.Metadata `protobuf:"bytes,3,rep,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

Deprecated: RegisterCoinProposal is a gov Content type to register a token pair for a native Cosmos coin. We're keeping it to remove the existing proposals from store. After that, remove this message.

NOTE: Keep this message for backwards compatibility on proposals query

func (*RegisterCoinProposal) Descriptor deprecated

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

Deprecated: Use RegisterCoinProposal.ProtoReflect.Descriptor instead.

func (*RegisterCoinProposal) GetDescription

func (x *RegisterCoinProposal) GetDescription() string

func (*RegisterCoinProposal) GetMetadata

func (x *RegisterCoinProposal) GetMetadata() []*v1beta1.Metadata

func (*RegisterCoinProposal) GetTitle

func (x *RegisterCoinProposal) GetTitle() string

func (*RegisterCoinProposal) ProtoMessage

func (*RegisterCoinProposal) ProtoMessage()

func (*RegisterCoinProposal) ProtoReflect

func (x *RegisterCoinProposal) ProtoReflect() protoreflect.Message

func (*RegisterCoinProposal) Reset

func (x *RegisterCoinProposal) Reset()

func (*RegisterCoinProposal) String

func (x *RegisterCoinProposal) String() string

type RegisterERC20Proposal deprecated

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"`
	// contains filtered or unexported fields
}

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

NOTE: Keep this message for backwards compatibility on proposals query

func (*RegisterERC20Proposal) Descriptor deprecated

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

Deprecated: Use RegisterERC20Proposal.ProtoReflect.Descriptor instead.

func (*RegisterERC20Proposal) GetDescription

func (x *RegisterERC20Proposal) GetDescription() string

func (*RegisterERC20Proposal) GetErc20Addresses

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

func (*RegisterERC20Proposal) GetTitle

func (x *RegisterERC20Proposal) GetTitle() string

func (*RegisterERC20Proposal) ProtoMessage

func (*RegisterERC20Proposal) ProtoMessage()

func (*RegisterERC20Proposal) ProtoReflect

func (x *RegisterERC20Proposal) ProtoReflect() protoreflect.Message

func (*RegisterERC20Proposal) Reset

func (x *RegisterERC20Proposal) Reset()

func (*RegisterERC20Proposal) String

func (x *RegisterERC20Proposal) String() string

type ToggleTokenConversionProposal deprecated

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"`
	// contains filtered or unexported fields
}

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

NOTE: Keep this message for backwards compatibility on proposals query

func (*ToggleTokenConversionProposal) Descriptor deprecated

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

Deprecated: Use ToggleTokenConversionProposal.ProtoReflect.Descriptor instead.

func (*ToggleTokenConversionProposal) GetDescription

func (x *ToggleTokenConversionProposal) GetDescription() string

func (*ToggleTokenConversionProposal) GetTitle

func (x *ToggleTokenConversionProposal) GetTitle() string

func (*ToggleTokenConversionProposal) GetToken

func (x *ToggleTokenConversionProposal) GetToken() string

func (*ToggleTokenConversionProposal) ProtoMessage

func (*ToggleTokenConversionProposal) ProtoMessage()

func (*ToggleTokenConversionProposal) ProtoReflect

func (*ToggleTokenConversionProposal) Reset

func (x *ToggleTokenConversionProposal) Reset()

func (*ToggleTokenConversionProposal) String

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 `` /* 132-byte string literal not displayed */
	// contains filtered or unexported fields
}

TokenPair defines an instance that records a pairing consisting of a native Cosmos Coin and an ERC20 token address.

func (*TokenPair) Descriptor deprecated

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

Deprecated: Use TokenPair.ProtoReflect.Descriptor instead.

func (*TokenPair) GetContractOwner

func (x *TokenPair) GetContractOwner() Owner

func (*TokenPair) GetDenom

func (x *TokenPair) GetDenom() string

func (*TokenPair) GetEnabled

func (x *TokenPair) GetEnabled() bool

func (*TokenPair) GetErc20Address

func (x *TokenPair) GetErc20Address() string

func (*TokenPair) ProtoMessage

func (*TokenPair) ProtoMessage()

func (*TokenPair) ProtoReflect

func (x *TokenPair) ProtoReflect() protoreflect.Message

func (*TokenPair) Reset

func (x *TokenPair) Reset()

func (*TokenPair) String

func (x *TokenPair) String() string

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer must be embedded to have forward compatible implementations.

func (UnimplementedMsgServer) ConvertERC20

func (UnimplementedMsgServer) RegisterERC20

func (UnimplementedMsgServer) ToggleConversion

func (UnimplementedMsgServer) UpdateParams

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer must be embedded to have forward compatible implementations.

func (UnimplementedQueryServer) Params

func (UnimplementedQueryServer) TokenPair

type UnsafeMsgServer

type UnsafeMsgServer interface {
	// contains filtered or unexported methods
}

UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MsgServer will result in compilation errors.

type UnsafeQueryServer

type UnsafeQueryServer interface {
	// contains filtered or unexported methods
}

UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to QueryServer will result in compilation errors.

Jump to

Keyboard shortcuts

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