Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func VerifyAttestorShares(attestors []string, threshold int) error
- func VerifyBLSSignature(attestors []string, threshold int, sigShares [][]byte, msg []byte) error
- type BankKeeper
- type BridgeDataPacket
- func (*BridgeDataPacket) Descriptor() ([]byte, []int)
- func (m *BridgeDataPacket) GetAmount() uint64
- func (m *BridgeDataPacket) GetDenom() string
- func (m *BridgeDataPacket) GetDstAddress() string
- func (m *BridgeDataPacket) Marshal() (dAtA []byte, err error)
- func (m *BridgeDataPacket) MarshalTo(dAtA []byte) (int, error)
- func (m *BridgeDataPacket) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BridgeDataPacket) ProtoMessage()
- func (bdp *BridgeDataPacket) RLPDecode(data []byte) error
- func (bdp *BridgeDataPacket) RLPEncode() ([]byte, error)
- func (m *BridgeDataPacket) Reset()
- func (m *BridgeDataPacket) Size() (n int)
- func (m *BridgeDataPacket) String() string
- func (m *BridgeDataPacket) Unmarshal(dAtA []byte) error
- func (m *BridgeDataPacket) XXX_DiscardUnknown()
- func (m *BridgeDataPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BridgeDataPacket) XXX_Merge(src proto.Message)
- func (m *BridgeDataPacket) XXX_Size() int
- func (m *BridgeDataPacket) XXX_Unmarshal(b []byte) error
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) GetParams() Params
- func (m *GenesisState) GetRateLimiter() RateLimiter
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgBridgeTransfer
- func (*MsgBridgeTransfer) Descriptor() ([]byte, []int)
- func (m *MsgBridgeTransfer) Marshal() (dAtA []byte, err error)
- func (m *MsgBridgeTransfer) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBridgeTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBridgeTransfer) ProtoMessage()
- func (m *MsgBridgeTransfer) Reset()
- func (m *MsgBridgeTransfer) Size() (n int)
- func (m *MsgBridgeTransfer) String() string
- func (m *MsgBridgeTransfer) Unmarshal(dAtA []byte) error
- func (m *MsgBridgeTransfer) XXX_DiscardUnknown()
- func (m *MsgBridgeTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBridgeTransfer) XXX_Merge(src proto.Message)
- func (m *MsgBridgeTransfer) XXX_Size() int
- func (m *MsgBridgeTransfer) XXX_Unmarshal(b []byte) error
- type MsgBridgeTransferResponse
- func (*MsgBridgeTransferResponse) Descriptor() ([]byte, []int)
- func (m *MsgBridgeTransferResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgBridgeTransferResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgBridgeTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgBridgeTransferResponse) ProtoMessage()
- func (m *MsgBridgeTransferResponse) Reset()
- func (m *MsgBridgeTransferResponse) Size() (n int)
- func (m *MsgBridgeTransferResponse) String() string
- func (m *MsgBridgeTransferResponse) Unmarshal(dAtA []byte) error
- func (m *MsgBridgeTransferResponse) XXX_DiscardUnknown()
- func (m *MsgBridgeTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgBridgeTransferResponse) XXX_Merge(src proto.Message)
- func (m *MsgBridgeTransferResponse) XXX_Size() int
- func (m *MsgBridgeTransferResponse) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgServer
- type MsgUpdateParams
- func (*MsgUpdateParams) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParams) GetAuthority() string
- func (m *MsgUpdateParams) GetParams() Params
- func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParams) ProtoMessage()
- func (m *MsgUpdateParams) Reset()
- func (m *MsgUpdateParams) Size() (n int)
- func (m *MsgUpdateParams) String() string
- func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParams) XXX_DiscardUnknown()
- func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParams) XXX_Size() int
- func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
- type MsgUpdateParamsResponse
- func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
- func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgUpdateParamsResponse) ProtoMessage()
- func (m *MsgUpdateParamsResponse) Reset()
- func (m *MsgUpdateParamsResponse) Size() (n int)
- func (m *MsgUpdateParamsResponse) String() string
- func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
- func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
- func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
- func (m *MsgUpdateParamsResponse) XXX_Size() int
- func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (this *Params) Equal(that interface{}) bool
- func (m *Params) GetAttestationThreshold() int64
- func (m *Params) GetAttestors() []string
- func (m *Params) GetRateLimitDuration() time.Duration
- func (m *Params) GetRateLimitQuota() uint64
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type RateLimiter
- func (*RateLimiter) Descriptor() ([]byte, []int)
- func (m *RateLimiter) GetFlow() uint64
- func (m *RateLimiter) GetLastTransfer() time.Time
- func (m *RateLimiter) Marshal() (dAtA []byte, err error)
- func (m *RateLimiter) MarshalTo(dAtA []byte) (int, error)
- func (m *RateLimiter) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*RateLimiter) ProtoMessage()
- func (m *RateLimiter) Reset()
- func (m *RateLimiter) Size() (n int)
- func (m *RateLimiter) String() string
- func (m *RateLimiter) Unmarshal(dAtA []byte) error
- func (m *RateLimiter) XXX_DiscardUnknown()
- func (m *RateLimiter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *RateLimiter) XXX_Merge(src proto.Message)
- func (m *RateLimiter) XXX_Size() int
- func (m *RateLimiter) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
Constants ¶
const ( // ModuleName defines the name of the x/rwabridge module. ModuleName = "rwabridge" // StoreKey defines the module's store key. StoreKey = ModuleName )
const ( IndexParams = "params" IndexRateLimiter = "rate_limit_flow" )
Collection indexes
Variables ¶
var ( ErrInvalidPacket = errors.Register(ModuleName, 2, "invalid bridge data packet") ErrBridgeTransfer = errors.Register(ModuleName, 3, "failed to bridge and mint transfer") ErrInvalidParams = errors.Register(ModuleName, 4, "invalid module parameters") )
x/rwabridge module sentinel errors
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( KeyPrefixParams = collections.NewPrefix(0) KeyPrefixRateLimiter = collections.NewPrefix(1) )
Collection key prefixes
Functions ¶
func RegisterInterfaces ¶
func RegisterInterfaces(registry types.InterfaceRegistry)
func RegisterMsgServer ¶
func VerifyAttestorShares ¶
VerifyAttestorShares attempts to verify the threshold BLS public key given the individual public shares from the attestors and the threshold. It returns an error upon failure.
func VerifyBLSSignature ¶
VerifyBLSSignature verifies a threshold BLS signature given all the attestors, the BLS signature threshold, the individual signatures from the attestors that signed, and the RLP encoded message. It returns an error upon failure.
Types ¶
type BankKeeper ¶
type BankKeeper interface { SendCoinsFromModuleToAccount(ctx context.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error MintCoins(ctx context.Context, name string, amt sdk.Coins) error }
BankKeeper defines the expected x/bank module API contract.
type BridgeDataPacket ¶
type BridgeDataPacket struct { Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` DstAddress string `protobuf:"bytes,3,opt,name=dst_address,json=dstAddress,proto3" json:"dst_address,omitempty"` }
BridgeDataPacket defines the data packet that is sent to the bridge contract module on the Cosmos chain. Specifically, this packet contains the destination address on the Cosmos chain and the amount to mint/transfer.
func (*BridgeDataPacket) Descriptor ¶
func (*BridgeDataPacket) Descriptor() ([]byte, []int)
func (*BridgeDataPacket) GetAmount ¶
func (m *BridgeDataPacket) GetAmount() uint64
func (*BridgeDataPacket) GetDenom ¶
func (m *BridgeDataPacket) GetDenom() string
func (*BridgeDataPacket) GetDstAddress ¶
func (m *BridgeDataPacket) GetDstAddress() string
func (*BridgeDataPacket) Marshal ¶
func (m *BridgeDataPacket) Marshal() (dAtA []byte, err error)
func (*BridgeDataPacket) MarshalToSizedBuffer ¶
func (m *BridgeDataPacket) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BridgeDataPacket) ProtoMessage ¶
func (*BridgeDataPacket) ProtoMessage()
func (*BridgeDataPacket) RLPDecode ¶
func (bdp *BridgeDataPacket) RLPDecode(data []byte) error
RLPDecode RLP decodes the byte slice into the BridgeDataPacket receiver returning an error upon failure.
func (*BridgeDataPacket) RLPEncode ¶
func (bdp *BridgeDataPacket) RLPEncode() ([]byte, error)
RLPEncode RLP encodes the BridgeDataPacket into a byte slice returning an error upon failure.
func (*BridgeDataPacket) Reset ¶
func (m *BridgeDataPacket) Reset()
func (*BridgeDataPacket) Size ¶
func (m *BridgeDataPacket) Size() (n int)
func (*BridgeDataPacket) String ¶
func (m *BridgeDataPacket) String() string
func (*BridgeDataPacket) Unmarshal ¶
func (m *BridgeDataPacket) Unmarshal(dAtA []byte) error
func (*BridgeDataPacket) XXX_DiscardUnknown ¶
func (m *BridgeDataPacket) XXX_DiscardUnknown()
func (*BridgeDataPacket) XXX_Marshal ¶
func (m *BridgeDataPacket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BridgeDataPacket) XXX_Merge ¶
func (m *BridgeDataPacket) XXX_Merge(src proto.Message)
func (*BridgeDataPacket) XXX_Size ¶
func (m *BridgeDataPacket) XXX_Size() int
func (*BridgeDataPacket) XXX_Unmarshal ¶
func (m *BridgeDataPacket) XXX_Unmarshal(b []byte) error
type GenesisState ¶
type GenesisState struct { Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` RateLimiter RateLimiter `protobuf:"bytes,2,opt,name=rate_limiter,json=rateLimiter,proto3" json:"rate_limiter"` }
GenesisState defines the x/rwabridge module's genesis state.
func (*GenesisState) Descriptor ¶
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) GetParams ¶
func (m *GenesisState) GetParams() Params
func (*GenesisState) GetRateLimiter ¶
func (m *GenesisState) GetRateLimiter() RateLimiter
func (*GenesisState) Marshal ¶
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalToSizedBuffer ¶
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶
func (*GenesisState) ProtoMessage()
func (*GenesisState) 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 MsgBridgeTransfer ¶
type MsgBridgeTransfer struct { // The from_address must be the address of the user who is transferring the // tokens from Ethereum to Cosmos, i.e the token mint initiator. FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty"` // The packet to be sent to the bridge contract on the Cosmos chain. This // packet contains the destination address on the Cosmos chain and the amount // to mint/transfer. Packet BridgeDataPacket `protobuf:"bytes,2,opt,name=packet,proto3" json:"packet"` // The HEX-encoded BLS signatures of the attestors attesting to the bridge // transfer. The signature MUST sign over the RLP encoding of a // BridgeDataPacket. // // Note, we assume the user, via the web application, will submit a series of // individual threshold BLS signatures from the attestors. However, this is // NOT required. An alternative approach is to aggregate the threshold BLS // signature on the client side and submit the aggregated signature in the // message. This would reduce message size and gas costs. However, we simply // show the individual signatures here for clarity and demonstration purposes. Signatures []string `protobuf:"bytes,3,rep,name=signatures,proto3" json:"signatures,omitempty"` }
MsgBridgeTransfer defines the request structure for executing a BridgeTransfer message.
func (*MsgBridgeTransfer) Descriptor ¶
func (*MsgBridgeTransfer) Descriptor() ([]byte, []int)
func (*MsgBridgeTransfer) Marshal ¶
func (m *MsgBridgeTransfer) Marshal() (dAtA []byte, err error)
func (*MsgBridgeTransfer) MarshalTo ¶
func (m *MsgBridgeTransfer) MarshalTo(dAtA []byte) (int, error)
func (*MsgBridgeTransfer) MarshalToSizedBuffer ¶
func (m *MsgBridgeTransfer) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgBridgeTransfer) ProtoMessage ¶
func (*MsgBridgeTransfer) ProtoMessage()
func (*MsgBridgeTransfer) Reset ¶
func (m *MsgBridgeTransfer) Reset()
func (*MsgBridgeTransfer) Size ¶
func (m *MsgBridgeTransfer) Size() (n int)
func (*MsgBridgeTransfer) String ¶
func (m *MsgBridgeTransfer) String() string
func (*MsgBridgeTransfer) Unmarshal ¶
func (m *MsgBridgeTransfer) Unmarshal(dAtA []byte) error
func (*MsgBridgeTransfer) XXX_DiscardUnknown ¶
func (m *MsgBridgeTransfer) XXX_DiscardUnknown()
func (*MsgBridgeTransfer) XXX_Marshal ¶
func (m *MsgBridgeTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgBridgeTransfer) XXX_Merge ¶
func (m *MsgBridgeTransfer) XXX_Merge(src proto.Message)
func (*MsgBridgeTransfer) XXX_Size ¶
func (m *MsgBridgeTransfer) XXX_Size() int
func (*MsgBridgeTransfer) XXX_Unmarshal ¶
func (m *MsgBridgeTransfer) XXX_Unmarshal(b []byte) error
type MsgBridgeTransferResponse ¶
type MsgBridgeTransferResponse struct { }
MsgBridgeTransferResponse defines the response structure for executing a BridgeTransfer message.
func (*MsgBridgeTransferResponse) Descriptor ¶
func (*MsgBridgeTransferResponse) Descriptor() ([]byte, []int)
func (*MsgBridgeTransferResponse) Marshal ¶
func (m *MsgBridgeTransferResponse) Marshal() (dAtA []byte, err error)
func (*MsgBridgeTransferResponse) MarshalTo ¶
func (m *MsgBridgeTransferResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgBridgeTransferResponse) MarshalToSizedBuffer ¶
func (m *MsgBridgeTransferResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgBridgeTransferResponse) ProtoMessage ¶
func (*MsgBridgeTransferResponse) ProtoMessage()
func (*MsgBridgeTransferResponse) Reset ¶
func (m *MsgBridgeTransferResponse) Reset()
func (*MsgBridgeTransferResponse) Size ¶
func (m *MsgBridgeTransferResponse) Size() (n int)
func (*MsgBridgeTransferResponse) String ¶
func (m *MsgBridgeTransferResponse) String() string
func (*MsgBridgeTransferResponse) Unmarshal ¶
func (m *MsgBridgeTransferResponse) Unmarshal(dAtA []byte) error
func (*MsgBridgeTransferResponse) XXX_DiscardUnknown ¶
func (m *MsgBridgeTransferResponse) XXX_DiscardUnknown()
func (*MsgBridgeTransferResponse) XXX_Marshal ¶
func (m *MsgBridgeTransferResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgBridgeTransferResponse) XXX_Merge ¶
func (m *MsgBridgeTransferResponse) XXX_Merge(src proto.Message)
func (*MsgBridgeTransferResponse) XXX_Size ¶
func (m *MsgBridgeTransferResponse) XXX_Size() int
func (*MsgBridgeTransferResponse) XXX_Unmarshal ¶
func (m *MsgBridgeTransferResponse) XXX_Unmarshal(b []byte) error
type MsgClient ¶
type MsgClient interface { // UpdateParams defines a (governance) operation for updating the x/rwabridge // module parameters. The authority defaults to the x/rwabridge admin. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) // BridgeTransfer defines a (bridge) operation for transferring tokens from // the Ethereum source chain to the Cosmos destination chain. BridgeTransfer(ctx context.Context, in *MsgBridgeTransfer, opts ...grpc.CallOption) (*MsgBridgeTransferResponse, 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 MsgServer ¶
type MsgServer interface { // UpdateParams defines a (governance) operation for updating the x/rwabridge // module parameters. The authority defaults to the x/rwabridge admin. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) // BridgeTransfer defines a (bridge) operation for transferring tokens from // the Ethereum source chain to the Cosmos destination chain. BridgeTransfer(context.Context, *MsgBridgeTransfer) (*MsgBridgeTransferResponse, error) }
MsgServer is the server API for Msg service.
type MsgUpdateParams ¶
type MsgUpdateParams struct { // authority must be the contract admin. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // params defines the x/rwabridge parameters to update. // // NOTE: All parameters must be supplied. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` }
MsgUpdateParams defines the UpdateParams request type.
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) MarshalToSizedBuffer ¶
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParams) ProtoMessage ¶
func (*MsgUpdateParams) ProtoMessage()
func (*MsgUpdateParams) Reset ¶
func (m *MsgUpdateParams) Reset()
func (*MsgUpdateParams) Size ¶
func (m *MsgUpdateParams) Size() (n int)
func (*MsgUpdateParams) String ¶
func (m *MsgUpdateParams) String() string
func (*MsgUpdateParams) Unmarshal ¶
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error
func (*MsgUpdateParams) XXX_DiscardUnknown ¶
func (m *MsgUpdateParams) XXX_DiscardUnknown()
func (*MsgUpdateParams) XXX_Marshal ¶
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParams) XXX_Merge ¶
func (m *MsgUpdateParams) XXX_Merge(src proto.Message)
func (*MsgUpdateParams) XXX_Size ¶
func (m *MsgUpdateParams) XXX_Size() int
func (*MsgUpdateParams) XXX_Unmarshal ¶
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error
type MsgUpdateParamsResponse ¶
type MsgUpdateParamsResponse struct { }
MsgUpdateParamsResponse defines the response structure for executing a MsgUpdateParams message.
func (*MsgUpdateParamsResponse) Descriptor ¶
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int)
func (*MsgUpdateParamsResponse) Marshal ¶
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error)
func (*MsgUpdateParamsResponse) MarshalTo ¶
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) MarshalToSizedBuffer ¶
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgUpdateParamsResponse) ProtoMessage ¶
func (*MsgUpdateParamsResponse) ProtoMessage()
func (*MsgUpdateParamsResponse) Reset ¶
func (m *MsgUpdateParamsResponse) Reset()
func (*MsgUpdateParamsResponse) Size ¶
func (m *MsgUpdateParamsResponse) Size() (n int)
func (*MsgUpdateParamsResponse) String ¶
func (m *MsgUpdateParamsResponse) String() string
func (*MsgUpdateParamsResponse) Unmarshal ¶
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error
func (*MsgUpdateParamsResponse) XXX_DiscardUnknown ¶
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown()
func (*MsgUpdateParamsResponse) XXX_Marshal ¶
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgUpdateParamsResponse) XXX_Merge ¶
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message)
func (*MsgUpdateParamsResponse) XXX_Size ¶
func (m *MsgUpdateParamsResponse) XXX_Size() int
func (*MsgUpdateParamsResponse) XXX_Unmarshal ¶
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error
type Params ¶
type Params struct { // Attestors defines the list of attestors as a series of HEX encoded BLS // public key shares, that are allowed to attest to bridge transactions. This // set is dynamic and can be changed by the bridge admin. // // Note, each public key is a specific key share that is part of a BLS // threshold public key scheme. The threshold public key is generated from the // set of key shares and is used to verify the aggregated signature of the // attestors. We derive the index of public share from it's position in this // list. // // We assume the BLS threshold DKG process happens out-of-band. The admin of // the x/rwamodule has authorization to update these params, which would // enable a dynamic aet of attestors, however, this trusted DKG process must // still happen out-of-band. Attestors []string `protobuf:"bytes,1,rep,name=attestors,proto3" json:"attestors,omitempty"` // AttestationThreshold defines the minimum number of attestors required to // attest to a bridge transaction before it is considered valid. AttestationThreshold int64 `protobuf:"varint,2,opt,name=attestation_threshold,json=attestationThreshold,proto3" json:"attestation_threshold,omitempty"` // RateLimitDuration defines the duration for which a rate limit quota is // enforced, after which it is reset. RateLimitDuration time.Duration `protobuf:"bytes,3,opt,name=rate_limit_duration,json=rateLimitDuration,proto3,stdduration" json:"rate_limit_duration"` // RateLimitQuota defines the total amount that can be minted and transferred // within a given rate limit duration. RateLimitQuota uint64 `protobuf:"varint,4,opt,name=rate_limit_quota,json=rateLimitQuota,proto3" json:"rate_limit_quota,omitempty"` }
Params defines the parameters for the x/rwabridge module.
func (*Params) Descriptor ¶
func (*Params) GetAttestationThreshold ¶
func (*Params) GetAttestors ¶
func (*Params) GetRateLimitDuration ¶
func (*Params) GetRateLimitQuota ¶
func (*Params) MarshalToSizedBuffer ¶
func (*Params) ProtoMessage ¶
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶
func (*Params) XXX_Unmarshal ¶
type RateLimiter ¶
type RateLimiter struct { Flow uint64 `protobuf:"varint,1,opt,name=flow,proto3" json:"flow,omitempty"` LastTransfer time.Time `protobuf:"bytes,2,opt,name=last_transfer,json=lastTransfer,proto3,stdtime" json:"last_transfer"` }
RateLimiter defines the rate limiter that is used to enforce a quota on the amount of tokens that can be minted and transferred within a given duration.
func (*RateLimiter) Descriptor ¶
func (*RateLimiter) Descriptor() ([]byte, []int)
func (*RateLimiter) GetFlow ¶
func (m *RateLimiter) GetFlow() uint64
func (*RateLimiter) GetLastTransfer ¶
func (m *RateLimiter) GetLastTransfer() time.Time
func (*RateLimiter) Marshal ¶
func (m *RateLimiter) Marshal() (dAtA []byte, err error)
func (*RateLimiter) MarshalToSizedBuffer ¶
func (m *RateLimiter) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*RateLimiter) ProtoMessage ¶
func (*RateLimiter) ProtoMessage()
func (*RateLimiter) Reset ¶
func (m *RateLimiter) Reset()
func (*RateLimiter) Size ¶
func (m *RateLimiter) Size() (n int)
func (*RateLimiter) String ¶
func (m *RateLimiter) String() string
func (*RateLimiter) Unmarshal ¶
func (m *RateLimiter) Unmarshal(dAtA []byte) error
func (*RateLimiter) XXX_DiscardUnknown ¶
func (m *RateLimiter) XXX_DiscardUnknown()
func (*RateLimiter) XXX_Marshal ¶
func (m *RateLimiter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RateLimiter) XXX_Merge ¶
func (m *RateLimiter) XXX_Merge(src proto.Message)
func (*RateLimiter) XXX_Size ¶
func (m *RateLimiter) XXX_Size() int
func (*RateLimiter) XXX_Unmarshal ¶
func (m *RateLimiter) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) BridgeTransfer ¶
func (*UnimplementedMsgServer) BridgeTransfer(ctx context.Context, req *MsgBridgeTransfer) (*MsgBridgeTransferResponse, error)
func (*UnimplementedMsgServer) UpdateParams ¶
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error)