Skip to content

Commit

Permalink
add allowed ibc client
Browse files Browse the repository at this point in the history
  • Loading branch information
ASoTNetworks committed Mar 2, 2024
1 parent 7800dbb commit d30ff97
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions cosmos_genesis_tinker.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,23 @@ def create_coin(self, denom: str, amount: str = '0'):
key=lambda x: x['denom'])
return self

def add_allowed_ibc_client(self, allowed_ibc_client: str):
"""
Add allowed IBC client
"""

self.log_step("Adding new allowed IBC client " + allowed_ibc_client)

clients = self.app_state["ibc"]["client_genesis"]["params"]["allowed_clients"]

for client in clients:
if client == allowed_ibc_client:
# Already exists, so we don't need to add it
return self

bisect.insort_right(clients, allowed_ibc_client, key=lambda x: x)
return self

def increase_supply(self, increase: int, denom="uatom"):
"""
Increase the total supply of coins of a given denomination
Expand Down
3 changes: 2 additions & 1 deletion example_rs_testnet_genesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,6 @@
value='0.000000000000000001')
gentink.add_task(gentink.set_voting_period,
voting_period='60s')

gentink.add_task(gentink.add_allowed_ibc_client,
allowed_ibc_client='09-localhost')
gentink.run_tasks()

0 comments on commit d30ff97

Please sign in to comment.