Skip to content

Commit

Permalink
register_counterparty_payee
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Oct 14, 2024
1 parent e9c0b66 commit 9c31374
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pystarport/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,13 @@ def ica_generate_packet_data(self, tx, memo=None, encoding="proto3", i=0, **kwar
def ibc_upgrade_channels(self, version, from_addr, i=0, **kwargs):
return self.cosmos_cli(i).ibc_upgrade_channels(version, from_addr, **kwargs)

def register_counterparty_payee(
self, port_id, channel_id, relayer, counterparty_payee, i=0, **kwargs
):
return self.cosmos_cli(i).register_counterparty_payee(
port_id, channel_id, relayer, counterparty_payee, **kwargs
)


def start_cluster(data_dir):
cmd = [
Expand Down
21 changes: 21 additions & 0 deletions pystarport/cosmoscli.py
Original file line number Diff line number Diff line change
Expand Up @@ -1393,3 +1393,24 @@ def ibc_upgrade_channels(self, version, from_addr, **kwargs):
**kwargs,
)
)

def register_counterparty_payee(
self, port_id, channel_id, relayer, counterparty_payee, **kwargs
):
rsp = json.loads(
self.raw(
"tx",
"ibc-fee",
"register-counterparty-payee",
port_id,
channel_id,
relayer,
counterparty_payee,
"-y",
home=self.data_dir,
**kwargs,
)
)
if rsp["code"] == 0:
rsp = self.event_query_tx_for(rsp["txhash"])
return rsp

0 comments on commit 9c31374

Please sign in to comment.