From f67ea48eba5c8967e21622f4a2b0ae4aae621b88 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Wed, 23 Oct 2024 16:26:04 +0800 Subject: [PATCH] Problem: no packet info for indexed field in ibc relayer event --- CHANGELOG.md | 1 + integration_tests/test_ibc_rly.py | 12 +- .../cosmos/lib/cosmos_types.abigen.go | 2 +- .../relayer/i_relayer_module.abigen.go | 272 ++++++++---------- x/cronos/events/bindings/src/Relayer.sol | 26 +- x/cronos/events/events.go | 36 +-- 6 files changed, 167 insertions(+), 182 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ecb6b2c69..17b60bec6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ * (testground)[#1650](https://github.com/crypto-org-chain/cronos/pull/1650) Benchmark support batch mode. * [#1658](https://github.com/crypto-org-chain/cronos/pull/1658) Optimize when block-list is empty. * (testground)[#1659](https://github.com/crypto-org-chain/cronos/pull/1659) Support skip check-tx in benchmark. +* [#1662](https://github.com/crypto-org-chain/cronos/pull/1662) Emit more packet info for ibc relayer event. *Oct 14, 2024* diff --git a/integration_tests/test_ibc_rly.py b/integration_tests/test_ibc_rly.py index 22f69a7f2f..05b989edf7 100644 --- a/integration_tests/test_ibc_rly.py +++ b/integration_tests/test_ibc_rly.py @@ -123,9 +123,11 @@ def burn(burner, amt, denom): def recv_packet(seq, src, dst, amt, denom): return { - "packetSequence": keccak(text=f"{seq}"), + "packetSequence": f"{seq}", "packetSrcPort": keccak(text="transfer"), "packetSrcChannel": keccak(text=channel), + "packetSrcPortInfo": "transfer", + "packetSrcChannelInfo": channel, "packetDstPort": "transfer", "packetDstChannel": channel, "connectionId": "connection-0", @@ -141,9 +143,11 @@ def recv_packet(seq, src, dst, amt, denom): def acknowledge_packet(seq): return { - "packetSequence": keccak(text=f"{seq}"), + "packetSequence": f"{seq}", "packetSrcPort": keccak(text="transfer"), "packetSrcChannel": keccak(text=channel), + "packetSrcPortInfo": "transfer", + "packetSrcChannelInfo": channel, "packetDstPort": "transfer", "packetDstChannel": channel, "connectionId": "connection-0", @@ -158,9 +162,11 @@ def denom_trace(denom): def write_ack(seq, src, dst, amt, denom): return { - "packetSequence": keccak(text=f"{seq}"), + "packetSequence": f"{seq}", "packetSrcPort": keccak(text="transfer"), "packetSrcChannel": keccak(text=channel), + "packetSrcPortInfo": "transfer", + "packetSrcChannelInfo": channel, "packetDstPort": "transfer", "packetDstChannel": channel, "connectionId": "connection-0", diff --git a/x/cronos/events/bindings/cosmos/lib/cosmos_types.abigen.go b/x/cronos/events/bindings/cosmos/lib/cosmos_types.abigen.go index 0b0eb258b2..304f26b995 100644 --- a/x/cronos/events/bindings/cosmos/lib/cosmos_types.abigen.go +++ b/x/cronos/events/bindings/cosmos/lib/cosmos_types.abigen.go @@ -38,7 +38,7 @@ type CosmosCoin struct { // CosmosTypesMetaData contains all meta data concerning the CosmosTypes contract. var CosmosTypesMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin\",\"name\":\"\",\"type\":\"tuple\"}],\"name\":\"coin\",\"outputs\":[],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x6080604052348015600e575f80fd5b5060e18061001b5f395ff3fe6080604052348015600e575f80fd5b50600436106026575f3560e01c80632ff6e5df14602a575b5f80fd5b60406004803603810190603c9190606c565b6042565b005b50565b5f80fd5b5f80fd5b5f80fd5b5f604082840312156063576062604d565b5b81905092915050565b5f60208284031215607e57607d6045565b5b5f82013567ffffffffffffffff81111560985760976049565b5b60a2848285016051565b9150509291505056fea2646970667358221220bac9b65959ae17887e88bcc0a8ff4be462de92f2e9dfdefe0f6a41149c0a579364736f6c63430008190033", + Bin: "0x6080604052348015600e575f5ffd5b5060e180601a5f395ff3fe6080604052348015600e575f5ffd5b50600436106026575f3560e01c80632ff6e5df14602a575b5f5ffd5b60406004803603810190603c9190606c565b6042565b005b50565b5f5ffd5b5f5ffd5b5f5ffd5b5f604082840312156063576062604d565b5b81905092915050565b5f60208284031215607e57607d6045565b5b5f82013567ffffffffffffffff81111560985760976049565b5b60a2848285016051565b9150509291505056fea2646970667358221220fb8f86497a828357d6e34a8d75c7592228fa905dc6c5a990ba5d6207c680af7964736f6c634300081c0033", } // CosmosTypesABI is the input ABI used to generate the binding from. diff --git a/x/cronos/events/bindings/cosmos/precompile/relayer/i_relayer_module.abigen.go b/x/cronos/events/bindings/cosmos/precompile/relayer/i_relayer_module.abigen.go index 8ef467e8bd..4b9a11a714 100644 --- a/x/cronos/events/bindings/cosmos/precompile/relayer/i_relayer_module.abigen.go +++ b/x/cronos/events/bindings/cosmos/precompile/relayer/i_relayer_module.abigen.go @@ -44,7 +44,7 @@ type IRelayerModulePacketData struct { // RelayerModuleMetaData contains all meta data concerning the RelayerModule contract. var RelayerModuleMetaData = &bind.MetaData{ - ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSequence\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"AcknowledgePacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"burner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"ChannelClosed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"CoinReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"CoinSpent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Coinbase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"name\":\"DenominationTrace\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"fee\",\"type\":\"string\"}],\"name\":\"DistributeFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FungibleTokenPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"IbcTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSequence\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"sender\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structIRelayerModule.PacketData\",\"name\":\"packetDataHex\",\"type\":\"tuple\"}],\"name\":\"RecvPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"refundReceiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"refundDenom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Timeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSequence\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"TimeoutPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSequence\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"sender\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structIRelayerModule.PacketData\",\"name\":\"packetDataHex\",\"type\":\"tuple\"}],\"name\":\"WriteAcknowledgement\",\"type\":\"event\"}]", + ABI: "[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"packetSequence\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetSrcPortInfo\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetSrcChannelInfo\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"AcknowledgePacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"burner\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Burn\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"ChannelClosed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"CoinReceived\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"CoinSpent\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"minter\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Coinbase\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"name\":\"DenominationTrace\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"fee\",\"type\":\"string\"}],\"name\":\"DistributeFee\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"FungibleTokenPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"IbcTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"packetSequence\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetSrcPortInfo\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetSrcChannelInfo\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"sender\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structIRelayerModule.PacketData\",\"name\":\"packetDataHex\",\"type\":\"tuple\"}],\"name\":\"RecvPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"refundReceiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"refundDenom\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Timeout\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"packetSequence\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetSrcPortInfo\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetSrcChannelInfo\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"}],\"name\":\"TimeoutPacket\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"indexed\":false,\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"packetSequence\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcPort\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"string\",\"name\":\"packetSrcChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetSrcPortInfo\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetSrcChannelInfo\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstPort\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"packetDstChannel\",\"type\":\"string\"},{\"indexed\":false,\"internalType\":\"string\",\"name\":\"connectionId\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"sender\",\"type\":\"string\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"string\",\"name\":\"denom\",\"type\":\"string\"}],\"internalType\":\"structCosmos.Coin[]\",\"name\":\"amount\",\"type\":\"tuple[]\"}],\"indexed\":false,\"internalType\":\"structIRelayerModule.PacketData\",\"name\":\"packetDataHex\",\"type\":\"tuple\"}],\"name\":\"WriteAcknowledgement\",\"type\":\"event\"}]", } // RelayerModuleABI is the input ABI used to generate the binding from. @@ -262,19 +262,21 @@ func (it *RelayerModuleAcknowledgePacketIterator) Close() error { // RelayerModuleAcknowledgePacket represents a AcknowledgePacket event raised by the RelayerModule contract. type RelayerModuleAcknowledgePacket struct { - PacketSequence common.Hash - PacketSrcPort common.Hash - PacketSrcChannel common.Hash - PacketDstPort string - PacketDstChannel string - ConnectionId string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterAcknowledgePacket is a free log retrieval operation binding the contract event 0xc7b594c06c08a3e531587ce7aea85dd2d77aa812e153185114587f284481ee2d. + PacketSequence *big.Int + PacketSrcPort common.Hash + PacketSrcChannel common.Hash + PacketSrcPortInfo string + PacketSrcChannelInfo string + PacketDstPort string + PacketDstChannel string + ConnectionId string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterAcknowledgePacket is a free log retrieval operation binding the contract event 0xa08a233528433f6c16f21b1264864dbb65aa78a26e16504065cd2a8d66fe40c3. // -// Solidity: event AcknowledgePacket(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId) -func (_RelayerModule *RelayerModuleFilterer) FilterAcknowledgePacket(opts *bind.FilterOpts, packetSequence []string, packetSrcPort []string, packetSrcChannel []string) (*RelayerModuleAcknowledgePacketIterator, error) { +// Solidity: event AcknowledgePacket(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId) +func (_RelayerModule *RelayerModuleFilterer) FilterAcknowledgePacket(opts *bind.FilterOpts, packetSequence []*big.Int, packetSrcPort []string, packetSrcChannel []string) (*RelayerModuleAcknowledgePacketIterator, error) { var packetSequenceRule []interface{} for _, packetSequenceItem := range packetSequence { @@ -296,10 +298,10 @@ func (_RelayerModule *RelayerModuleFilterer) FilterAcknowledgePacket(opts *bind. return &RelayerModuleAcknowledgePacketIterator{contract: _RelayerModule.contract, event: "AcknowledgePacket", logs: logs, sub: sub}, nil } -// WatchAcknowledgePacket is a free log subscription operation binding the contract event 0xc7b594c06c08a3e531587ce7aea85dd2d77aa812e153185114587f284481ee2d. +// WatchAcknowledgePacket is a free log subscription operation binding the contract event 0xa08a233528433f6c16f21b1264864dbb65aa78a26e16504065cd2a8d66fe40c3. // -// Solidity: event AcknowledgePacket(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId) -func (_RelayerModule *RelayerModuleFilterer) WatchAcknowledgePacket(opts *bind.WatchOpts, sink chan<- *RelayerModuleAcknowledgePacket, packetSequence []string, packetSrcPort []string, packetSrcChannel []string) (event.Subscription, error) { +// Solidity: event AcknowledgePacket(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId) +func (_RelayerModule *RelayerModuleFilterer) WatchAcknowledgePacket(opts *bind.WatchOpts, sink chan<- *RelayerModuleAcknowledgePacket, packetSequence []*big.Int, packetSrcPort []string, packetSrcChannel []string) (event.Subscription, error) { var packetSequenceRule []interface{} for _, packetSequenceItem := range packetSequence { @@ -346,9 +348,9 @@ func (_RelayerModule *RelayerModuleFilterer) WatchAcknowledgePacket(opts *bind.W }), nil } -// ParseAcknowledgePacket is a log parse operation binding the contract event 0xc7b594c06c08a3e531587ce7aea85dd2d77aa812e153185114587f284481ee2d. +// ParseAcknowledgePacket is a log parse operation binding the contract event 0xa08a233528433f6c16f21b1264864dbb65aa78a26e16504065cd2a8d66fe40c3. // -// Solidity: event AcknowledgePacket(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId) +// Solidity: event AcknowledgePacket(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId) func (_RelayerModule *RelayerModuleFilterer) ParseAcknowledgePacket(log types.Log) (*RelayerModuleAcknowledgePacket, error) { event := new(RelayerModuleAcknowledgePacket) if err := _RelayerModule.contract.UnpackLog(event, "AcknowledgePacket", log); err != nil { @@ -1140,21 +1142,16 @@ func (it *RelayerModuleDenominationTraceIterator) Close() error { // RelayerModuleDenominationTrace represents a DenominationTrace event raised by the RelayerModule contract. type RelayerModuleDenominationTrace struct { - Denom common.Hash + Denom string Raw types.Log // Blockchain specific contextual infos } // FilterDenominationTrace is a free log retrieval operation binding the contract event 0x483180a024351f3ea4c4782eaadb34add715974648a3d47bbff4a7b76da20859. // -// Solidity: event DenominationTrace(string indexed denom) -func (_RelayerModule *RelayerModuleFilterer) FilterDenominationTrace(opts *bind.FilterOpts, denom []string) (*RelayerModuleDenominationTraceIterator, error) { +// Solidity: event DenominationTrace(string denom) +func (_RelayerModule *RelayerModuleFilterer) FilterDenominationTrace(opts *bind.FilterOpts) (*RelayerModuleDenominationTraceIterator, error) { - var denomRule []interface{} - for _, denomItem := range denom { - denomRule = append(denomRule, denomItem) - } - - logs, sub, err := _RelayerModule.contract.FilterLogs(opts, "DenominationTrace", denomRule) + logs, sub, err := _RelayerModule.contract.FilterLogs(opts, "DenominationTrace") if err != nil { return nil, err } @@ -1163,15 +1160,10 @@ func (_RelayerModule *RelayerModuleFilterer) FilterDenominationTrace(opts *bind. // WatchDenominationTrace is a free log subscription operation binding the contract event 0x483180a024351f3ea4c4782eaadb34add715974648a3d47bbff4a7b76da20859. // -// Solidity: event DenominationTrace(string indexed denom) -func (_RelayerModule *RelayerModuleFilterer) WatchDenominationTrace(opts *bind.WatchOpts, sink chan<- *RelayerModuleDenominationTrace, denom []string) (event.Subscription, error) { - - var denomRule []interface{} - for _, denomItem := range denom { - denomRule = append(denomRule, denomItem) - } +// Solidity: event DenominationTrace(string denom) +func (_RelayerModule *RelayerModuleFilterer) WatchDenominationTrace(opts *bind.WatchOpts, sink chan<- *RelayerModuleDenominationTrace) (event.Subscription, error) { - logs, sub, err := _RelayerModule.contract.WatchLogs(opts, "DenominationTrace", denomRule) + logs, sub, err := _RelayerModule.contract.WatchLogs(opts, "DenominationTrace") if err != nil { return nil, err } @@ -1205,7 +1197,7 @@ func (_RelayerModule *RelayerModuleFilterer) WatchDenominationTrace(opts *bind.W // ParseDenominationTrace is a log parse operation binding the contract event 0x483180a024351f3ea4c4782eaadb34add715974648a3d47bbff4a7b76da20859. // -// Solidity: event DenominationTrace(string indexed denom) +// Solidity: event DenominationTrace(string denom) func (_RelayerModule *RelayerModuleFilterer) ParseDenominationTrace(log types.Log) (*RelayerModuleDenominationTrace, error) { event := new(RelayerModuleDenominationTrace) if err := _RelayerModule.contract.UnpackLog(event, "DenominationTrace", log); err != nil { @@ -1285,25 +1277,21 @@ func (it *RelayerModuleDistributeFeeIterator) Close() error { // RelayerModuleDistributeFee represents a DistributeFee event raised by the RelayerModule contract. type RelayerModuleDistributeFee struct { Receiver common.Address - Fee common.Hash + Fee string Raw types.Log // Blockchain specific contextual infos } // FilterDistributeFee is a free log retrieval operation binding the contract event 0x67e2bceb7881996b4bbddf9ab5d5c9bceb0ace3a06538b5e40be96094c4c9a72. // -// Solidity: event DistributeFee(address indexed receiver, string indexed fee) -func (_RelayerModule *RelayerModuleFilterer) FilterDistributeFee(opts *bind.FilterOpts, receiver []common.Address, fee []string) (*RelayerModuleDistributeFeeIterator, error) { +// Solidity: event DistributeFee(address indexed receiver, string fee) +func (_RelayerModule *RelayerModuleFilterer) FilterDistributeFee(opts *bind.FilterOpts, receiver []common.Address) (*RelayerModuleDistributeFeeIterator, error) { var receiverRule []interface{} for _, receiverItem := range receiver { receiverRule = append(receiverRule, receiverItem) } - var feeRule []interface{} - for _, feeItem := range fee { - feeRule = append(feeRule, feeItem) - } - logs, sub, err := _RelayerModule.contract.FilterLogs(opts, "DistributeFee", receiverRule, feeRule) + logs, sub, err := _RelayerModule.contract.FilterLogs(opts, "DistributeFee", receiverRule) if err != nil { return nil, err } @@ -1312,19 +1300,15 @@ func (_RelayerModule *RelayerModuleFilterer) FilterDistributeFee(opts *bind.Filt // WatchDistributeFee is a free log subscription operation binding the contract event 0x67e2bceb7881996b4bbddf9ab5d5c9bceb0ace3a06538b5e40be96094c4c9a72. // -// Solidity: event DistributeFee(address indexed receiver, string indexed fee) -func (_RelayerModule *RelayerModuleFilterer) WatchDistributeFee(opts *bind.WatchOpts, sink chan<- *RelayerModuleDistributeFee, receiver []common.Address, fee []string) (event.Subscription, error) { +// Solidity: event DistributeFee(address indexed receiver, string fee) +func (_RelayerModule *RelayerModuleFilterer) WatchDistributeFee(opts *bind.WatchOpts, sink chan<- *RelayerModuleDistributeFee, receiver []common.Address) (event.Subscription, error) { var receiverRule []interface{} for _, receiverItem := range receiver { receiverRule = append(receiverRule, receiverItem) } - var feeRule []interface{} - for _, feeItem := range fee { - feeRule = append(feeRule, feeItem) - } - logs, sub, err := _RelayerModule.contract.WatchLogs(opts, "DistributeFee", receiverRule, feeRule) + logs, sub, err := _RelayerModule.contract.WatchLogs(opts, "DistributeFee", receiverRule) if err != nil { return nil, err } @@ -1358,7 +1342,7 @@ func (_RelayerModule *RelayerModuleFilterer) WatchDistributeFee(opts *bind.Watch // ParseDistributeFee is a log parse operation binding the contract event 0x67e2bceb7881996b4bbddf9ab5d5c9bceb0ace3a06538b5e40be96094c4c9a72. // -// Solidity: event DistributeFee(address indexed receiver, string indexed fee) +// Solidity: event DistributeFee(address indexed receiver, string fee) func (_RelayerModule *RelayerModuleFilterer) ParseDistributeFee(log types.Log) (*RelayerModuleDistributeFee, error) { event := new(RelayerModuleDistributeFee) if err := _RelayerModule.contract.UnpackLog(event, "DistributeFee", log); err != nil { @@ -1439,15 +1423,15 @@ func (it *RelayerModuleFungibleTokenPacketIterator) Close() error { type RelayerModuleFungibleTokenPacket struct { Receiver common.Address Sender common.Address - Denom common.Hash + Denom string Amount *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterFungibleTokenPacket is a free log retrieval operation binding the contract event 0xe0fdee6007dd2fb6acfd338163a4260f0abf107fc184f28b75c5b2c1be55f573. // -// Solidity: event FungibleTokenPacket(address indexed receiver, address indexed sender, string indexed denom, uint256 amount) -func (_RelayerModule *RelayerModuleFilterer) FilterFungibleTokenPacket(opts *bind.FilterOpts, receiver []common.Address, sender []common.Address, denom []string) (*RelayerModuleFungibleTokenPacketIterator, error) { +// Solidity: event FungibleTokenPacket(address indexed receiver, address indexed sender, string denom, uint256 amount) +func (_RelayerModule *RelayerModuleFilterer) FilterFungibleTokenPacket(opts *bind.FilterOpts, receiver []common.Address, sender []common.Address) (*RelayerModuleFungibleTokenPacketIterator, error) { var receiverRule []interface{} for _, receiverItem := range receiver { @@ -1457,12 +1441,8 @@ func (_RelayerModule *RelayerModuleFilterer) FilterFungibleTokenPacket(opts *bin for _, senderItem := range sender { senderRule = append(senderRule, senderItem) } - var denomRule []interface{} - for _, denomItem := range denom { - denomRule = append(denomRule, denomItem) - } - logs, sub, err := _RelayerModule.contract.FilterLogs(opts, "FungibleTokenPacket", receiverRule, senderRule, denomRule) + logs, sub, err := _RelayerModule.contract.FilterLogs(opts, "FungibleTokenPacket", receiverRule, senderRule) if err != nil { return nil, err } @@ -1471,8 +1451,8 @@ func (_RelayerModule *RelayerModuleFilterer) FilterFungibleTokenPacket(opts *bin // WatchFungibleTokenPacket is a free log subscription operation binding the contract event 0xe0fdee6007dd2fb6acfd338163a4260f0abf107fc184f28b75c5b2c1be55f573. // -// Solidity: event FungibleTokenPacket(address indexed receiver, address indexed sender, string indexed denom, uint256 amount) -func (_RelayerModule *RelayerModuleFilterer) WatchFungibleTokenPacket(opts *bind.WatchOpts, sink chan<- *RelayerModuleFungibleTokenPacket, receiver []common.Address, sender []common.Address, denom []string) (event.Subscription, error) { +// Solidity: event FungibleTokenPacket(address indexed receiver, address indexed sender, string denom, uint256 amount) +func (_RelayerModule *RelayerModuleFilterer) WatchFungibleTokenPacket(opts *bind.WatchOpts, sink chan<- *RelayerModuleFungibleTokenPacket, receiver []common.Address, sender []common.Address) (event.Subscription, error) { var receiverRule []interface{} for _, receiverItem := range receiver { @@ -1482,12 +1462,8 @@ func (_RelayerModule *RelayerModuleFilterer) WatchFungibleTokenPacket(opts *bind for _, senderItem := range sender { senderRule = append(senderRule, senderItem) } - var denomRule []interface{} - for _, denomItem := range denom { - denomRule = append(denomRule, denomItem) - } - logs, sub, err := _RelayerModule.contract.WatchLogs(opts, "FungibleTokenPacket", receiverRule, senderRule, denomRule) + logs, sub, err := _RelayerModule.contract.WatchLogs(opts, "FungibleTokenPacket", receiverRule, senderRule) if err != nil { return nil, err } @@ -1521,7 +1497,7 @@ func (_RelayerModule *RelayerModuleFilterer) WatchFungibleTokenPacket(opts *bind // ParseFungibleTokenPacket is a log parse operation binding the contract event 0xe0fdee6007dd2fb6acfd338163a4260f0abf107fc184f28b75c5b2c1be55f573. // -// Solidity: event FungibleTokenPacket(address indexed receiver, address indexed sender, string indexed denom, uint256 amount) +// Solidity: event FungibleTokenPacket(address indexed receiver, address indexed sender, string denom, uint256 amount) func (_RelayerModule *RelayerModuleFilterer) ParseFungibleTokenPacket(log types.Log) (*RelayerModuleFungibleTokenPacket, error) { event := new(RelayerModuleFungibleTokenPacket) if err := _RelayerModule.contract.UnpackLog(event, "FungibleTokenPacket", log); err != nil { @@ -1602,15 +1578,15 @@ func (it *RelayerModuleIbcTransferIterator) Close() error { type RelayerModuleIbcTransfer struct { Sender common.Address Receiver common.Address - Denom common.Hash + Denom string Amount *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterIbcTransfer is a free log retrieval operation binding the contract event 0x3015d0e0dd0cda983ea101408cb97c173ec3a038ee6f439cc3c7532c52057c0c. // -// Solidity: event IbcTransfer(address indexed sender, address indexed receiver, string indexed denom, uint256 amount) -func (_RelayerModule *RelayerModuleFilterer) FilterIbcTransfer(opts *bind.FilterOpts, sender []common.Address, receiver []common.Address, denom []string) (*RelayerModuleIbcTransferIterator, error) { +// Solidity: event IbcTransfer(address indexed sender, address indexed receiver, string denom, uint256 amount) +func (_RelayerModule *RelayerModuleFilterer) FilterIbcTransfer(opts *bind.FilterOpts, sender []common.Address, receiver []common.Address) (*RelayerModuleIbcTransferIterator, error) { var senderRule []interface{} for _, senderItem := range sender { @@ -1620,12 +1596,8 @@ func (_RelayerModule *RelayerModuleFilterer) FilterIbcTransfer(opts *bind.Filter for _, receiverItem := range receiver { receiverRule = append(receiverRule, receiverItem) } - var denomRule []interface{} - for _, denomItem := range denom { - denomRule = append(denomRule, denomItem) - } - logs, sub, err := _RelayerModule.contract.FilterLogs(opts, "IbcTransfer", senderRule, receiverRule, denomRule) + logs, sub, err := _RelayerModule.contract.FilterLogs(opts, "IbcTransfer", senderRule, receiverRule) if err != nil { return nil, err } @@ -1634,8 +1606,8 @@ func (_RelayerModule *RelayerModuleFilterer) FilterIbcTransfer(opts *bind.Filter // WatchIbcTransfer is a free log subscription operation binding the contract event 0x3015d0e0dd0cda983ea101408cb97c173ec3a038ee6f439cc3c7532c52057c0c. // -// Solidity: event IbcTransfer(address indexed sender, address indexed receiver, string indexed denom, uint256 amount) -func (_RelayerModule *RelayerModuleFilterer) WatchIbcTransfer(opts *bind.WatchOpts, sink chan<- *RelayerModuleIbcTransfer, sender []common.Address, receiver []common.Address, denom []string) (event.Subscription, error) { +// Solidity: event IbcTransfer(address indexed sender, address indexed receiver, string denom, uint256 amount) +func (_RelayerModule *RelayerModuleFilterer) WatchIbcTransfer(opts *bind.WatchOpts, sink chan<- *RelayerModuleIbcTransfer, sender []common.Address, receiver []common.Address) (event.Subscription, error) { var senderRule []interface{} for _, senderItem := range sender { @@ -1645,12 +1617,8 @@ func (_RelayerModule *RelayerModuleFilterer) WatchIbcTransfer(opts *bind.WatchOp for _, receiverItem := range receiver { receiverRule = append(receiverRule, receiverItem) } - var denomRule []interface{} - for _, denomItem := range denom { - denomRule = append(denomRule, denomItem) - } - logs, sub, err := _RelayerModule.contract.WatchLogs(opts, "IbcTransfer", senderRule, receiverRule, denomRule) + logs, sub, err := _RelayerModule.contract.WatchLogs(opts, "IbcTransfer", senderRule, receiverRule) if err != nil { return nil, err } @@ -1684,7 +1652,7 @@ func (_RelayerModule *RelayerModuleFilterer) WatchIbcTransfer(opts *bind.WatchOp // ParseIbcTransfer is a log parse operation binding the contract event 0x3015d0e0dd0cda983ea101408cb97c173ec3a038ee6f439cc3c7532c52057c0c. // -// Solidity: event IbcTransfer(address indexed sender, address indexed receiver, string indexed denom, uint256 amount) +// Solidity: event IbcTransfer(address indexed sender, address indexed receiver, string denom, uint256 amount) func (_RelayerModule *RelayerModuleFilterer) ParseIbcTransfer(log types.Log) (*RelayerModuleIbcTransfer, error) { event := new(RelayerModuleIbcTransfer) if err := _RelayerModule.contract.UnpackLog(event, "IbcTransfer", log); err != nil { @@ -1763,20 +1731,22 @@ func (it *RelayerModuleRecvPacketIterator) Close() error { // RelayerModuleRecvPacket represents a RecvPacket event raised by the RelayerModule contract. type RelayerModuleRecvPacket struct { - PacketSequence common.Hash - PacketSrcPort common.Hash - PacketSrcChannel common.Hash - PacketDstPort string - PacketDstChannel string - ConnectionId string - PacketDataHex IRelayerModulePacketData - Raw types.Log // Blockchain specific contextual infos -} - -// FilterRecvPacket is a free log retrieval operation binding the contract event 0x62684955fa74e6d241dd205edd120a5638726bf554d2eff7ef03bc028bff953f. + PacketSequence *big.Int + PacketSrcPort common.Hash + PacketSrcChannel common.Hash + PacketSrcPortInfo string + PacketSrcChannelInfo string + PacketDstPort string + PacketDstChannel string + ConnectionId string + PacketDataHex IRelayerModulePacketData + Raw types.Log // Blockchain specific contextual infos +} + +// FilterRecvPacket is a free log retrieval operation binding the contract event 0x4657bfadd5a5dfb224fe22b6d305862abb6b9f2b24b800c28d4ed86e477675c9. // -// Solidity: event RecvPacket(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) -func (_RelayerModule *RelayerModuleFilterer) FilterRecvPacket(opts *bind.FilterOpts, packetSequence []string, packetSrcPort []string, packetSrcChannel []string) (*RelayerModuleRecvPacketIterator, error) { +// Solidity: event RecvPacket(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) +func (_RelayerModule *RelayerModuleFilterer) FilterRecvPacket(opts *bind.FilterOpts, packetSequence []*big.Int, packetSrcPort []string, packetSrcChannel []string) (*RelayerModuleRecvPacketIterator, error) { var packetSequenceRule []interface{} for _, packetSequenceItem := range packetSequence { @@ -1798,10 +1768,10 @@ func (_RelayerModule *RelayerModuleFilterer) FilterRecvPacket(opts *bind.FilterO return &RelayerModuleRecvPacketIterator{contract: _RelayerModule.contract, event: "RecvPacket", logs: logs, sub: sub}, nil } -// WatchRecvPacket is a free log subscription operation binding the contract event 0x62684955fa74e6d241dd205edd120a5638726bf554d2eff7ef03bc028bff953f. +// WatchRecvPacket is a free log subscription operation binding the contract event 0x4657bfadd5a5dfb224fe22b6d305862abb6b9f2b24b800c28d4ed86e477675c9. // -// Solidity: event RecvPacket(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) -func (_RelayerModule *RelayerModuleFilterer) WatchRecvPacket(opts *bind.WatchOpts, sink chan<- *RelayerModuleRecvPacket, packetSequence []string, packetSrcPort []string, packetSrcChannel []string) (event.Subscription, error) { +// Solidity: event RecvPacket(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) +func (_RelayerModule *RelayerModuleFilterer) WatchRecvPacket(opts *bind.WatchOpts, sink chan<- *RelayerModuleRecvPacket, packetSequence []*big.Int, packetSrcPort []string, packetSrcChannel []string) (event.Subscription, error) { var packetSequenceRule []interface{} for _, packetSequenceItem := range packetSequence { @@ -1848,9 +1818,9 @@ func (_RelayerModule *RelayerModuleFilterer) WatchRecvPacket(opts *bind.WatchOpt }), nil } -// ParseRecvPacket is a log parse operation binding the contract event 0x62684955fa74e6d241dd205edd120a5638726bf554d2eff7ef03bc028bff953f. +// ParseRecvPacket is a log parse operation binding the contract event 0x4657bfadd5a5dfb224fe22b6d305862abb6b9f2b24b800c28d4ed86e477675c9. // -// Solidity: event RecvPacket(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) +// Solidity: event RecvPacket(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) func (_RelayerModule *RelayerModuleFilterer) ParseRecvPacket(log types.Log) (*RelayerModuleRecvPacket, error) { event := new(RelayerModuleRecvPacket) if err := _RelayerModule.contract.UnpackLog(event, "RecvPacket", log); err != nil { @@ -1930,26 +1900,22 @@ func (it *RelayerModuleTimeoutIterator) Close() error { // RelayerModuleTimeout represents a Timeout event raised by the RelayerModule contract. type RelayerModuleTimeout struct { RefundReceiver common.Address - RefundDenom common.Hash + RefundDenom string Amount *big.Int Raw types.Log // Blockchain specific contextual infos } // FilterTimeout is a free log retrieval operation binding the contract event 0x1d76f8448fb37cb7d524e0c59091293b9c39eea4c53674d9f53f323fee1b971f. // -// Solidity: event Timeout(address indexed refundReceiver, string indexed refundDenom, uint256 amount) -func (_RelayerModule *RelayerModuleFilterer) FilterTimeout(opts *bind.FilterOpts, refundReceiver []common.Address, refundDenom []string) (*RelayerModuleTimeoutIterator, error) { +// Solidity: event Timeout(address indexed refundReceiver, string refundDenom, uint256 amount) +func (_RelayerModule *RelayerModuleFilterer) FilterTimeout(opts *bind.FilterOpts, refundReceiver []common.Address) (*RelayerModuleTimeoutIterator, error) { var refundReceiverRule []interface{} for _, refundReceiverItem := range refundReceiver { refundReceiverRule = append(refundReceiverRule, refundReceiverItem) } - var refundDenomRule []interface{} - for _, refundDenomItem := range refundDenom { - refundDenomRule = append(refundDenomRule, refundDenomItem) - } - logs, sub, err := _RelayerModule.contract.FilterLogs(opts, "Timeout", refundReceiverRule, refundDenomRule) + logs, sub, err := _RelayerModule.contract.FilterLogs(opts, "Timeout", refundReceiverRule) if err != nil { return nil, err } @@ -1958,19 +1924,15 @@ func (_RelayerModule *RelayerModuleFilterer) FilterTimeout(opts *bind.FilterOpts // WatchTimeout is a free log subscription operation binding the contract event 0x1d76f8448fb37cb7d524e0c59091293b9c39eea4c53674d9f53f323fee1b971f. // -// Solidity: event Timeout(address indexed refundReceiver, string indexed refundDenom, uint256 amount) -func (_RelayerModule *RelayerModuleFilterer) WatchTimeout(opts *bind.WatchOpts, sink chan<- *RelayerModuleTimeout, refundReceiver []common.Address, refundDenom []string) (event.Subscription, error) { +// Solidity: event Timeout(address indexed refundReceiver, string refundDenom, uint256 amount) +func (_RelayerModule *RelayerModuleFilterer) WatchTimeout(opts *bind.WatchOpts, sink chan<- *RelayerModuleTimeout, refundReceiver []common.Address) (event.Subscription, error) { var refundReceiverRule []interface{} for _, refundReceiverItem := range refundReceiver { refundReceiverRule = append(refundReceiverRule, refundReceiverItem) } - var refundDenomRule []interface{} - for _, refundDenomItem := range refundDenom { - refundDenomRule = append(refundDenomRule, refundDenomItem) - } - logs, sub, err := _RelayerModule.contract.WatchLogs(opts, "Timeout", refundReceiverRule, refundDenomRule) + logs, sub, err := _RelayerModule.contract.WatchLogs(opts, "Timeout", refundReceiverRule) if err != nil { return nil, err } @@ -2004,7 +1966,7 @@ func (_RelayerModule *RelayerModuleFilterer) WatchTimeout(opts *bind.WatchOpts, // ParseTimeout is a log parse operation binding the contract event 0x1d76f8448fb37cb7d524e0c59091293b9c39eea4c53674d9f53f323fee1b971f. // -// Solidity: event Timeout(address indexed refundReceiver, string indexed refundDenom, uint256 amount) +// Solidity: event Timeout(address indexed refundReceiver, string refundDenom, uint256 amount) func (_RelayerModule *RelayerModuleFilterer) ParseTimeout(log types.Log) (*RelayerModuleTimeout, error) { event := new(RelayerModuleTimeout) if err := _RelayerModule.contract.UnpackLog(event, "Timeout", log); err != nil { @@ -2083,19 +2045,21 @@ func (it *RelayerModuleTimeoutPacketIterator) Close() error { // RelayerModuleTimeoutPacket represents a TimeoutPacket event raised by the RelayerModule contract. type RelayerModuleTimeoutPacket struct { - PacketSequence common.Hash - PacketSrcPort common.Hash - PacketSrcChannel common.Hash - PacketDstPort string - PacketDstChannel string - ConnectionId string - Raw types.Log // Blockchain specific contextual infos -} - -// FilterTimeoutPacket is a free log retrieval operation binding the contract event 0x3ad66d8d917bc0710ec6bcba621370e0cb65d6359ee1341a8cf4320ac458ff5b. + PacketSequence *big.Int + PacketSrcPort common.Hash + PacketSrcChannel common.Hash + PacketSrcPortInfo string + PacketSrcChannelInfo string + PacketDstPort string + PacketDstChannel string + ConnectionId string + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTimeoutPacket is a free log retrieval operation binding the contract event 0x5d98a0d501e3e6d0cd441fe10aa3c19d72cd8cdf6402c6f2ee0e02e0d1cd6621. // -// Solidity: event TimeoutPacket(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId) -func (_RelayerModule *RelayerModuleFilterer) FilterTimeoutPacket(opts *bind.FilterOpts, packetSequence []string, packetSrcPort []string, packetSrcChannel []string) (*RelayerModuleTimeoutPacketIterator, error) { +// Solidity: event TimeoutPacket(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId) +func (_RelayerModule *RelayerModuleFilterer) FilterTimeoutPacket(opts *bind.FilterOpts, packetSequence []*big.Int, packetSrcPort []string, packetSrcChannel []string) (*RelayerModuleTimeoutPacketIterator, error) { var packetSequenceRule []interface{} for _, packetSequenceItem := range packetSequence { @@ -2117,10 +2081,10 @@ func (_RelayerModule *RelayerModuleFilterer) FilterTimeoutPacket(opts *bind.Filt return &RelayerModuleTimeoutPacketIterator{contract: _RelayerModule.contract, event: "TimeoutPacket", logs: logs, sub: sub}, nil } -// WatchTimeoutPacket is a free log subscription operation binding the contract event 0x3ad66d8d917bc0710ec6bcba621370e0cb65d6359ee1341a8cf4320ac458ff5b. +// WatchTimeoutPacket is a free log subscription operation binding the contract event 0x5d98a0d501e3e6d0cd441fe10aa3c19d72cd8cdf6402c6f2ee0e02e0d1cd6621. // -// Solidity: event TimeoutPacket(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId) -func (_RelayerModule *RelayerModuleFilterer) WatchTimeoutPacket(opts *bind.WatchOpts, sink chan<- *RelayerModuleTimeoutPacket, packetSequence []string, packetSrcPort []string, packetSrcChannel []string) (event.Subscription, error) { +// Solidity: event TimeoutPacket(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId) +func (_RelayerModule *RelayerModuleFilterer) WatchTimeoutPacket(opts *bind.WatchOpts, sink chan<- *RelayerModuleTimeoutPacket, packetSequence []*big.Int, packetSrcPort []string, packetSrcChannel []string) (event.Subscription, error) { var packetSequenceRule []interface{} for _, packetSequenceItem := range packetSequence { @@ -2167,9 +2131,9 @@ func (_RelayerModule *RelayerModuleFilterer) WatchTimeoutPacket(opts *bind.Watch }), nil } -// ParseTimeoutPacket is a log parse operation binding the contract event 0x3ad66d8d917bc0710ec6bcba621370e0cb65d6359ee1341a8cf4320ac458ff5b. +// ParseTimeoutPacket is a log parse operation binding the contract event 0x5d98a0d501e3e6d0cd441fe10aa3c19d72cd8cdf6402c6f2ee0e02e0d1cd6621. // -// Solidity: event TimeoutPacket(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId) +// Solidity: event TimeoutPacket(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId) func (_RelayerModule *RelayerModuleFilterer) ParseTimeoutPacket(log types.Log) (*RelayerModuleTimeoutPacket, error) { event := new(RelayerModuleTimeoutPacket) if err := _RelayerModule.contract.UnpackLog(event, "TimeoutPacket", log); err != nil { @@ -2402,20 +2366,22 @@ func (it *RelayerModuleWriteAcknowledgementIterator) Close() error { // RelayerModuleWriteAcknowledgement represents a WriteAcknowledgement event raised by the RelayerModule contract. type RelayerModuleWriteAcknowledgement struct { - PacketSequence common.Hash - PacketSrcPort common.Hash - PacketSrcChannel common.Hash - PacketDstPort string - PacketDstChannel string - ConnectionId string - PacketDataHex IRelayerModulePacketData - Raw types.Log // Blockchain specific contextual infos -} - -// FilterWriteAcknowledgement is a free log retrieval operation binding the contract event 0x537a2c8f190233a8d94fec1e9c145cb247a6cf9e270755b343c69a905288cac7. + PacketSequence *big.Int + PacketSrcPort common.Hash + PacketSrcChannel common.Hash + PacketSrcPortInfo string + PacketSrcChannelInfo string + PacketDstPort string + PacketDstChannel string + ConnectionId string + PacketDataHex IRelayerModulePacketData + Raw types.Log // Blockchain specific contextual infos +} + +// FilterWriteAcknowledgement is a free log retrieval operation binding the contract event 0xee91ccc0582e9dc417ef1f48c2256e2a61357850c0932c080062c486143f99d4. // -// Solidity: event WriteAcknowledgement(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) -func (_RelayerModule *RelayerModuleFilterer) FilterWriteAcknowledgement(opts *bind.FilterOpts, packetSequence []string, packetSrcPort []string, packetSrcChannel []string) (*RelayerModuleWriteAcknowledgementIterator, error) { +// Solidity: event WriteAcknowledgement(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) +func (_RelayerModule *RelayerModuleFilterer) FilterWriteAcknowledgement(opts *bind.FilterOpts, packetSequence []*big.Int, packetSrcPort []string, packetSrcChannel []string) (*RelayerModuleWriteAcknowledgementIterator, error) { var packetSequenceRule []interface{} for _, packetSequenceItem := range packetSequence { @@ -2437,10 +2403,10 @@ func (_RelayerModule *RelayerModuleFilterer) FilterWriteAcknowledgement(opts *bi return &RelayerModuleWriteAcknowledgementIterator{contract: _RelayerModule.contract, event: "WriteAcknowledgement", logs: logs, sub: sub}, nil } -// WatchWriteAcknowledgement is a free log subscription operation binding the contract event 0x537a2c8f190233a8d94fec1e9c145cb247a6cf9e270755b343c69a905288cac7. +// WatchWriteAcknowledgement is a free log subscription operation binding the contract event 0xee91ccc0582e9dc417ef1f48c2256e2a61357850c0932c080062c486143f99d4. // -// Solidity: event WriteAcknowledgement(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) -func (_RelayerModule *RelayerModuleFilterer) WatchWriteAcknowledgement(opts *bind.WatchOpts, sink chan<- *RelayerModuleWriteAcknowledgement, packetSequence []string, packetSrcPort []string, packetSrcChannel []string) (event.Subscription, error) { +// Solidity: event WriteAcknowledgement(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) +func (_RelayerModule *RelayerModuleFilterer) WatchWriteAcknowledgement(opts *bind.WatchOpts, sink chan<- *RelayerModuleWriteAcknowledgement, packetSequence []*big.Int, packetSrcPort []string, packetSrcChannel []string) (event.Subscription, error) { var packetSequenceRule []interface{} for _, packetSequenceItem := range packetSequence { @@ -2487,9 +2453,9 @@ func (_RelayerModule *RelayerModuleFilterer) WatchWriteAcknowledgement(opts *bin }), nil } -// ParseWriteAcknowledgement is a log parse operation binding the contract event 0x537a2c8f190233a8d94fec1e9c145cb247a6cf9e270755b343c69a905288cac7. +// ParseWriteAcknowledgement is a log parse operation binding the contract event 0xee91ccc0582e9dc417ef1f48c2256e2a61357850c0932c080062c486143f99d4. // -// Solidity: event WriteAcknowledgement(string indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) +// Solidity: event WriteAcknowledgement(uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, string packetSrcPortInfo, string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId, (address,string,(uint256,string)[]) packetDataHex) func (_RelayerModule *RelayerModuleFilterer) ParseWriteAcknowledgement(log types.Log) (*RelayerModuleWriteAcknowledgement, error) { event := new(RelayerModuleWriteAcknowledgement) if err := _RelayerModule.contract.UnpackLog(event, "WriteAcknowledgement", log); err != nil { diff --git a/x/cronos/events/bindings/src/Relayer.sol b/x/cronos/events/bindings/src/Relayer.sol index 13d3f49b5c..788c360f58 100644 --- a/x/cronos/events/bindings/src/Relayer.sol +++ b/x/cronos/events/bindings/src/Relayer.sol @@ -10,35 +10,43 @@ interface IRelayerModule { Cosmos.Coin[] amount; } event RecvPacket( - string indexed packetSequence, + uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, + string packetSrcPortInfo, + string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId, PacketData packetDataHex ); event WriteAcknowledgement( - string indexed packetSequence, + uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, + string packetSrcPortInfo, + string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId, PacketData packetDataHex ); event AcknowledgePacket( - string indexed packetSequence, + uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, + string packetSrcPortInfo, + string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId ); event TimeoutPacket( - string indexed packetSequence, + uint256 indexed packetSequence, string indexed packetSrcPort, string indexed packetSrcChannel, + string packetSrcPortInfo, + string packetSrcChannelInfo, string packetDstPort, string packetDstChannel, string connectionId @@ -46,27 +54,27 @@ interface IRelayerModule { // IBC transfer event Timeout( address indexed refundReceiver, - string indexed refundDenom, + string refundDenom, uint256 amount ); event FungibleTokenPacket( address indexed receiver, address indexed sender, - string indexed denom, + string denom, uint256 amount ); event IbcTransfer( address indexed sender, address indexed receiver, - string indexed denom, + string denom, uint256 amount ); event ChannelClosed(); - event DenominationTrace(string indexed denom); + event DenominationTrace(string denom); // 29-fee event DistributeFee( address indexed receiver, - string indexed fee + string fee ); // Bank event Transfer( diff --git a/x/cronos/events/events.go b/x/cronos/events/events.go index 940214bf74..07e09ff4f7 100644 --- a/x/cronos/events/events.go +++ b/x/cronos/events/events.go @@ -1,6 +1,8 @@ package events import ( + "fmt" + sdk "github.com/cosmos/cosmos-sdk/types" banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" @@ -17,22 +19,24 @@ var ( RelayerEvents map[string]*EventDescriptor IcaEvents map[string]*EventDescriptor RelayerValueDecoders = ValueDecoders{ - channeltypes.AttributeKeyDataHex: ConvertPacketData, - transfertypes.AttributeKeyAmount: ConvertAmount, - banktypes.AttributeKeyRecipient: ConvertAccAddressFromBech32, - banktypes.AttributeKeySpender: ConvertAccAddressFromBech32, - banktypes.AttributeKeyReceiver: ConvertAccAddressFromBech32, - banktypes.AttributeKeySender: ConvertAccAddressFromBech32, - banktypes.AttributeKeyMinter: ConvertAccAddressFromBech32, - banktypes.AttributeKeyBurner: ConvertAccAddressFromBech32, - channeltypes.AttributeKeySequence: ReturnStringAsIs, - channeltypes.AttributeKeySrcPort: ReturnStringAsIs, - channeltypes.AttributeKeySrcChannel: ReturnStringAsIs, - channeltypes.AttributeKeyDstPort: ReturnStringAsIs, - channeltypes.AttributeKeyDstChannel: ReturnStringAsIs, - channeltypes.AttributeKeyConnectionID: ReturnStringAsIs, - ibcfeetypes.AttributeKeyFee: ReturnStringAsIs, - transfertypes.AttributeKeyDenom: ReturnStringAsIs, + channeltypes.AttributeKeyDataHex: ConvertPacketData, + transfertypes.AttributeKeyAmount: ConvertAmount, + banktypes.AttributeKeyRecipient: ConvertAccAddressFromBech32, + banktypes.AttributeKeySpender: ConvertAccAddressFromBech32, + banktypes.AttributeKeyReceiver: ConvertAccAddressFromBech32, + banktypes.AttributeKeySender: ConvertAccAddressFromBech32, + banktypes.AttributeKeyMinter: ConvertAccAddressFromBech32, + banktypes.AttributeKeyBurner: ConvertAccAddressFromBech32, + channeltypes.AttributeKeySequence: ConvertUint64, + channeltypes.AttributeKeySrcPort: ReturnStringAsIs, + fmt.Sprintf("%s_info", channeltypes.AttributeKeySrcPort): ReturnStringAsIs, + channeltypes.AttributeKeySrcChannel: ReturnStringAsIs, + fmt.Sprintf("%s_info", channeltypes.AttributeKeySrcChannel): ReturnStringAsIs, + channeltypes.AttributeKeyDstPort: ReturnStringAsIs, + channeltypes.AttributeKeyDstChannel: ReturnStringAsIs, + channeltypes.AttributeKeyConnectionID: ReturnStringAsIs, + ibcfeetypes.AttributeKeyFee: ReturnStringAsIs, + transfertypes.AttributeKeyDenom: ReturnStringAsIs, } IcaValueDecoders = ValueDecoders{ cronoseventstypes.AttributeKeySeq: ConvertUint64,