Skip to content

Commit

Permalink
making devnet from release
Browse files Browse the repository at this point in the history
  • Loading branch information
dzmitry-lahoda authored and kkast committed Apr 1, 2024
1 parent 4e51b63 commit 9778716
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
11 changes: 6 additions & 5 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ import (

const (
AccountAddressPrefix = "composable"
authorityAddress = "centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m" // convert from: centauri10556m38z4x6pqalr9rl5ytf3cff8q46nk85k9m
)

type AppKeepers struct {
Expand Down Expand Up @@ -268,7 +267,9 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
appCodec, appKeepers.keys[ibchost.StoreKey], appKeepers.GetSubspace(ibchost.ModuleName), appKeepers.StakingKeeper, appKeepers.UpgradeKeeper, appKeepers.ScopedIBCKeeper,
)

appKeepers.Wasm08Keeper = wasm08Keeper.NewKeeper(appCodec, appKeepers.keys[wasm08types.StoreKey], authorityAddress, homePath, &appKeepers.IBCKeeper.ClientKeeper)
govModuleAuthority := authtypes.NewModuleAddress(govtypes.ModuleName).String()

appKeepers.Wasm08Keeper = wasm08Keeper.NewKeeper(appCodec, appKeepers.keys[wasm08types.StoreKey], govModuleAuthority, homePath, &appKeepers.IBCKeeper.ClientKeeper)

// ICA Host keeper
appKeepers.ICAHostKeeper = icahostkeeper.NewKeeper(
Expand Down Expand Up @@ -306,13 +307,13 @@ func (appKeepers *AppKeepers) InitNormalKeepers(
&appKeepers.RatelimitKeeper,
&appKeepers.TransferKeeper.Keeper,
appKeepers.BankKeeper,
authorityAddress,
govModuleAuthority,
)

appKeepers.TxBoundaryKeepper = txBoundaryKeeper.NewKeeper(
appCodec,
appKeepers.keys[txBoundaryTypes.StoreKey],
authorityAddress,
govModuleAuthority,
)

appKeepers.TransferKeeper = customibctransferkeeper.NewKeeper(
Expand Down Expand Up @@ -434,7 +435,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers(

govKeeper := *govkeeper.NewKeeper(
appCodec, appKeepers.keys[govtypes.StoreKey], appKeepers.AccountKeeper, appKeepers.BankKeeper,
appKeepers.StakingKeeper, bApp.MsgServiceRouter(), govtypes.DefaultConfig(), authtypes.NewModuleAddress(govtypes.ModuleName).String(),
appKeepers.StakingKeeper, bApp.MsgServiceRouter(), govtypes.DefaultConfig(), govModuleAuthority,
)

govKeeper.SetLegacyRouter(govRouter)
Expand Down
11 changes: 10 additions & 1 deletion x/transfermiddleware/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,16 @@ func (keeper Keeper) HasAllowRlyAddress(ctx sdk.Context, rlyAddress string) bool
store := ctx.KVStore(keeper.storeKey)
key := types.GetKeyByRlyAddress(rlyAddress)

return store.Has(key)
if store.Has(key) {
return true
}

prefixStore := prefix.NewStore(store, types.KeyRlyAddress)
iter := prefixStore.Iterator(nil, nil)
defer iter.Close()

// there are not records => so it is permissionless
return !iter.Valid()
}

func (keeper Keeper) IterateAllowRlyAddress(ctx sdk.Context, cb func(rlyAddress string) (stop bool)) {
Expand Down
2 changes: 1 addition & 1 deletion x/transfermiddleware/types/parachain_token_info.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9778716

Please sign in to comment.