Documentation ¶
Index ¶
- func NewMsgServerImpl(keeper types.BridgeKeeper) types.MsgServer
- type Keeper
- func (k Keeper) AcknowledgeBridges(ctx sdk.Context, bridgeEvents []types.BridgeEvent) (err error)
- func (k Keeper) AcknowledgedEventInfo(c context.Context, req *types.QueryAcknowledgedEventInfoRequest) (*types.QueryAcknowledgedEventInfoResponse, error)
- func (k Keeper) CompleteBridge(ctx sdk.Context, bridge types.BridgeEvent) (err error)
- func (k Keeper) EventParams(c context.Context, req *types.QueryEventParamsRequest) (*types.QueryEventParamsResponse, error)
- func (k Keeper) GetAcknowledgeBridges(ctx sdk.Context, blockTimestamp time.Time) (msg *types.MsgAcknowledgeBridges)
- func (k Keeper) GetAcknowledgedEventInfo(ctx sdk.Context) (acknowledgedEventInfo types.BridgeEventInfo)
- func (k Keeper) GetBridgeEventFromServer(ctx sdk.Context, id uint32) (event types.BridgeEvent, found bool)
- func (k Keeper) GetEventParams(ctx sdk.Context) (params types.EventParams)
- func (k Keeper) GetProposeParams(ctx sdk.Context) (params types.ProposeParams)
- func (k Keeper) GetRecognizedEventInfo(ctx sdk.Context) (recognizedEventInfo types.BridgeEventInfo)
- func (k Keeper) GetSafetyParams(ctx sdk.Context) (params types.SafetyParams)
- func (k Keeper) HasAuthority(authority string) bool
- func (k Keeper) InitializeForGenesis(ctx sdk.Context)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) ProposeParams(c context.Context, req *types.QueryProposeParamsRequest) (*types.QueryProposeParamsResponse, error)
- func (k Keeper) RecognizedEventInfo(c context.Context, req *types.QueryRecognizedEventInfoRequest) (*types.QueryRecognizedEventInfoResponse, error)
- func (k Keeper) SafetyParams(c context.Context, req *types.QuerySafetyParamsRequest) (*types.QuerySafetyParamsResponse, error)
- func (k Keeper) SetAcknowledgedEventInfo(ctx sdk.Context, acknowledgedEventInfo types.BridgeEventInfo) error
- func (k Keeper) UpdateEventParams(ctx sdk.Context, params types.EventParams) error
- func (k Keeper) UpdateProposeParams(ctx sdk.Context, params types.ProposeParams) error
- func (k Keeper) UpdateSafetyParams(ctx sdk.Context, params types.SafetyParams) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMsgServerImpl ¶
func NewMsgServerImpl(keeper types.BridgeKeeper) types.MsgServer
NewMsgServerImpl returns an implementation of the MsgServer interface for the provided Keeper.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, storeKey storetypes.StoreKey, bridgeEventManager *bridgeserver.BridgeEventManager, bankKeeper types.BankKeeper, delayMsgKeeper delaymsgtypes.DelayMsgKeeper, authorities []string, ) *Keeper
func (Keeper) AcknowledgeBridges ¶
func (k Keeper) AcknowledgeBridges( ctx sdk.Context, bridgeEvents []types.BridgeEvent, ) (err error)
AcknowledgeBridges acknowledges a list of bridge events.
func (Keeper) AcknowledgedEventInfo ¶
func (k Keeper) AcknowledgedEventInfo( c context.Context, req *types.QueryAcknowledgedEventInfoRequest, ) ( *types.QueryAcknowledgedEventInfoResponse, error, )
AcknowledgedEventInfo processes a query request/response for `AcknowledgedEventInfo` from state.
func (Keeper) CompleteBridge ¶
`CompleteBridge` processes a bridge event by transfer the appropriate tokens from bridge module account to the given address. The id of the bridge is not validated as it should have already been validated by AcknowledgeBridges.
func (Keeper) EventParams ¶
func (k Keeper) EventParams( c context.Context, req *types.QueryEventParamsRequest, ) ( *types.QueryEventParamsResponse, error, )
EventParams processes a query request/response for the EventParams from state.
func (Keeper) GetAcknowledgeBridges ¶
func (k Keeper) GetAcknowledgeBridges( ctx sdk.Context, blockTimestamp time.Time, ) (msg *types.MsgAcknowledgeBridges)
GetAcknowledgeBridges returns a `MsgAcknowledgeBridges` for recognized but not-yet-acknowledged bridge events, up to a maximum number of `ProposeParams.MaxBridgesPerBlock`.
func (Keeper) GetAcknowledgedEventInfo ¶
func (k Keeper) GetAcknowledgedEventInfo( ctx sdk.Context, ) (acknowledgedEventInfo types.BridgeEventInfo)
GetAcknowledgedEventInfo returns `AcknowledgedEventInfo` from state.
func (Keeper) GetBridgeEventFromServer ¶
func (Keeper) GetEventParams ¶
func (k Keeper) GetEventParams( ctx sdk.Context, ) ( params types.EventParams, )
GetEventParams returns the EventParams in state.
func (Keeper) GetProposeParams ¶
func (k Keeper) GetProposeParams( ctx sdk.Context, ) ( params types.ProposeParams, )
GetProposeParams returns the ProposeParams in state.
func (Keeper) GetRecognizedEventInfo ¶
func (k Keeper) GetRecognizedEventInfo( ctx sdk.Context, ) (recognizedEventInfo types.BridgeEventInfo)
GetRecognizedEventInfo returns `RecognizedEventInfo` from `BridgeEventManager`. This has the next event id that has not yet been recognized by this node’s daemon. This also has the height of the highest Ethereum block from which a bridge event was recognized. These values are not in-consensus.
func (Keeper) GetSafetyParams ¶
func (k Keeper) GetSafetyParams( ctx sdk.Context, ) ( params types.SafetyParams, )
GetSafetyParams returns the SafetyParams in state.
func (Keeper) HasAuthority ¶
HasAuthority returns whether `authority` exists in `k.authorities`.
func (Keeper) InitializeForGenesis ¶
func (Keeper) ProposeParams ¶
func (k Keeper) ProposeParams( c context.Context, req *types.QueryProposeParamsRequest, ) ( *types.QueryProposeParamsResponse, error, )
ProposeParams processes a query request/response for the ProposeParams from state.
func (Keeper) RecognizedEventInfo ¶
func (k Keeper) RecognizedEventInfo( c context.Context, req *types.QueryRecognizedEventInfoRequest, ) ( *types.QueryRecognizedEventInfoResponse, error, )
RecognizedEventInfo processes a query request/response for the following that has a greater `NextId`: - the `AcknowledgedEventInfo` from state - the `RecognizedEventInfo` from memory Since RecognizedEventInfo is from memory, the value is not deterministic based on state and therefore may be different between nodes.
func (Keeper) SafetyParams ¶
func (k Keeper) SafetyParams( c context.Context, req *types.QuerySafetyParamsRequest, ) ( *types.QuerySafetyParamsResponse, error, )
SafetyParams processes a query request/response for the SafetyParams from state.
func (Keeper) SetAcknowledgedEventInfo ¶
func (k Keeper) SetAcknowledgedEventInfo( ctx sdk.Context, acknowledgedEventInfo types.BridgeEventInfo, ) error
SetAcknowledgedEventInfo sets `AcknowledgedEventInfo` in state.
func (Keeper) UpdateEventParams ¶
UpdateEventParams updates the EventParams in state. Returns an error iff validation fails.
func (Keeper) UpdateProposeParams ¶
UpdateProposeParams updates the ProposeParams in state. Returns an error iff validation fails.
func (Keeper) UpdateSafetyParams ¶
UpdateSafetyParams updates the SafetyParams in state. Returns an error iff validation fails.