types

package
v1.38.5 Latest Latest
Warning

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

Go to latest
Published: May 19, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

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

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

	// RouterKey to be used for message routing
	RouterKey = ModuleName

	// events
	EventTypeTemplateCreation = "template_creation"
	EventTypeBurn             = "burn"

	AttributeKeyAddress                = "address"
	AttributeKeyProposedCosmosCoin     = "propsed_cosmos_coin"
	AttributeKeyContractAddress        = "burn_contract_address"
	AttributeKeyBurnEthAddress         = "burn_eth_address"
	AttributeKeyRecipientCosmosAddress = "recipient_cosmos_address"
	AttributeKeyAmount                 = "amount"

	TypeMsgMint = "mint_erc20"
)

constants

View Source
const (
	ProposalTypeRegisterTokenMapping string = "RegisterTokenMapping"
	ProposalTypeResetHub             string = "ResetHub"
)

constants

Variables

View Source
var (
	ErrInvalidErc20Address   = sdkerrors.Register(ModuleName, 1, "invalid erc20 address")
	ErrUnmatchingCosmosDenom = sdkerrors.Register(ModuleName, 2, "unmatching cosmos denom")
	ErrNotAllowedBridge      = sdkerrors.Register(ModuleName, 3, "not allowed bridge")
	ErrInternalEthMinting    = sdkerrors.Register(ModuleName, 4, "internal ethereum minting error")
	ErrInitHubABI            = sdkerrors.Register(ModuleName, 5, "init hub abi error")
	ErrWritingEthTxPayload   = sdkerrors.Register(ModuleName, 6, "writing ethereum tx payload error")
	ErrHubAlreadySet         = sdkerrors.Register(ModuleName, 7, "hub already set")
)

errors

View Source
var (
	ParamStoreKeyHubParams = []byte("hubparams")
	// DefaultGasLimit is gas limit we use for erc20bridge internal ethereum transactions
	DefaultGasLimit = uint64(100_000_000) // 100M
)

Parameter store key

View Source
var (
	ErrInvalidLengthParams        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowParams          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupParams = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthProposal        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowProposal          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupProposal = 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 (
	// ModuleCdc references the global erc20bridge 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/erc20bridge and
	// defined at the application level.
	ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
)

Functions

func NewRegisterTokenMappingProposal

func NewRegisterTokenMappingProposal(title, description string, mapping TokenMapping) gov.Content

NewRegisterTokenMappingProposal returns new instance of TokenMappingProposal

func NewResetHubProposal

func NewResetHubProposal(title, description string, hub string) gov.Content

NewResetHubProposal returns new instance of ResetHubProposal

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable - Key declaration for parameters

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register implementations

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec

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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

Types

type HubParams

type HubParams struct {
	HubAddress string `protobuf:"bytes,1,opt,name=hub_address,json=hubAddress,proto3" json:"hub_address,omitempty" yaml:"hub_address"`
}

func (*HubParams) Descriptor

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

func (*HubParams) GetHubAddress

func (m *HubParams) GetHubAddress() string

func (*HubParams) Marshal

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

func (*HubParams) MarshalTo

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

func (*HubParams) MarshalToSizedBuffer

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

func (*HubParams) ProtoMessage

func (*HubParams) ProtoMessage()

func (*HubParams) Reset

func (m *HubParams) Reset()

func (*HubParams) Size

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

func (*HubParams) String

func (m *HubParams) String() string

func (*HubParams) Unmarshal

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

func (*HubParams) XXX_DiscardUnknown

func (m *HubParams) XXX_DiscardUnknown()

func (*HubParams) XXX_Marshal

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

func (*HubParams) XXX_Merge

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

func (*HubParams) XXX_Size

func (m *HubParams) XXX_Size() int

func (*HubParams) XXX_Unmarshal

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

type MsgERC20BridgeMint

type MsgERC20BridgeMint struct {
	// ID of token mapping registered on bridge
	MappingId string `protobuf:"bytes,1,opt,name=mapping_id,json=mappingId,proto3" json:"mapping_id,omitempty"`
	// amount of token to mint
	Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// iEVM address to receive ERC20 token
	Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	// cosmos address
	Proposer github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 140-byte string literal not displayed */
}

func NewMsgERC20BridgeMint

func NewMsgERC20BridgeMint(mapping string, amount string, address string, proposer sdk.AccAddress) *MsgERC20BridgeMint

NewMsgERC20BridgeMint returns init hub msg instance

func (*MsgERC20BridgeMint) Descriptor

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

func (*MsgERC20BridgeMint) GetAddress

func (m *MsgERC20BridgeMint) GetAddress() string

func (*MsgERC20BridgeMint) GetAmount

func (m *MsgERC20BridgeMint) GetAmount() string

func (*MsgERC20BridgeMint) GetMappingId

func (m *MsgERC20BridgeMint) GetMappingId() string

func (*MsgERC20BridgeMint) GetProposer

func (*MsgERC20BridgeMint) GetSignBytes

func (msg *MsgERC20BridgeMint) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgERC20BridgeMint) GetSigners

func (msg MsgERC20BridgeMint) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgERC20BridgeMint) Marshal

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

func (*MsgERC20BridgeMint) MarshalTo

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

func (*MsgERC20BridgeMint) MarshalToSizedBuffer

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

func (*MsgERC20BridgeMint) ProtoMessage

func (*MsgERC20BridgeMint) ProtoMessage()

func (*MsgERC20BridgeMint) Reset

func (m *MsgERC20BridgeMint) Reset()

func (MsgERC20BridgeMint) Route

func (msg MsgERC20BridgeMint) Route() string

Route should return the name of the module

func (*MsgERC20BridgeMint) Size

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

func (*MsgERC20BridgeMint) String

func (m *MsgERC20BridgeMint) String() string

func (MsgERC20BridgeMint) Type

func (msg MsgERC20BridgeMint) Type() string

Type should return the action

func (*MsgERC20BridgeMint) Unmarshal

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

func (MsgERC20BridgeMint) ValidateBasic

func (msg MsgERC20BridgeMint) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgERC20BridgeMint) XXX_DiscardUnknown

func (m *MsgERC20BridgeMint) XXX_DiscardUnknown()

func (*MsgERC20BridgeMint) XXX_Marshal

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

func (*MsgERC20BridgeMint) XXX_Merge

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

func (*MsgERC20BridgeMint) XXX_Size

func (m *MsgERC20BridgeMint) XXX_Size() int

func (*MsgERC20BridgeMint) XXX_Unmarshal

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

type MsgInitHub

type MsgInitHub struct {
	HubAddress string                                        `protobuf:"bytes,1,opt,name=hub_address,json=hubAddress,proto3" json:"hub_address,omitempty" yaml:"hub_address"`
	Proposer   github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 140-byte string literal not displayed */
}

MsgInitHub describes a message to init ERC20 parent contract inside bridge keeper

func NewMsgInitHub

func NewMsgInitHub(hub string, proposer sdk.AccAddress) *MsgInitHub

NewMsgInitHub returns init hub msg instance

func (*MsgInitHub) Descriptor

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

func (*MsgInitHub) GetHubAddress

func (m *MsgInitHub) GetHubAddress() string

func (*MsgInitHub) GetProposer

func (*MsgInitHub) GetSignBytes

func (msg *MsgInitHub) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgInitHub) GetSigners

func (msg MsgInitHub) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (*MsgInitHub) Marshal

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

func (*MsgInitHub) MarshalTo

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

func (*MsgInitHub) MarshalToSizedBuffer

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

func (*MsgInitHub) ProtoMessage

func (*MsgInitHub) ProtoMessage()

func (*MsgInitHub) Reset

func (m *MsgInitHub) Reset()

func (MsgInitHub) Route

func (msg MsgInitHub) Route() string

Route should return the name of the module

func (*MsgInitHub) Size

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

func (*MsgInitHub) String

func (m *MsgInitHub) String() string

func (MsgInitHub) Type

func (msg MsgInitHub) Type() string

Type should return the action

func (*MsgInitHub) Unmarshal

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

func (MsgInitHub) ValidateBasic

func (msg MsgInitHub) ValidateBasic() error

ValidateBasic runs stateless checks on the message

func (*MsgInitHub) XXX_DiscardUnknown

func (m *MsgInitHub) XXX_DiscardUnknown()

func (*MsgInitHub) XXX_Marshal

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

func (*MsgInitHub) XXX_Merge

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

func (*MsgInitHub) XXX_Size

func (m *MsgInitHub) XXX_Size() int

func (*MsgInitHub) XXX_Unmarshal

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

type Params

type Params struct {
	HubParams HubParams `protobuf:"bytes,1,opt,name=hub_params,json=hubParams,proto3" json:"hub_params"`
}

func NewParams

func NewParams(hp HubParams) Params

NewParams creates a new Params object

func (*Params) Descriptor

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

func (*Params) GetHubParams

func (m *Params) GetHubParams() HubParams

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

func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs

ParamSetPairs returns the parameter set pairs.

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 QueryBridgesRequest

type QueryBridgesRequest struct {
}

QueryBridgesRequest is the request type for the Query/Storage RPC method.

func (*QueryBridgesRequest) Descriptor

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

func (*QueryBridgesRequest) Marshal

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

func (*QueryBridgesRequest) MarshalTo

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

func (*QueryBridgesRequest) MarshalToSizedBuffer

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

func (*QueryBridgesRequest) ProtoMessage

func (*QueryBridgesRequest) ProtoMessage()

func (*QueryBridgesRequest) Reset

func (m *QueryBridgesRequest) Reset()

func (*QueryBridgesRequest) Size

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

func (*QueryBridgesRequest) String

func (m *QueryBridgesRequest) String() string

func (*QueryBridgesRequest) Unmarshal

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

func (*QueryBridgesRequest) XXX_DiscardUnknown

func (m *QueryBridgesRequest) XXX_DiscardUnknown()

func (*QueryBridgesRequest) XXX_Marshal

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

func (*QueryBridgesRequest) XXX_Merge

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

func (*QueryBridgesRequest) XXX_Size

func (m *QueryBridgesRequest) XXX_Size() int

func (*QueryBridgesRequest) XXX_Unmarshal

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

type QueryBridgesResponse

type QueryBridgesResponse struct {
	Data []TokenMapping `protobuf:"bytes,1,rep,name=data,proto3" json:"data"`
}

QueryBridgesResponse is the response type for the Query/Storage RPC method.

func (*QueryBridgesResponse) Descriptor

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

func (*QueryBridgesResponse) GetData

func (m *QueryBridgesResponse) GetData() []TokenMapping

func (*QueryBridgesResponse) Marshal

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

func (*QueryBridgesResponse) MarshalTo

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

func (*QueryBridgesResponse) MarshalToSizedBuffer

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

func (*QueryBridgesResponse) ProtoMessage

func (*QueryBridgesResponse) ProtoMessage()

func (*QueryBridgesResponse) Reset

func (m *QueryBridgesResponse) Reset()

func (*QueryBridgesResponse) Size

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

func (*QueryBridgesResponse) String

func (m *QueryBridgesResponse) String() string

func (*QueryBridgesResponse) Unmarshal

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

func (*QueryBridgesResponse) XXX_DiscardUnknown

func (m *QueryBridgesResponse) XXX_DiscardUnknown()

func (*QueryBridgesResponse) XXX_Marshal

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

func (*QueryBridgesResponse) XXX_Merge

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

func (*QueryBridgesResponse) XXX_Size

func (m *QueryBridgesResponse) XXX_Size() int

func (*QueryBridgesResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Retrieves registered bridges
	Bridges(ctx context.Context, in *QueryBridgesRequest, opts ...grpc.CallOption) (*QueryBridgesResponse, error)
	// Retrieves hub params
	HubParams(ctx context.Context, in *QueryHubParamsRequest, opts ...grpc.CallOption) (*QueryHubParamsResponse, 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 QueryHubParamsRequest

type QueryHubParamsRequest struct {
}

QueryHubParamsRequest is the request type for the Query/Storage RPC method.

func (*QueryHubParamsRequest) Descriptor

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

func (*QueryHubParamsRequest) Marshal

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

func (*QueryHubParamsRequest) MarshalTo

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

func (*QueryHubParamsRequest) MarshalToSizedBuffer

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

func (*QueryHubParamsRequest) ProtoMessage

func (*QueryHubParamsRequest) ProtoMessage()

func (*QueryHubParamsRequest) Reset

func (m *QueryHubParamsRequest) Reset()

func (*QueryHubParamsRequest) Size

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

func (*QueryHubParamsRequest) String

func (m *QueryHubParamsRequest) String() string

func (*QueryHubParamsRequest) Unmarshal

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

func (*QueryHubParamsRequest) XXX_DiscardUnknown

func (m *QueryHubParamsRequest) XXX_DiscardUnknown()

func (*QueryHubParamsRequest) XXX_Marshal

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

func (*QueryHubParamsRequest) XXX_Merge

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

func (*QueryHubParamsRequest) XXX_Size

func (m *QueryHubParamsRequest) XXX_Size() int

func (*QueryHubParamsRequest) XXX_Unmarshal

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

type QueryHubParamsResponse

type QueryHubParamsResponse struct {
	Data HubParams `protobuf:"bytes,1,opt,name=data,proto3" json:"data"`
}

QueryHubParamsResponse is the response type for the Query/Storage RPC method.

func (*QueryHubParamsResponse) Descriptor

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

func (*QueryHubParamsResponse) GetData

func (m *QueryHubParamsResponse) GetData() HubParams

func (*QueryHubParamsResponse) Marshal

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

func (*QueryHubParamsResponse) MarshalTo

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

func (*QueryHubParamsResponse) MarshalToSizedBuffer

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

func (*QueryHubParamsResponse) ProtoMessage

func (*QueryHubParamsResponse) ProtoMessage()

func (*QueryHubParamsResponse) Reset

func (m *QueryHubParamsResponse) Reset()

func (*QueryHubParamsResponse) Size

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

func (*QueryHubParamsResponse) String

func (m *QueryHubParamsResponse) String() string

func (*QueryHubParamsResponse) Unmarshal

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

func (*QueryHubParamsResponse) XXX_DiscardUnknown

func (m *QueryHubParamsResponse) XXX_DiscardUnknown()

func (*QueryHubParamsResponse) XXX_Marshal

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

func (*QueryHubParamsResponse) XXX_Merge

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

func (*QueryHubParamsResponse) XXX_Size

func (m *QueryHubParamsResponse) XXX_Size() int

func (*QueryHubParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Retrieves registered bridges
	Bridges(context.Context, *QueryBridgesRequest) (*QueryBridgesResponse, error)
	// Retrieves hub params
	HubParams(context.Context, *QueryHubParamsRequest) (*QueryHubParamsResponse, error)
}

QueryServer is the server API for Query service.

type RegisterTokenMappingProposal

type RegisterTokenMappingProposal struct {
	Title       string       `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string       `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Mapping     TokenMapping `protobuf:"bytes,3,opt,name=mapping,proto3" json:"mapping"`
}

RegisterTokenMappingProposal is a gov Content type to register a token mapping

func (*RegisterTokenMappingProposal) Descriptor

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

func (*RegisterTokenMappingProposal) Equal

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

func (*RegisterTokenMappingProposal) GetDescription

func (m *RegisterTokenMappingProposal) GetDescription() string

func (*RegisterTokenMappingProposal) GetMapping

func (*RegisterTokenMappingProposal) GetTitle

func (m *RegisterTokenMappingProposal) GetTitle() string

func (*RegisterTokenMappingProposal) Marshal

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

func (*RegisterTokenMappingProposal) MarshalTo

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

func (*RegisterTokenMappingProposal) MarshalToSizedBuffer

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

func (*RegisterTokenMappingProposal) ProposalRoute

func (sup *RegisterTokenMappingProposal) ProposalRoute() string

ProposalRoute returns router key for this proposal

func (*RegisterTokenMappingProposal) ProposalType

func (sup *RegisterTokenMappingProposal) ProposalType() string

ProposalType returns proposal type for this proposal

func (*RegisterTokenMappingProposal) ProtoMessage

func (*RegisterTokenMappingProposal) ProtoMessage()

func (*RegisterTokenMappingProposal) Reset

func (m *RegisterTokenMappingProposal) Reset()

func (*RegisterTokenMappingProposal) Size

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

func (*RegisterTokenMappingProposal) String

func (*RegisterTokenMappingProposal) Unmarshal

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

func (*RegisterTokenMappingProposal) ValidateBasic

func (sup *RegisterTokenMappingProposal) ValidateBasic() error

ValidateBasic returns ValidateBasic result for this proposal

func (*RegisterTokenMappingProposal) XXX_DiscardUnknown

func (m *RegisterTokenMappingProposal) XXX_DiscardUnknown()

func (*RegisterTokenMappingProposal) XXX_Marshal

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

func (*RegisterTokenMappingProposal) XXX_Merge

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

func (*RegisterTokenMappingProposal) XXX_Size

func (m *RegisterTokenMappingProposal) XXX_Size() int

func (*RegisterTokenMappingProposal) XXX_Unmarshal

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

type ResetHubProposal

type ResetHubProposal struct {
	Title       string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	HubAddress  string `protobuf:"bytes,3,opt,name=hub_address,json=hubAddress,proto3" json:"hub_address,omitempty" yaml:"hub_address"`
}

ResetHubProposal is a gov Content type to reset hub when reset hub, all the bridges from previous version are derivated

func (*ResetHubProposal) Descriptor

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

func (*ResetHubProposal) Equal

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

func (*ResetHubProposal) GetDescription

func (m *ResetHubProposal) GetDescription() string

func (*ResetHubProposal) GetHubAddress

func (m *ResetHubProposal) GetHubAddress() string

func (*ResetHubProposal) GetTitle

func (m *ResetHubProposal) GetTitle() string

func (*ResetHubProposal) Marshal

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

func (*ResetHubProposal) MarshalTo

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

func (*ResetHubProposal) MarshalToSizedBuffer

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

func (*ResetHubProposal) ProposalRoute

func (rh *ResetHubProposal) ProposalRoute() string

ProposalRoute returns router key for this proposal

func (*ResetHubProposal) ProposalType

func (rh *ResetHubProposal) ProposalType() string

ProposalType returns proposal type for this proposal

func (*ResetHubProposal) ProtoMessage

func (*ResetHubProposal) ProtoMessage()

func (*ResetHubProposal) Reset

func (m *ResetHubProposal) Reset()

func (*ResetHubProposal) Size

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

func (*ResetHubProposal) String

func (m *ResetHubProposal) String() string

func (*ResetHubProposal) Unmarshal

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

func (*ResetHubProposal) ValidateBasic

func (rh *ResetHubProposal) ValidateBasic() error

ValidateBasic returns ValidateBasic result for this proposal

func (*ResetHubProposal) XXX_DiscardUnknown

func (m *ResetHubProposal) XXX_DiscardUnknown()

func (*ResetHubProposal) XXX_Marshal

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

func (*ResetHubProposal) XXX_Merge

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

func (*ResetHubProposal) XXX_Size

func (m *ResetHubProposal) XXX_Size() int

func (*ResetHubProposal) XXX_Unmarshal

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

type TokenMapping

type TokenMapping struct {
	// bridge name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// address of ERC20 contract token
	Erc20Address string `protobuf:"bytes,2,opt,name=erc20_address,json=erc20Address,proto3" json:"erc20_address,omitempty"`
	// cosmos-native denominator to mapped to ERC20
	CosmosDenom string `protobuf:"bytes,3,opt,name=cosmos_denom,json=cosmosDenom,proto3" json:"cosmos_denom,omitempty"`
	// shows token mapping bridge enable status
	Enabled bool `protobuf:"varint,4,opt,name=enabled,proto3" json:"enabled,omitempty"`
}

TokenMapping defines a mapping for cosmos denom and erc20 address.

func NewTokenMapping

func NewTokenMapping(name string, erc20Address string, cosmosDenom string, enabled bool) TokenMapping

NewTokenMapping returns an instance of TokenMapping

func (*TokenMapping) Descriptor

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

func (*TokenMapping) Equal

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

func (*TokenMapping) GetCosmosDenom

func (m *TokenMapping) GetCosmosDenom() string

func (*TokenMapping) GetEnabled

func (m *TokenMapping) GetEnabled() bool

func (*TokenMapping) GetErc20Address

func (m *TokenMapping) GetErc20Address() string

func (*TokenMapping) GetName

func (m *TokenMapping) GetName() string

func (*TokenMapping) Marshal

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

func (*TokenMapping) MarshalTo

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

func (*TokenMapping) MarshalToSizedBuffer

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

func (*TokenMapping) ProtoMessage

func (*TokenMapping) ProtoMessage()

func (*TokenMapping) Reset

func (m *TokenMapping) Reset()

func (*TokenMapping) Size

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

func (*TokenMapping) String

func (m *TokenMapping) String() string

func (*TokenMapping) Unmarshal

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

func (TokenMapping) ValidateBasic

func (v TokenMapping) ValidateBasic() error

ValidateBasic does basic validation of a TokenMapping

func (*TokenMapping) XXX_DiscardUnknown

func (m *TokenMapping) XXX_DiscardUnknown()

func (*TokenMapping) XXX_Marshal

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

func (*TokenMapping) XXX_Merge

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

func (*TokenMapping) XXX_Size

func (m *TokenMapping) XXX_Size() int

func (*TokenMapping) XXX_Unmarshal

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

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Bridges

func (*UnimplementedQueryServer) HubParams

Jump to

Keyboard shortcuts

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