diff --git a/pystarport/cluster.py b/pystarport/cluster.py index db46998..5acfc05 100644 --- a/pystarport/cluster.py +++ b/pystarport/cluster.py @@ -826,6 +826,11 @@ def register_counterparty_payee( port_id, channel_id, relayer, counterparty_payee, **kwargs ) + def pay_packet_fee(self, port_id, channel_id, packet_seq, i=0, **kwargs): + return self.cosmos_cli(i).pay_packet_fee( + port_id, channel_id, packet_seq, **kwargs + ) + def start_cluster(data_dir): cmd = [ diff --git a/pystarport/cosmoscli.py b/pystarport/cosmoscli.py index d9da5e3..b8b9991 100644 --- a/pystarport/cosmoscli.py +++ b/pystarport/cosmoscli.py @@ -1393,7 +1393,7 @@ def ibc_upgrade_channels(self, version, from_addr, **kwargs): **kwargs, ) ) - + def register_counterparty_payee( self, port_id, channel_id, relayer, counterparty_payee, **kwargs ): @@ -1414,3 +1414,21 @@ def register_counterparty_payee( if rsp["code"] == 0: rsp = self.event_query_tx_for(rsp["txhash"]) return rsp + + def pay_packet_fee(self, port_id, channel_id, packet_seq, **kwargs): + rsp = json.loads( + self.raw( + "tx", + "ibc-fee", + "pay-packet-fee", + port_id, + channel_id, + str(packet_seq), + "-y", + home=self.data_dir, + **kwargs, + ) + ) + if rsp["code"] == 0: + rsp = self.event_query_tx_for(rsp["txhash"]) + return rsp