mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-11-10 18:15:19 +00:00
24 lines
535 B
Go
24 lines
535 B
Go
package keeper
|
|
|
|
import (
|
|
"github.com/0glabs/0g-chain/x/cdp/types"
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
)
|
|
|
|
// Implements StakingHooks interface
|
|
var _ types.CDPHooks = Keeper{}
|
|
|
|
// AfterCDPCreated - call hook if registered
|
|
func (k Keeper) AfterCDPCreated(ctx sdk.Context, cdp types.CDP) {
|
|
if k.hooks != nil {
|
|
k.hooks.AfterCDPCreated(ctx, cdp)
|
|
}
|
|
}
|
|
|
|
// BeforeCDPModified - call hook if registered
|
|
func (k Keeper) BeforeCDPModified(ctx sdk.Context, cdp types.CDP) {
|
|
if k.hooks != nil {
|
|
k.hooks.BeforeCDPModified(ctx, cdp)
|
|
}
|
|
}
|