forked from cerc-io/laconicd
Prathamesh Musale
c79b7bea7d
- Implement auction and bond module hooks in registry module - Code cleanup Reviewed-on: deep-stack/laconic2d#9 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
22 lines
769 B
Go
22 lines
769 B
Go
package auction
|
|
|
|
import (
|
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
)
|
|
|
|
// AuctionUsageKeeper keep track of auction usage in other modules.
|
|
// Used to, for example, prevent deletion of a auction that's in use.
|
|
type AuctionUsageKeeper interface {
|
|
ModuleName() string
|
|
UsesAuction(ctx sdk.Context, auctionId string) bool
|
|
|
|
OnAuctionWinnerSelected(ctx sdk.Context, auctionId string)
|
|
}
|
|
|
|
// AuctionHooksWrapper is a wrapper for modules to inject AuctionUsageKeeper using depinject.
|
|
// Reference: https://github.com/cosmos/cosmos-sdk/tree/v0.50.3/core/appmodule#resolving-circular-dependencies
|
|
type AuctionHooksWrapper struct{ AuctionUsageKeeper }
|
|
|
|
// IsOnePerModuleType implements the depinject.OnePerModuleType interface.
|
|
func (AuctionHooksWrapper) IsOnePerModuleType() {}
|