Skip to content

Commit

Permalink
refactor: ibc module handlers :error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Nov 17, 2022
1 parent 97a7d50 commit ca9121c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mappings/ibc/transfer.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import {CosmosEvent} from "@subql/types-cosmos";
import {IbcTransfer} from "../../types";
import {messageId} from "../utils";
import {attemptHandling, messageId, unprocessedEventHandler} from "../utils";

export async function handleIBCTransfer(event: CosmosEvent): Promise<void> {
await attemptHandling(event, _handleIBCTransfer, unprocessedEventHandler);
}

async function _handleIBCTransfer(event: CosmosEvent): Promise<void> {
const msg = event.msg;
logger.info(`[handleIBCTransfer] (tx ${msg.tx.hash}): indexing message ${msg.idx + 1} / ${msg.tx.decodedTx.body.messages.length}`);
logger.debug(`[handleIBCTransfer] (msg.msg): ${JSON.stringify(msg.msg, null, 2)}`);
Expand Down

0 comments on commit ca9121c

Please sign in to comment.