Skip to content

Commit

Permalink
fix ibctm
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Jul 25, 2023
1 parent cd24d1f commit 35fc9a0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ import (
porttypes "github.com/cosmos/ibc-go/v7/modules/core/05-port/types"
ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint"

evmante "github.com/evmos/ethermint/app/ante"
srvflags "github.com/evmos/ethermint/server/flags"
Expand Down Expand Up @@ -235,6 +236,7 @@ func GenModuleBasics() module.BasicManager {
evidence.AppModuleBasic{},
authzmodule.AppModuleBasic{},
ibc.AppModuleBasic{},
ibctm.AppModuleBasic{},
transfer.AppModuleBasic{},
vesting.AppModuleBasic{},
consensus.AppModuleBasic{},
Expand Down
13 changes: 10 additions & 3 deletions integration_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def parse_events(logs):
}


def find_log_event_attrs(logs, ev_type, cond = None):
def find_log_event_attrs(logs, ev_type, cond=None):
for ev in logs[0]["events"]:
if ev["type"] == ev_type:
attrs = {attr["key"]: attr["value"] for attr in ev["attributes"]}
Expand All @@ -219,15 +219,22 @@ def find_log_event_attrs(logs, ev_type, cond = None):
return None


def decode_base64(raw):
try:
return base64.b64decode(raw.encode()).decode()
except Exception:
return raw


def parse_events_rpc(events):
result = defaultdict(dict)
for ev in events:
for attr in ev["attributes"]:
if attr["key"] is None:
continue
key = base64.b64decode(attr["key"].encode()).decode()
key = decode_base64(attr["key"])
if attr["value"] is not None:
value = base64.b64decode(attr["value"].encode()).decode()
value = decode_base64(attr["value"])
else:
value = None
result[ev["type"]][key] = value
Expand Down

0 comments on commit 35fc9a0

Please sign in to comment.