Mapped txs array
This commit is contained in:
parent
e12e6cb576
commit
ae196875d2
|
@ -9,14 +9,14 @@ let logger: winston.Logger = winston.child({ module: "wormchainLogMessagePublish
|
||||||
|
|
||||||
export const wormchainLogMessagePublishedMapper = (
|
export const wormchainLogMessagePublishedMapper = (
|
||||||
log: WormchainLog
|
log: WormchainLog
|
||||||
): LogFoundEvent<LogMessagePublished[]> | [] => {
|
): LogFoundEvent<LogMessagePublished>[] | [] => {
|
||||||
const transactionAttributesMapped = transactionAttributes(log);
|
const transactionAttributesMapped = transactionAttributes(log);
|
||||||
|
|
||||||
if (transactionAttributesMapped.length === 0) {
|
if (transactionAttributesMapped.length === 0) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const logMessages: any = [];
|
const logMessages: LogFoundEvent<LogMessagePublished>[] = [];
|
||||||
|
|
||||||
transactionAttributesMapped.forEach((tx) => {
|
transactionAttributesMapped.forEach((tx) => {
|
||||||
logger.info(
|
logger.info(
|
||||||
|
@ -27,14 +27,14 @@ export const wormchainLogMessagePublishedMapper = (
|
||||||
name: "log-message-published",
|
name: "log-message-published",
|
||||||
address: CORE_ADDRESS,
|
address: CORE_ADDRESS,
|
||||||
chainId: 3104,
|
chainId: 3104,
|
||||||
txHash: tx.hash,
|
txHash: tx.hash!,
|
||||||
blockHeight: log.blockHeight,
|
blockHeight: log.blockHeight,
|
||||||
blockTime: log.timestamp,
|
blockTime: log.timestamp,
|
||||||
attributes: {
|
attributes: {
|
||||||
sender: tx.emitter,
|
sender: tx.emitter!,
|
||||||
sequence: tx.sequence,
|
sequence: tx.sequence!,
|
||||||
payload: tx.payload,
|
payload: tx.payload!,
|
||||||
nonce: tx.nonce,
|
nonce: tx.nonce!,
|
||||||
consistencyLevel: 0,
|
consistencyLevel: 0,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue