mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-27 16:55:21 +00:00
24 lines
534 B
Go
24 lines
534 B
Go
|
package keeper
|
||
|
|
||
|
import (
|
||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||
|
"github.com/kava-labs/kava/x/cdp/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)
|
||
|
}
|
||
|
}
|