mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 00:05:18 +00:00
standardise pricefeed NewKeeper
This commit is contained in:
parent
fc2b7f9652
commit
e83127a15e
@ -75,7 +75,7 @@ func setupTestKeepers() (sdk.Context, keepers) {
|
||||
bank.DefaultCodespace,
|
||||
blacklistedAddrs,
|
||||
)
|
||||
pricefeedKeeper := pricefeed.NewKeeper(keyPriceFeed, cdc, paramsKeeper.Subspace(pricefeed.DefaultParamspace).WithKeyTable(pricefeed.ParamKeyTable()), pricefeed.DefaultCodespace)
|
||||
pricefeedKeeper := pricefeed.NewKeeper(cdc, keyPriceFeed, paramsKeeper.Subspace(pricefeed.DefaultParamspace).WithKeyTable(pricefeed.ParamKeyTable()), pricefeed.DefaultCodespace)
|
||||
cdpKeeper := cdp.NewKeeper(
|
||||
cdc,
|
||||
keyCDP,
|
||||
|
@ -44,7 +44,7 @@ type Keeper struct {
|
||||
// - adding oracles
|
||||
// - adding/removing assets from the pricefeed
|
||||
func NewKeeper(
|
||||
storeKey sdk.StoreKey, cdc *codec.Codec, paramSpace ParamSubspace, codespace sdk.CodespaceType,
|
||||
cdc *codec.Codec, storeKey sdk.StoreKey, paramSpace ParamSubspace, codespace sdk.CodespaceType,
|
||||
) Keeper {
|
||||
return Keeper{
|
||||
paramSpace: paramSpace,
|
||||
|
@ -24,7 +24,7 @@ func getMockApp(t *testing.T, numGenAccs int, genState GenesisState, genAccs []a
|
||||
RegisterCodec(mApp.Cdc)
|
||||
keyPricefeed := sdk.NewKVStoreKey(StoreKey)
|
||||
pk := mApp.ParamsKeeper
|
||||
keeper := NewKeeper(keyPricefeed, mApp.Cdc, pk.Subspace(DefaultParamspace).WithKeyTable(ParamKeyTable()), DefaultCodespace)
|
||||
keeper := NewKeeper(mApp.Cdc, keyPricefeed, pk.Subspace(DefaultParamspace).WithKeyTable(ParamKeyTable()), DefaultCodespace)
|
||||
|
||||
// Register routes
|
||||
mApp.Router().AddRoute(RouterKey, NewHandler(keeper))
|
||||
|
Loading…
Reference in New Issue
Block a user