diff --git a/CHANGELOG.md b/CHANGELOG.md index 94f55c8c26..03b4ea776b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,16 @@ # Changelog -## UNRELEASED +*Oct 24, 2024* + +## v1.4.0-rc2 ### Bug Fixes * (testground)[1649](https://github.com/crypto-org-chain/cronos/pull/1649) Fix running single validator benchmark locally. * (cli)[#1647](https://github.com/crypto-org-chain/cronos/pull/1647) Fix node can't shutdown by signal. * (testground)[#1652](https://github.com/crypto-org-chain/cronos/pull/1652) Remove unexpected conflicts in benchmark transactions. +* [#1655](https://github.com/crypto-org-chain/cronos/pull/1655) Fix state overwrite in debug trace APIs. +* [#1663](https://github.com/crypto-org-chain/cronos/pull/1663) Align attributes for ibc timeout event. ### Improvements @@ -15,6 +19,9 @@ * [#1648](https://github.com/crypto-org-chain/cronos/pull/1648) Add abort OE in PrepareProposal. * (testground)[#1651](https://github.com/crypto-org-chain/cronos/pull/1651) Benchmark use cosmos broadcast rpc. * (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/app/app.go b/app/app.go index b8905c4170..2ef656b0d5 100644 --- a/app/app.go +++ b/app/app.go @@ -188,6 +188,7 @@ const ( FlagBlockedAddresses = "blocked-addresses" FlagUnsafeIgnoreBlockListFailure = "unsafe-ignore-block-list-failure" + FlagUnsafeDummyCheckTx = "unsafe-dummy-check-tx" ) var Forks = []Fork{} @@ -289,6 +290,7 @@ type App struct { // encoding cdc *codec.LegacyAmino txConfig client.TxConfig + txDecoder sdk.TxDecoder appCodec codec.Codec interfaceRegistry types.InterfaceRegistry @@ -352,6 +354,9 @@ type App struct { qms storetypes.RootMultiStore blockProposalHandler *ProposalHandler + + // unsafe to set for validator, used for testing + dummyCheckTx bool } // New returns a reference to an initialized chain. @@ -456,6 +461,7 @@ func New( BaseApp: bApp, cdc: cdc, txConfig: txConfig, + txDecoder: txDecoder, appCodec: appCodec, interfaceRegistry: interfaceRegistry, invCheckPeriod: invCheckPeriod, @@ -464,6 +470,7 @@ func New( okeys: okeys, memKeys: memKeys, blockProposalHandler: blockProposalHandler, + dummyCheckTx: cast.ToBool(appOpts.Get(FlagUnsafeDummyCheckTx)), } app.SetDisableBlockGasMeter(true) @@ -1466,3 +1473,21 @@ func (app *App) Close() error { func maxParallelism() int { return min(stdruntime.GOMAXPROCS(0), stdruntime.NumCPU()) } + +func (app *App) CheckTx(req *abci.RequestCheckTx) (*abci.ResponseCheckTx, error) { + if app.dummyCheckTx { + tx, err := app.txDecoder(req.Tx) + if err != nil { + return nil, err + } + + feeTx, ok := tx.(sdk.FeeTx) + if !ok { + return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "tx must be FeeTx") + } + + return &abci.ResponseCheckTx{Code: abci.CodeTypeOK, GasWanted: int64(feeTx.GetGas())}, nil + } + + return app.BaseApp.CheckTx(req) +} diff --git a/app/proposal.go b/app/proposal.go index 8a755941c5..3e4465b084 100644 --- a/app/proposal.go +++ b/app/proposal.go @@ -124,6 +124,11 @@ func (h *ProposalHandler) SetBlockList(blob []byte) error { } func (h *ProposalHandler) ValidateTransaction(tx sdk.Tx) error { + if len(h.blocklist) == 0 { + // fast path, accept all txs + return nil + } + sigTx, ok := tx.(signing.SigVerifiableTx) if !ok { return fmt.Errorf("tx of type %T does not implement SigVerifiableTx", tx) @@ -147,6 +152,11 @@ func (h *ProposalHandler) ValidateTransaction(tx sdk.Tx) error { func (h *ProposalHandler) ProcessProposalHandler() sdk.ProcessProposalHandler { return func(ctx sdk.Context, req *abci.RequestProcessProposal) (*abci.ResponseProcessProposal, error) { + if len(h.blocklist) == 0 { + // fast path, accept all txs + return &abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}, nil + } + for _, txBz := range req.Txs { memTx, err := h.TxDecoder(txBz) if err != nil { diff --git a/go.mod b/go.mod index df2bb91564..525960b41d 100644 --- a/go.mod +++ b/go.mod @@ -273,7 +273,7 @@ replace ( github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2 github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240926023215-d2275b4afb9a // develop - github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20241017130935-816389c76eac + github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20241022025636-430068294727 // Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities. // TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409 github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0 diff --git a/go.sum b/go.sum index 0da36aff13..03b1db312a 100644 --- a/go.sum +++ b/go.sum @@ -428,8 +428,8 @@ github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241018012743-d78d66e74712 github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20241018012743-d78d66e74712/go.mod h1:8DwVTz83/2PSI366FERGbWSH7hL6sB7HbYp8bqksNwM= github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241018012743-d78d66e74712 h1:vvN3FqhFTakKy4jgVC1GoEtHW52zQg49uNE/e16Scu8= github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20241018012743-d78d66e74712/go.mod h1:V6DImnwJMTq5qFjeGWpXNiT/fjgE4HtmclRmTqRVM3w= -github.com/crypto-org-chain/ethermint v0.6.1-0.20241017130935-816389c76eac h1:tSgcMmugbp5h5Xi2rRZBCwP37EfqxM6jmNv9qO/aNrI= -github.com/crypto-org-chain/ethermint v0.6.1-0.20241017130935-816389c76eac/go.mod h1:LUv3b8+dRjqAI9UTml5XzjExT2ANyvjtkFssi7lIRb0= +github.com/crypto-org-chain/ethermint v0.6.1-0.20241022025636-430068294727 h1:vMY/xLOa4kBZahv6JgIeJPLeaiNfKsgRirKRFzd+oeg= +github.com/crypto-org-chain/ethermint v0.6.1-0.20241022025636-430068294727/go.mod h1:LUv3b8+dRjqAI9UTml5XzjExT2ANyvjtkFssi7lIRb0= github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716 h1:OvD5Rm0B6LHUJk6z858UgwdP72jU2DuUdXeclRyKpDI= github.com/crypto-org-chain/go-block-stm v0.0.0-20240919080136-6c49aef68716/go.mod h1:iwQTX9xMX8NV9k3o2BiWXA0SswpsZrDk5q3gA7nWYiE= github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240926023215-d2275b4afb9a h1:IUPD+dg1YQl8cLocxQ/Mbx/ObTgAgcrZlcBhFjsLO40= diff --git a/gomod2nix.toml b/gomod2nix.toml index f1be8f6123..dec9b33381 100644 --- a/gomod2nix.toml +++ b/gomod2nix.toml @@ -262,8 +262,8 @@ schema = 3 hash = "sha256-ozwVS2BhAoz+OOisAyMhgg+lq8FdQjf90xoOq9cxtGw=" replaced = "github.com/crypto-org-chain/go-ethereum" [mod."github.com/evmos/ethermint"] - version = "v0.6.1-0.20241017130935-816389c76eac" - hash = "sha256-DD2uiTxQKEwKP5tCETMZNX8it7G7e+MBFFMG3YpW6RA=" + version = "v0.6.1-0.20241022025636-430068294727" + hash = "sha256-BLzVdTWu6We25O2DRCAyB5ShbBEnw4aKzWY9vDVSRok=" replaced = "github.com/crypto-org-chain/ethermint" [mod."github.com/fatih/color"] version = "v1.16.0" diff --git a/integration_tests/test_basic.py b/integration_tests/test_basic.py index 7089b6c9d1..b267746806 100644 --- a/integration_tests/test_basic.py +++ b/integration_tests/test_basic.py @@ -866,7 +866,12 @@ def fn(cmd): cronos.base_dir / "tasks.ini", lambda cmd: fn(cmd), ) + cli = cronos.cosmos_cli() + # update right after a new block start + wait_for_new_blocks(cli, 1, sleep=0.1) cronos.supervisorctl("update") + # ensure nodes stop and start at the same time + time.sleep(2) wait_for_port(ports.evmrpc_port(cronos.base_port(0))) # reset to origin_cmd only @@ -874,7 +879,6 @@ def fn(cmd): return w3 = cronos.w3 - cli = cronos.cosmos_cli() block_gas_limit = 81500000 tx_gas_limit = 80000000 max_tx_in_block = block_gas_limit // min(max_gas_wanted, tx_gas_limit) diff --git a/integration_tests/test_ibc_rly.py b/integration_tests/test_ibc_rly.py index 22f69a7f2f..c482a87807 100644 --- a/integration_tests/test_ibc_rly.py +++ b/integration_tests/test_ibc_rly.py @@ -93,7 +93,7 @@ def coin_spent(spender, amt, denom): def distribute_fee(receiver, fee): return { "receiver": receiver, - "fee": keccak(text=fee), + "fee": fee, } @@ -101,7 +101,7 @@ def fungible(dst, src, amt, denom): return { "receiver": dst, "sender": src, - "denom": keccak(text=denom), + "denom": denom, "amount": amt, } @@ -123,9 +123,11 @@ def burn(burner, amt, denom): def recv_packet(seq, src, dst, amt, denom): return { - "packetSequence": keccak(text=f"{seq}"), + "packetSequence": 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": seq, "packetSrcPort": keccak(text="transfer"), "packetSrcChannel": keccak(text=channel), + "packetSrcPortInfo": "transfer", + "packetSrcChannelInfo": channel, "packetDstPort": "transfer", "packetDstChannel": channel, "connectionId": "connection-0", @@ -152,15 +156,17 @@ def acknowledge_packet(seq): def denom_trace(denom): return { - "denom": keccak(text=denom), + "denom": denom, } def write_ack(seq, src, dst, amt, denom): return { - "packetSequence": keccak(text=f"{seq}"), + "packetSequence": seq, "packetSrcPort": keccak(text="transfer"), "packetSrcChannel": keccak(text=channel), + "packetSrcPortInfo": "transfer", + "packetSrcChannelInfo": channel, "packetDstPort": "transfer", "packetDstChannel": channel, "connectionId": "connection-0", @@ -209,7 +215,7 @@ def get_send_packet_seq( events = parse_events_rpc(res["events"]) target = events.get("send_packet") if target and target["packet_sequence"]: - return target["packet_sequence"] + return int(target["packet_sequence"]) return None @@ -220,7 +226,7 @@ def filter_logs_since(w3, start, name, seq): { "fromBlock": start, "address": [CONTRACT], - "topics": [topic, "0x" + keccak(text=f"{seq}").hex()], + "topics": [topic, "0x{:064x}".format(seq)], } ) diff --git a/integration_tests/utils.py b/integration_tests/utils.py index adbdaa2bf9..c4474d8ce6 100644 --- a/integration_tests/utils.py +++ b/integration_tests/utils.py @@ -122,11 +122,14 @@ def wait_for_block(cli, height, timeout=240): raise TimeoutError(f"wait for block {height} timeout") -def wait_for_new_blocks(cli, n, sleep=0.5): +def wait_for_new_blocks(cli, n, sleep=0.5, timeout=240): cur_height = begin_height = int(get_sync_info(cli.status())["latest_block_height"]) + start_time = time.time() while cur_height - begin_height < n: time.sleep(sleep) cur_height = int(get_sync_info(cli.status())["latest_block_height"]) + if time.time() - start_time > timeout: + raise TimeoutError(f"wait for block {begin_height + n} timeout") return cur_height 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..5b9d3215e8 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\":\"string\",\"name\":\"refundAmount\",\"type\":\"string\"}],\"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,47 +1900,39 @@ func (it *RelayerModuleTimeoutIterator) Close() error { // RelayerModuleTimeout represents a Timeout event raised by the RelayerModule contract. type RelayerModuleTimeout struct { RefundReceiver common.Address - RefundDenom common.Hash - Amount *big.Int + RefundDenom string + RefundAmount string Raw types.Log // Blockchain specific contextual infos } -// FilterTimeout is a free log retrieval operation binding the contract event 0x1d76f8448fb37cb7d524e0c59091293b9c39eea4c53674d9f53f323fee1b971f. +// FilterTimeout is a free log retrieval operation binding the contract event 0x2048e680af69959f50b9e0ae0b475b973d0c7b8e21b2d4c026beeb9a626dedd7. // -// 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, string refundAmount) +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 } return &RelayerModuleTimeoutIterator{contract: _RelayerModule.contract, event: "Timeout", logs: logs, sub: sub}, nil } -// WatchTimeout is a free log subscription operation binding the contract event 0x1d76f8448fb37cb7d524e0c59091293b9c39eea4c53674d9f53f323fee1b971f. +// WatchTimeout is a free log subscription operation binding the contract event 0x2048e680af69959f50b9e0ae0b475b973d0c7b8e21b2d4c026beeb9a626dedd7. // -// 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, string refundAmount) +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 } @@ -2002,9 +1964,9 @@ func (_RelayerModule *RelayerModuleFilterer) WatchTimeout(opts *bind.WatchOpts, }), nil } -// ParseTimeout is a log parse operation binding the contract event 0x1d76f8448fb37cb7d524e0c59091293b9c39eea4c53674d9f53f323fee1b971f. +// ParseTimeout is a log parse operation binding the contract event 0x2048e680af69959f50b9e0ae0b475b973d0c7b8e21b2d4c026beeb9a626dedd7. // -// Solidity: event Timeout(address indexed refundReceiver, string indexed refundDenom, uint256 amount) +// Solidity: event Timeout(address indexed refundReceiver, string refundDenom, string refundAmount) 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..564d496397 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, - uint256 amount + string refundDenom, + string refundAmount ); 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/event.go b/x/cronos/events/event.go index 0c146b95e2..1dbbdfac91 100644 --- a/x/cronos/events/event.go +++ b/x/cronos/events/event.go @@ -62,12 +62,15 @@ func makeFilter( func (desc *EventDescriptor) ConvertEvent( event []abci.EventAttribute, valueDecoders ValueDecoders, + replaceAttrs map[string]string, ) (*ethtypes.Log, error) { attrs := make(map[string]string, len(event)) for _, attr := range event { attrs[toUnderScore(attr.Key)] = attr.Value } - + for k, v := range replaceAttrs { + attrs[k] = attrs[v] + } filterQuery, err := makeFilter(valueDecoders, attrs, desc.indexed, true) if err != nil { return nil, err diff --git a/x/cronos/events/events.go b/x/cronos/events/events.go index 940214bf74..33cd6daa5f 100644 --- a/x/cronos/events/events.go +++ b/x/cronos/events/events.go @@ -17,22 +17,27 @@ 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, + cronoseventstypes.AttributeKeySrcPortInfo: ReturnStringAsIs, + channeltypes.AttributeKeySrcChannel: ReturnStringAsIs, + cronoseventstypes.AttributeKeySrcChannelInfo: ReturnStringAsIs, + channeltypes.AttributeKeyDstPort: ReturnStringAsIs, + channeltypes.AttributeKeyDstChannel: ReturnStringAsIs, + channeltypes.AttributeKeyConnectionID: ReturnStringAsIs, + ibcfeetypes.AttributeKeyFee: ReturnStringAsIs, + transfertypes.AttributeKeyDenom: ReturnStringAsIs, + transfertypes.AttributeKeyRefundReceiver: ConvertAccAddressFromBech32, + transfertypes.AttributeKeyRefundDenom: ReturnStringAsIs, + transfertypes.AttributeKeyRefundAmount: ReturnStringAsIs, } IcaValueDecoders = ValueDecoders{ cronoseventstypes.AttributeKeySeq: ConvertUint64, @@ -59,7 +64,11 @@ func RelayerConvertEvent(event sdk.Event) (*ethtypes.Log, error) { if !ok { return nil, nil } - return desc.ConvertEvent(event.Attributes, RelayerValueDecoders) + replaceAttrs := map[string]string{ + cronoseventstypes.AttributeKeySrcPortInfo: channeltypes.AttributeKeySrcPort, + cronoseventstypes.AttributeKeySrcChannelInfo: channeltypes.AttributeKeySrcChannel, + } + return desc.ConvertEvent(event.Attributes, RelayerValueDecoders, replaceAttrs) } func IcaConvertEvent(event sdk.Event) (*ethtypes.Log, error) { @@ -67,5 +76,5 @@ func IcaConvertEvent(event sdk.Event) (*ethtypes.Log, error) { if !ok { return nil, nil } - return desc.ConvertEvent(event.Attributes, IcaValueDecoders) + return desc.ConvertEvent(event.Attributes, IcaValueDecoders, map[string]string{}) } diff --git a/x/cronos/events/types/types.go b/x/cronos/events/types/types.go index 66ace42d19..ad30073e08 100644 --- a/x/cronos/events/types/types.go +++ b/x/cronos/events/types/types.go @@ -1,6 +1,8 @@ package types const ( - EventTypeSubmitMsgsResult = "submit_msgs_result" - AttributeKeySeq = "seq" + EventTypeSubmitMsgsResult = "submit_msgs_result" + AttributeKeySeq = "seq" + AttributeKeySrcPortInfo = "packet_src_port_info" + AttributeKeySrcChannelInfo = "packet_src_channel_info" )