From 29d8ac1139d0b6c3718e91cdd618972355029cfb Mon Sep 17 00:00:00 2001 From: ponyjackal Date: Fri, 26 Jul 2024 09:36:36 -0700 Subject: [PATCH 1/5] feat: add grabLogsFromTransaction --- .../bridges/acrossProtocol/destination.ts | 6 +-- .../bridges/acrossProtocol/source.ts | 6 +-- .../bridges/hopTransferToL1/destination.ts | 6 +-- .../bridges/hopTransferToL1/source.ts | 6 +-- .../bridges/hopTransferToL2/destination.ts | 6 +-- .../bridges/hopTransferToL2/source.ts | 6 +-- src/contextualizers/bridges/opStack/source.ts | 6 +-- .../bridges/starGate/destination.ts | 6 +-- .../bridges/starGate/source.ts | 6 +-- .../heuristics/ethTransfer/ethTransfer.ts | 4 +- .../protocol/boombox/boombox.ts | 10 ++--- .../protocol/cryptopunks/cryptopunks.ts | 8 +++- src/contextualizers/protocol/eas/eas.ts | 9 ++++- .../protocol/eas/schemaRegistry.ts | 10 ++++- src/contextualizers/protocol/ens/registrar.ts | 16 +++++--- .../protocol/farcaster/bundler.ts | 9 ++++- .../protocol/farcaster/idGateway.ts | 10 ++++- .../protocol/frenpet/gameplay.ts | 38 +++++++++++-------- .../protocol/friendTech/detect.ts | 4 +- .../protocol/friendTech/friendTech.ts | 15 +++++--- .../protocol/highlight/highlight.ts | 4 +- .../protocol/nouns/auctionHouse.ts | 10 ++++- .../protocol/nouns/daoLogic.ts | 13 +++++-- .../protocol/nounsBuilder/auction.ts | 9 ++++- .../protocol/nounsBuilder/governor.ts | 11 ++++-- src/contextualizers/protocol/rodeo/rodeo.ts | 8 ++-- .../protocol/skyoneer/destination.ts | 11 ++++-- .../protocol/skyoneer/plotAction.ts | 16 +++++--- .../protocol/skyoneer/source.ts | 12 +++--- .../protocol/uniswapV3/uniswapV3Pair.ts | 11 +++--- .../protocol/zoraCreator/zoraCreator.ts | 8 ++-- src/helpers/utils.ts | 21 ++++++++++ 32 files changed, 209 insertions(+), 112 deletions(-) diff --git a/src/contextualizers/bridges/acrossProtocol/destination.ts b/src/contextualizers/bridges/acrossProtocol/destination.ts index 404b18f0..c7e4df75 100644 --- a/src/contextualizers/bridges/acrossProtocol/destination.ts +++ b/src/contextualizers/bridges/acrossProtocol/destination.ts @@ -10,7 +10,7 @@ import { ACROSS_PROTOCOL_RELAYER_ABI, ACROSS_PROTOCOL_RELAYERS, } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; export function contextualize(transaction: Transaction): Transaction { const isAcrossProtocol = detect(transaction); @@ -28,7 +28,7 @@ export function detect(transaction: Transaction): boolean { * and it also serves to decouple the logic, thereby simplifying the testing process */ const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); const filledRelayLog = logs.find((log: Log) => { if (log.address !== ACROSS_PROTOCOL_RELAYERS[originChainId]) return false; @@ -50,7 +50,7 @@ export function detect(transaction: Transaction): boolean { export function generate(transaction: Transaction): Transaction { const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); let filledRelayEvent; const filledRelayLog = logs.find((log: Log) => { if (log.address !== ACROSS_PROTOCOL_RELAYERS[originChainId]) return false; diff --git a/src/contextualizers/bridges/acrossProtocol/source.ts b/src/contextualizers/bridges/acrossProtocol/source.ts index 17e38f9d..4924eed6 100644 --- a/src/contextualizers/bridges/acrossProtocol/source.ts +++ b/src/contextualizers/bridges/acrossProtocol/source.ts @@ -10,7 +10,7 @@ import { ACROSS_PROTOCOL_RELAYER_ABI, ACROSS_PROTOCOL_RELAYERS, } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; export function contextualize(transaction: Transaction): Transaction { const isAcrossProtocol = detect(transaction); @@ -28,7 +28,7 @@ export function detect(transaction: Transaction): boolean { * and it also serves to decouple the logic, thereby simplifying the testing process */ const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); const fundsDepositedLog = logs.find((log: Log) => { if (log.address !== ACROSS_PROTOCOL_RELAYERS[originChainId]) return false; @@ -51,7 +51,7 @@ export function detect(transaction: Transaction): boolean { export function generate(transaction: Transaction): Transaction { const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); let fundsDepositedEvent; const fundsDepositedLog = logs.find((log: Log) => { if (log.address !== ACROSS_PROTOCOL_RELAYERS[originChainId]) return false; diff --git a/src/contextualizers/bridges/hopTransferToL1/destination.ts b/src/contextualizers/bridges/hopTransferToL1/destination.ts index ed025493..dbd7d128 100644 --- a/src/contextualizers/bridges/hopTransferToL1/destination.ts +++ b/src/contextualizers/bridges/hopTransferToL1/destination.ts @@ -6,7 +6,7 @@ import { Transaction, } from '../../../types'; import { HOP_WITHDRAWAL_BONDED_EVENT_ABI, HOP_RELAYERS } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; export function contextualize(transaction: Transaction): Transaction { const isHopTransferToL1 = detect(transaction); @@ -24,7 +24,7 @@ export function detect(transaction: Transaction): boolean { * and it also serves to decouple the logic, thereby simplifying the testing process */ const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); const withdrawalBondedLog = logs.find((log: any) => { if (log.address !== HOP_RELAYERS[originChainId]) return false; @@ -49,7 +49,7 @@ export function generate(transaction: Transaction): Transaction { const chainId = transaction.chainId; if (!chainId) return transaction; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); let decodedWithdrawalBondedLog; for (const log of logs) { if (log.address !== HOP_RELAYERS[originChainId]) continue; diff --git a/src/contextualizers/bridges/hopTransferToL1/source.ts b/src/contextualizers/bridges/hopTransferToL1/source.ts index 25e280cb..2c9c0ddf 100644 --- a/src/contextualizers/bridges/hopTransferToL1/source.ts +++ b/src/contextualizers/bridges/hopTransferToL1/source.ts @@ -6,7 +6,7 @@ import { Transaction, } from '../../../types'; import { HOP_TRANSFER_SENT_EVENT_ABI, HOP_RELAYERS } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; export function contextualize(transaction: Transaction): Transaction { const isHopTransferToL1 = detect(transaction); @@ -24,7 +24,7 @@ export function detect(transaction: Transaction): boolean { * and it also serves to decouple the logic, thereby simplifying the testing process */ const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); const transferSentLog = logs.find((log: any) => { if (log.address !== HOP_RELAYERS[originChainId]) return false; @@ -46,7 +46,7 @@ export function detect(transaction: Transaction): boolean { export function generate(transaction: Transaction): Transaction { const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); let decodedTransferSentLog; for (const log of logs) { if (log.address !== HOP_RELAYERS[originChainId]) continue; diff --git a/src/contextualizers/bridges/hopTransferToL2/destination.ts b/src/contextualizers/bridges/hopTransferToL2/destination.ts index b85c0c2f..22f7a76c 100644 --- a/src/contextualizers/bridges/hopTransferToL2/destination.ts +++ b/src/contextualizers/bridges/hopTransferToL2/destination.ts @@ -9,7 +9,7 @@ import { HOP_TRANSFER_FROM_L1_COMPLETED_EVENT_ABI, HOP_RELAYERS, } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; export function contextualize(transaction: Transaction): Transaction { const isHopTransferToL1 = detect(transaction); @@ -27,7 +27,7 @@ export function detect(transaction: Transaction): boolean { * and it also serves to decouple the logic, thereby simplifying the testing process */ const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); const transferFromL1CompletedLog = logs.find((log: any) => { if (log.address !== HOP_RELAYERS[originChainId]) return false; @@ -51,7 +51,7 @@ export function generate(transaction: Transaction): Transaction { const chainId = transaction.chainId; if (!chainId) return transaction; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); let decodedTransferFromL1CompletedLog; for (const log of logs) { if (log.address !== HOP_RELAYERS[chainId]) continue; diff --git a/src/contextualizers/bridges/hopTransferToL2/source.ts b/src/contextualizers/bridges/hopTransferToL2/source.ts index 41bc4668..492ec45e 100644 --- a/src/contextualizers/bridges/hopTransferToL2/source.ts +++ b/src/contextualizers/bridges/hopTransferToL2/source.ts @@ -6,7 +6,7 @@ import { Transaction, } from '../../../types'; import { HOP_TRANSFER_SENT_TO_L2_EVENT_ABI, HOP_RELAYERS } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; export function contextualize(transaction: Transaction): Transaction { const isHopTransferToL1 = detect(transaction); @@ -24,7 +24,7 @@ export function detect(transaction: Transaction): boolean { * and it also serves to decouple the logic, thereby simplifying the testing process */ const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); const transferSentToL2Log = logs.find((log: any) => { if (log.address !== HOP_RELAYERS[originChainId]) return false; @@ -46,7 +46,7 @@ export function detect(transaction: Transaction): boolean { export function generate(transaction: Transaction): Transaction { const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); let decodedTransferSentToL2Log; for (const log of logs) { if (log.address !== HOP_RELAYERS[originChainId]) continue; diff --git a/src/contextualizers/bridges/opStack/source.ts b/src/contextualizers/bridges/opStack/source.ts index 7fdb6f6d..8cdfbfad 100644 --- a/src/contextualizers/bridges/opStack/source.ts +++ b/src/contextualizers/bridges/opStack/source.ts @@ -18,7 +18,7 @@ import { TRANSACTION_DEPOSITED_EVENT_ABI, TRANSACTION_DEPOSITED_EVENT_HASH, } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; export function contextualize(transaction: Transaction): Transaction { const isOpStack = detect(transaction); @@ -36,7 +36,7 @@ export function detect(transaction: Transaction): boolean { * and it also serves to decouple the logic, thereby simplifying the testing process */ if (transaction.chainId === 1) { - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); const transactionDepositedLog = logs.find((log: any) => { return log.topic0 === TRANSACTION_DEPOSITED_EVENT_HASH; }); @@ -58,7 +58,7 @@ export function generate(transaction: Transaction): Transaction { } const assetTransfer: Asset = assetSent[0]; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); const transactionDepositedLog = logs.find((log: any) => { return log.topic0 === TRANSACTION_DEPOSITED_EVENT_HASH; }); diff --git a/src/contextualizers/bridges/starGate/destination.ts b/src/contextualizers/bridges/starGate/destination.ts index af5239ad..694ce1e9 100644 --- a/src/contextualizers/bridges/starGate/destination.ts +++ b/src/contextualizers/bridges/starGate/destination.ts @@ -16,7 +16,7 @@ import { STAR_GATE_PACKET_RECEIVED_EVENT_ABI, STAR_GATE_CHAIN_IDS, } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; export function contextualize(transaction: Transaction): Transaction { const isStarGate = detect(transaction); @@ -34,7 +34,7 @@ export function detect(transaction: Transaction): boolean { * and it also serves to decouple the logic, thereby simplifying the testing process */ const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); const packetReceivedLog = logs.find((log: Log) => { if (log.address !== STAR_GATE_RELAYERS[originChainId]) return false; @@ -58,7 +58,7 @@ export function detect(transaction: Transaction): boolean { export function generate(transaction: Transaction): Transaction { const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); let decodedPacketReceivedLog; for (const log of logs) { diff --git a/src/contextualizers/bridges/starGate/source.ts b/src/contextualizers/bridges/starGate/source.ts index 1a9d6b3f..7b4c3f17 100644 --- a/src/contextualizers/bridges/starGate/source.ts +++ b/src/contextualizers/bridges/starGate/source.ts @@ -15,7 +15,7 @@ import { STAR_GATE_PACKET_EVENT_ABI, STAR_GATE_CHAIN_IDS, } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; export function contextualize(transaction: Transaction): Transaction { const isStarGate = detect(transaction); @@ -33,7 +33,7 @@ export function detect(transaction: Transaction): boolean { * and it also serves to decouple the logic, thereby simplifying the testing process */ const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); const sendMsgLog = logs.find((log: Log) => { if (log.address !== STAR_GATE_BRIDGES[originChainId]) return false; const decoded = decodeLog( @@ -79,7 +79,7 @@ export function detect(transaction: Transaction): boolean { export function generate(transaction: Transaction): Transaction { const originChainId = transaction.chainId ?? 1; - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); let decodedSwapLog; for (const log of logs) { diff --git a/src/contextualizers/heuristics/ethTransfer/ethTransfer.ts b/src/contextualizers/heuristics/ethTransfer/ethTransfer.ts index 008efe68..911a3b3c 100644 --- a/src/contextualizers/heuristics/ethTransfer/ethTransfer.ts +++ b/src/contextualizers/heuristics/ethTransfer/ethTransfer.ts @@ -1,3 +1,4 @@ +import { grabLogsFromTransaction } from '../../../helpers/utils'; import { AssetType, HeuristicContextActionEnum, @@ -12,12 +13,13 @@ export function contextualize(transaction: Transaction): Transaction { } export function detect(transaction: Transaction): boolean { + const logs = grabLogsFromTransaction(transaction); // TODO; check logs from transaction if ( transaction.to && transaction.input === '0x' && transaction.value !== BigInt(0) && - transaction.logs?.length === 0 + logs.length === 0 ) { return true; } diff --git a/src/contextualizers/protocol/boombox/boombox.ts b/src/contextualizers/protocol/boombox/boombox.ts index f1097c95..00a68287 100644 --- a/src/contextualizers/protocol/boombox/boombox.ts +++ b/src/contextualizers/protocol/boombox/boombox.ts @@ -8,6 +8,7 @@ import { import { decodeEVMAddress, decodeTransactionInput, + grabLogsFromTransaction, } from '../../../helpers/utils'; import { CHAIN_IDS } from '../../../helpers/constants'; @@ -123,12 +124,11 @@ export const generate = (transaction: Transaction): Transaction => { case 'distribute': const distributeArtistId = decoded.args && decoded.args.length > 0 ? decoded.args[0] : ''; + const logs = grabLogsFromTransaction(transaction); // decode logs - const distributeLogs = transaction.logs - ? transaction.logs.filter( - (log) => log.topic0 === EVENT_DISTRIBUTE_TOPIC, - ) - : []; + const distributeLogs = logs.filter( + (log) => log.topic0 === EVENT_DISTRIBUTE_TOPIC, + ); const recipients = distributeLogs.map((log) => decodeEVMAddress(log.topic2), ); diff --git a/src/contextualizers/protocol/cryptopunks/cryptopunks.ts b/src/contextualizers/protocol/cryptopunks/cryptopunks.ts index c1012b2a..063df263 100644 --- a/src/contextualizers/protocol/cryptopunks/cryptopunks.ts +++ b/src/contextualizers/protocol/cryptopunks/cryptopunks.ts @@ -7,7 +7,10 @@ import { Transaction, } from '../../../types'; import { CryptopunksContracts, CRYPTOPUNK_ABIS } from './constants'; -import { decodeTransactionInput } from '../../../helpers/utils'; +import { + decodeTransactionInput, + grabLogsFromTransaction, +} from '../../../helpers/utils'; export const contextualize = (transaction: Transaction): Transaction => { const isENS = detect(transaction); @@ -357,7 +360,8 @@ export const generate = (transaction: Transaction): Transaction => { unit: 'wei', }; if (transaction.receipt?.status) { - const transferTopic = transaction.logs?.filter( + const logs = grabLogsFromTransaction(transaction); + const transferTopic = logs.filter( (log) => log.topic0 === '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef', diff --git a/src/contextualizers/protocol/eas/eas.ts b/src/contextualizers/protocol/eas/eas.ts index d9c0f71c..d497addd 100644 --- a/src/contextualizers/protocol/eas/eas.ts +++ b/src/contextualizers/protocol/eas/eas.ts @@ -5,7 +5,11 @@ import { EventLogTopics, EASContextActionEnum, } from '../../../types'; -import { decodeTransactionInput, decodeLog } from '../../../helpers/utils'; +import { + decodeTransactionInput, + decodeLog, + grabLogsFromTransaction, +} from '../../../helpers/utils'; import { ABIs, EAS_LINKS } from './constants'; export const contextualize = (transaction: Transaction): Transaction => { @@ -70,7 +74,8 @@ const getAttestationID = (transaction: Transaction): string | null => { return null; } // TODO: Confirm that the event matches the expected name - const transactionLog = transaction?.logs?.[0]; + const logs = grabLogsFromTransaction(transaction); + const transactionLog = logs?.[0]; const decoded = decodeLog( ABIs.EAS, transactionLog?.data as Hex, diff --git a/src/contextualizers/protocol/eas/schemaRegistry.ts b/src/contextualizers/protocol/eas/schemaRegistry.ts index 6135d1ba..0ff0224e 100644 --- a/src/contextualizers/protocol/eas/schemaRegistry.ts +++ b/src/contextualizers/protocol/eas/schemaRegistry.ts @@ -4,7 +4,11 @@ import { EventLogTopics, Transaction, } from '../../../types'; -import { decodeTransactionInput, decodeLog } from '../../../helpers/utils'; +import { + decodeTransactionInput, + decodeLog, + grabLogsFromTransaction, +} from '../../../helpers/utils'; import { ABIs, EAS_LINKS } from './constants'; export const contextualize = (transaction: Transaction): Transaction => { @@ -54,11 +58,13 @@ export const generate = (transaction: Transaction): Transaction => { } if (!transaction.chainId) return transaction; + const logs = grabLogsFromTransaction(transaction); + switch (decoded.functionName) { case 'register': { let id = ''; if (transaction.receipt?.status) { - const registerLog = transaction.logs?.find((log) => { + const registerLog = logs.find((log) => { const decoded = decodeLog( ABIs.SchemaRegistry, log.data as Hex, diff --git a/src/contextualizers/protocol/ens/registrar.ts b/src/contextualizers/protocol/ens/registrar.ts index 5471594d..74711866 100644 --- a/src/contextualizers/protocol/ens/registrar.ts +++ b/src/contextualizers/protocol/ens/registrar.ts @@ -5,7 +5,11 @@ import { Transaction, } from '../../../types'; import { ENS_CONTRACTS, ENS_ADDRESSES } from './constants'; -import { convertDate, decodeLog } from '../../../helpers/utils'; +import { + convertDate, + decodeLog, + grabLogsFromTransaction, +} from '../../../helpers/utils'; export const contextualize = (transaction: Transaction): Transaction => { const isENS = detect(transaction); @@ -15,12 +19,13 @@ export const contextualize = (transaction: Transaction): Transaction => { }; export const detect = (transaction: Transaction): boolean => { + const logs = grabLogsFromTransaction(transaction); // detect logs - if (!transaction.logs) { + if (logs.length === 0) { return false; } - for (const log of transaction.logs) { + for (const log of logs) { if ( log.address !== ENS_ADDRESSES.registrarV2 && log.address !== ENS_ADDRESSES.registrarV3 @@ -49,9 +54,10 @@ export const detect = (transaction: Transaction): boolean => { // Contextualize for mined txs export const generate = (transaction: Transaction): Transaction => { - if (!transaction.logs) return transaction; + const logs = grabLogsFromTransaction(transaction); + if (logs.length === 0) return transaction; - for (const log of transaction.logs) { + for (const log of logs) { if ( log.address !== ENS_ADDRESSES.registrarV2 && log.address !== ENS_ADDRESSES.registrarV3 diff --git a/src/contextualizers/protocol/farcaster/bundler.ts b/src/contextualizers/protocol/farcaster/bundler.ts index fd4e85b2..60fcda9a 100644 --- a/src/contextualizers/protocol/farcaster/bundler.ts +++ b/src/contextualizers/protocol/farcaster/bundler.ts @@ -7,7 +7,11 @@ import { Transaction, } from '../../../types'; import { FarcasterContracts } from './constants'; -import { decodeTransactionInput, decodeLog } from '../../../helpers/utils'; +import { + decodeTransactionInput, + decodeLog, + grabLogsFromTransaction, +} from '../../../helpers/utils'; // Contextualizer for the Bundler contract: // https://github.com/farcasterxyz/contracts/blob/main/src/interfaces/IBundler.sol @@ -43,6 +47,7 @@ export const generate = (transaction: Transaction): Transaction => { ); if (!decoded) return transaction; + const logs = grabLogsFromTransaction(transaction); const caller = transaction.from; switch (decoded.functionName) { @@ -59,7 +64,7 @@ export const generate = (transaction: Transaction): Transaction => { // Capture FID let fid = ''; if (transaction.receipt?.status) { - const registerLog = transaction.logs?.find((log) => { + const registerLog = logs.find((log) => { return log.address === FarcasterContracts.IdRegistry.address; }); if (registerLog) { diff --git a/src/contextualizers/protocol/farcaster/idGateway.ts b/src/contextualizers/protocol/farcaster/idGateway.ts index 21d926d6..a859aea2 100644 --- a/src/contextualizers/protocol/farcaster/idGateway.ts +++ b/src/contextualizers/protocol/farcaster/idGateway.ts @@ -5,7 +5,11 @@ import { Transaction, } from '../../../types'; import { FarcasterContracts } from './constants'; -import { decodeLog, decodeTransactionInput } from '../../../helpers/utils'; +import { + decodeLog, + decodeTransactionInput, + grabLogsFromTransaction, +} from '../../../helpers/utils'; // Contextualizer for the IdGateway contract: // https://github.com/farcasterxyz/contracts/blob/main/src/interfaces/IIdGateway.sol @@ -39,10 +43,12 @@ export const generate = (transaction: Transaction): Transaction => { ); if (!decoded) return transaction; + const logs = grabLogsFromTransaction(transaction); + // Capture FID let fid = ''; if (transaction.receipt?.status) { - const registerLog = transaction.logs?.find((log) => { + const registerLog = logs.find((log) => { return log.address === FarcasterContracts.IdRegistry.address; }); if (registerLog) { diff --git a/src/contextualizers/protocol/frenpet/gameplay.ts b/src/contextualizers/protocol/frenpet/gameplay.ts index 304d2889..9950da42 100644 --- a/src/contextualizers/protocol/frenpet/gameplay.ts +++ b/src/contextualizers/protocol/frenpet/gameplay.ts @@ -11,7 +11,11 @@ import { ERC721Asset, FrenpetContextActionEnum, } from '../../../types'; -import { decodeFunction, decodeLog } from '../../../helpers/utils'; +import { + decodeFunction, + decodeLog, + grabLogsFromTransaction, +} from '../../../helpers/utils'; export const contextualize = (transaction: Transaction): Transaction => { const isFrenPet = detect(transaction); @@ -33,6 +37,8 @@ export const detect = (transaction: Transaction): boolean => { // Contextualize for mined txs export const generate = (transaction: Transaction): Transaction => { + const logs = grabLogsFromTransaction(transaction); + switch (transaction.sigHash) { case '0x715488b0': { // buyAccessory(uint256,uint256) @@ -122,18 +128,18 @@ export const generate = (transaction: Transaction): Transaction => { tokenId: (parsed.args[1] as bigint).toString(), }; if (transaction.receipt?.status) { - if (!transaction.logs || transaction.logs?.length) { + if (logs.length === 0) { return transaction; } const parsedLog = decodeLog( parseAbi(abi), - transaction.logs[0]?.data as Hex, + logs[0]?.data as Hex, [ - transaction.logs[0]?.topic0, - transaction.logs[0]?.topic1, - transaction.logs[0]?.topic2, - transaction.logs[0]?.topic3, + logs[0]?.topic0, + logs[0]?.topic1, + logs[0]?.topic2, + logs[0]?.topic3, ] as EventLogTopics, ); if (!parsedLog) return transaction; @@ -359,17 +365,17 @@ export const generate = (transaction: Transaction): Transaction => { }, }; } else { - if (!transaction || !transaction.logs?.length) { + if (!transaction || logs.length === 0) { return transaction; } const parsedLog = decodeLog( parseAbi(abi), - transaction.logs[0]?.data as Hex, + logs[0]?.data as Hex, [ - transaction.logs[0]?.topic0, - transaction.logs[0]?.topic1, - transaction.logs[0]?.topic2, - transaction.logs[0]?.topic3, + logs[0]?.topic0, + logs[0]?.topic1, + logs[0]?.topic2, + logs[0]?.topic3, ] as EventLogTopics, ); if (!parsedLog) return transaction; @@ -468,8 +474,8 @@ export const generate = (transaction: Transaction): Transaction => { }; if (transaction.receipt?.status) { if ( - transaction.logs && - transaction.logs?.filter( + logs && + logs.filter( (log) => log.topic0 === '0x8d02746aaac19768ccd257b3b666918a78b779c9f3d243bf3720313655a28004', @@ -494,7 +500,7 @@ export const generate = (transaction: Transaction): Transaction => { }, }; } else { - const attackLogs = transaction.logs?.filter( + const attackLogs = logs.filter( (log) => log.topic0 === '0xcf2d586a11b0df2dc974a66369ad4e68566a0635fd2448e810592eac3d3bedae', // Attack(uint256 attacker, uint256 winner, uint256 loser, uint256 scoresWon) diff --git a/src/contextualizers/protocol/friendTech/detect.ts b/src/contextualizers/protocol/friendTech/detect.ts index e72866f2..0437331b 100644 --- a/src/contextualizers/protocol/friendTech/detect.ts +++ b/src/contextualizers/protocol/friendTech/detect.ts @@ -1,9 +1,11 @@ +import { grabLogsFromTransaction } from '../../../helpers/utils'; import { Transaction } from '../../../types'; import { FRIEND_TECH_ADDRESSES } from './constants'; export const detect = (transaction: Transaction): boolean => { + const logs = grabLogsFromTransaction(transaction); /** implement your detection logic */ - if (transaction.to !== FRIEND_TECH_ADDRESSES || !transaction.logs) { + if (transaction.to !== FRIEND_TECH_ADDRESSES || logs.length === 0) { return false; } // buyShares(address sharesSubject, uint256 amount) diff --git a/src/contextualizers/protocol/friendTech/friendTech.ts b/src/contextualizers/protocol/friendTech/friendTech.ts index 23e121c6..cd9ef576 100644 --- a/src/contextualizers/protocol/friendTech/friendTech.ts +++ b/src/contextualizers/protocol/friendTech/friendTech.ts @@ -6,7 +6,11 @@ import { Transaction, } from '../../../types'; import { ABIs } from './constants'; -import { decodeTransactionInput, decodeLog } from '../../../helpers/utils'; +import { + decodeTransactionInput, + decodeLog, + grabLogsFromTransaction, +} from '../../../helpers/utils'; import { detect } from './detect'; export const contextualize = (transaction: Transaction): Transaction => { @@ -18,6 +22,7 @@ export const contextualize = (transaction: Transaction): Transaction => { // Contextualize for txs export const generate = (transaction: Transaction): Transaction => { + const logs = grabLogsFromTransaction(transaction); // Failed transaction if (!transaction.receipt?.status) { // buyShares(address sharesSubject, uint256 amount) @@ -71,9 +76,9 @@ export const generate = (transaction: Transaction): Transaction => { // buyShares(address sharesSubject, uint256 amount) if (transaction.sigHash === '0x6945b123') { try { - if (!transaction.logs) return transaction; + if (logs.length === 0) return transaction; - const log = transaction.logs[0]; + const log = logs[0]; const parsedLog = decodeLog( ABIs.FriendTech, log.data as Hex, @@ -156,9 +161,9 @@ export const generate = (transaction: Transaction): Transaction => { // sellShares(address sharesSubject, uint256 amount) if (transaction.sigHash === '0xb51d0534') { try { - if (!transaction.logs) return transaction; + if (logs.length === 0) return transaction; - const log = transaction.logs[0]; + const log = logs[0]; const parsedLog = decodeLog( ABIs.FriendTech, log.data as Hex, diff --git a/src/contextualizers/protocol/highlight/highlight.ts b/src/contextualizers/protocol/highlight/highlight.ts index 01019e5c..34731b95 100644 --- a/src/contextualizers/protocol/highlight/highlight.ts +++ b/src/contextualizers/protocol/highlight/highlight.ts @@ -1,7 +1,7 @@ import { Abi, Hex } from 'viem'; import { AssetType, EventLogTopics, Transaction } from '../../../types'; import { MINT_MANAGER_ABI, MINT_MANAGER_CONTRACT } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; import { generate as erc721Generate } from '../../heuristics/erc721Mint/erc721Mint'; import { generate as erc1155Generate } from '../../heuristics/erc1155Mint/erc1155Mint'; @@ -39,7 +39,7 @@ export const generate = (transaction: Transaction): Transaction => { transaction.context.summaries.en.title = 'Highlight'; // check if mint with rewards - const logs = transaction.logs ?? []; + const logs = grabLogsFromTransaction(transaction); let decodedLog; for (const log of logs) { decodedLog = decodeLog( diff --git a/src/contextualizers/protocol/nouns/auctionHouse.ts b/src/contextualizers/protocol/nouns/auctionHouse.ts index bfd2a173..93f58f0a 100644 --- a/src/contextualizers/protocol/nouns/auctionHouse.ts +++ b/src/contextualizers/protocol/nouns/auctionHouse.ts @@ -6,7 +6,11 @@ import { Transaction, } from '../../../types'; import { NounsContracts, ABIs } from './constants'; -import { decodeLog, decodeTransactionInput } from '../../../helpers/utils'; +import { + decodeLog, + decodeTransactionInput, + grabLogsFromTransaction, +} from '../../../helpers/utils'; export const contextualize = (transaction: Transaction): Transaction => { const isNouns = detect(transaction); @@ -58,6 +62,8 @@ export const generate = (transaction: Transaction): Transaction => { if (!decoded) return transaction; + const logs = grabLogsFromTransaction(transaction); + switch (decoded.functionName) { case 'createBid': { transaction.context = { @@ -97,7 +103,7 @@ export const generate = (transaction: Transaction): Transaction => { let nounId = ''; let winner = ''; - const registerLog = transaction.logs?.find((log) => { + const registerLog = logs.find((log) => { try { const decoded = decodeLog( ABIs.NounsAuctionHouse, diff --git a/src/contextualizers/protocol/nouns/daoLogic.ts b/src/contextualizers/protocol/nouns/daoLogic.ts index 66187ca3..5f43a0a2 100644 --- a/src/contextualizers/protocol/nouns/daoLogic.ts +++ b/src/contextualizers/protocol/nouns/daoLogic.ts @@ -5,7 +5,11 @@ import { Transaction, } from '../../../types'; import { NounsContracts, ABIs } from './constants'; -import { decodeLog, decodeTransactionInput } from '../../../helpers/utils'; +import { + decodeLog, + decodeTransactionInput, + grabLogsFromTransaction, +} from '../../../helpers/utils'; const translateSupport = (support: number) => { if (support === 0) return NounsGovernorActionEnum.VOTED_AGAINST; @@ -77,6 +81,7 @@ export const generate = (transaction: Transaction): Transaction => { ABIs.NounsDAOLogic, ); if (!decoded) return transaction; + const logs = grabLogsFromTransaction(transaction); switch (decoded.functionName) { case 'propose': { @@ -84,7 +89,7 @@ export const generate = (transaction: Transaction): Transaction => { let proposalId: bigint = BigInt(0); - const registerLog = transaction.logs?.find((log) => { + const registerLog = logs.find((log) => { try { const decoded = decodeLog( ABIs.NounsDAOLogic, @@ -155,7 +160,7 @@ export const generate = (transaction: Transaction): Transaction => { let proposalId: bigint = BigInt(0); - const registerLog = transaction.logs?.find((log) => { + const registerLog = logs.find((log) => { try { const decoded = decodeLog( ABIs.NounsDAOLogic, @@ -290,7 +295,7 @@ export const generate = (transaction: Transaction): Transaction => { let voter: string = ''; - const registerLog = transaction.logs?.find((log) => { + const registerLog = logs.find((log) => { try { const decoded = decodeLog( ABIs.NounsDAOLogic, diff --git a/src/contextualizers/protocol/nounsBuilder/auction.ts b/src/contextualizers/protocol/nounsBuilder/auction.ts index dd08e113..c5015695 100644 --- a/src/contextualizers/protocol/nounsBuilder/auction.ts +++ b/src/contextualizers/protocol/nounsBuilder/auction.ts @@ -8,7 +8,11 @@ import { } from '../../../types'; import { ABIs, NOUNS_BUILDER_INSTANCES } from './constants'; import { NounsContracts } from '../nouns/constants'; -import { decodeLog, decodeTransactionInput } from '../../../helpers/utils'; +import { + decodeLog, + decodeTransactionInput, + grabLogsFromTransaction, +} from '../../../helpers/utils'; const daoByAuctionAuctionHouseContract = (address: string) => { return NOUNS_BUILDER_INSTANCES.find((v) => v.auctionHouse === address); @@ -60,6 +64,7 @@ export const generate = (transaction: Transaction): Transaction => { ); if (!decoded) return transaction; + const logs = grabLogsFromTransaction(transaction); switch (decoded.functionName) { case 'createBid': { @@ -131,7 +136,7 @@ export const generate = (transaction: Transaction): Transaction => { let tokenId = ''; let winner = ''; - const registerLog = transaction.logs?.find((log) => { + const registerLog = logs.find((log) => { try { const decoded = decodeLog( ABIs.IAuction, diff --git a/src/contextualizers/protocol/nounsBuilder/governor.ts b/src/contextualizers/protocol/nounsBuilder/governor.ts index 6af7852d..6fb39809 100644 --- a/src/contextualizers/protocol/nounsBuilder/governor.ts +++ b/src/contextualizers/protocol/nounsBuilder/governor.ts @@ -12,7 +12,11 @@ import { NounsBuilderInstance, } from './constants'; import { NounsContracts } from '../nouns/constants'; -import { decodeLog, decodeTransactionInput } from '../../../helpers/utils'; +import { + decodeLog, + decodeTransactionInput, + grabLogsFromTransaction, +} from '../../../helpers/utils'; const translateSupport = (support: bigint) => { if (support === 0n) return NounsGovernorActionEnum.VOTED_AGAINST; @@ -89,6 +93,7 @@ export const generate = (transaction: Transaction): Transaction => { if (!transaction.to) return transaction; const dao = daoByAuctionGovernorContract(transaction.to); + const logs = grabLogsFromTransaction(transaction); const getDynamicVariables = ( proposalId: string, @@ -122,7 +127,7 @@ export const generate = (transaction: Transaction): Transaction => { const description = decoded.args[3]; let proposalId = ''; - const registerLog = transaction.logs?.find((log) => { + const registerLog = logs.find((log) => { try { const decoded = decodeLog( ABIs.IGovernor, @@ -271,7 +276,7 @@ export const generate = (transaction: Transaction): Transaction => { case 'execute': { let proposalId = ''; - const registerLog = transaction.logs?.find((log) => { + const registerLog = logs.find((log) => { try { const decoded = decodeLog( ABIs.IGovernor, diff --git a/src/contextualizers/protocol/rodeo/rodeo.ts b/src/contextualizers/protocol/rodeo/rodeo.ts index 4b5081da..5da7a2f6 100644 --- a/src/contextualizers/protocol/rodeo/rodeo.ts +++ b/src/contextualizers/protocol/rodeo/rodeo.ts @@ -4,7 +4,7 @@ import { MULTI_TOKEN_DROP_MARKET_ABI, MULTI_TOKEN_DROP_MARKET_CONTRACT, } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; import { generate as erc721Generate } from '../../heuristics/erc721Mint/erc721Mint'; import { generate as erc1155Generate } from '../../heuristics/erc1155Mint/erc1155Mint'; @@ -17,8 +17,7 @@ export const contextualize = (transaction: Transaction): Transaction => { export const detect = (transaction: Transaction): boolean => { // check if there is 'MintFromFixedPriceSale' log emitted - const logs = - transaction.logs && transaction.logs.length > 0 ? transaction.logs : []; + const logs = grabLogsFromTransaction(transaction); const mintFromFixedPriceSaleLog = findMintFromFixedPriceSaleLog(logs); if (!mintFromFixedPriceSaleLog) return false; @@ -40,8 +39,7 @@ export const generate = (transaction: Transaction): Transaction => { transaction.context.summaries.category = 'PROTOCOL_1'; transaction.context.summaries.en.title = 'Rodeo'; - const logs = - transaction.logs && transaction.logs.length > 0 ? transaction.logs : []; + const logs = grabLogsFromTransaction(transaction); const mintFromFixedPriceSaleLog = findMintFromFixedPriceSaleLog(logs); if (!mintFromFixedPriceSaleLog) return transaction; const decodedLog = decodeLog( diff --git a/src/contextualizers/protocol/skyoneer/destination.ts b/src/contextualizers/protocol/skyoneer/destination.ts index 73b56f95..04aff9f0 100644 --- a/src/contextualizers/protocol/skyoneer/destination.ts +++ b/src/contextualizers/protocol/skyoneer/destination.ts @@ -1,6 +1,7 @@ import { decodeLog, decodeTransactionInput, + grabLogsFromTransaction, processAssetTransfers, } from '../../../helpers/utils'; import { CHAIN_IDS } from '../../../helpers/constants'; @@ -35,9 +36,10 @@ export function detect(transaction: Transaction): boolean { return false; } // check logs - if (!transaction.logs) return false; + const logs = grabLogsFromTransaction(transaction); + if (logs.length === 0) return false; - for (const log of transaction.logs) { + for (const log of logs) { if (log.address !== PACK_ACTIVATION_DESTINATION_CONTRACT) continue; const decoded = decodeLog(PACK_ACTIVATION_DESTINATION_ABI, log.data, [ @@ -56,8 +58,9 @@ export function detect(transaction: Transaction): boolean { } export function generate(transaction: Transaction): Transaction { + const logs = grabLogsFromTransaction(transaction); if ( - !transaction.logs || + logs.length === 0 || transaction.chainId !== CHAIN_IDS.gold || !transaction.assetTransfers || !transaction.netAssetTransfers @@ -81,7 +84,7 @@ export function generate(transaction: Transaction): Transaction { // decode ActivatedStarterPackOnDestination event let activatedStarterPackOnDestinationDecoded, mintedPlotPackActivateDecoded; // const gameMintedTokenDecoded: any[] = []; - for (const log of transaction.logs) { + for (const log of logs) { const decoded = decodeLog(PACK_ACTIVATION_DESTINATION_ABI, log.data, [ log.topic0, log.topic1, diff --git a/src/contextualizers/protocol/skyoneer/plotAction.ts b/src/contextualizers/protocol/skyoneer/plotAction.ts index 9bb8f6e0..5644a4cb 100644 --- a/src/contextualizers/protocol/skyoneer/plotAction.ts +++ b/src/contextualizers/protocol/skyoneer/plotAction.ts @@ -5,7 +5,11 @@ import { AssetType, } from '../../../types'; import { PLOT_ACTION_CONTRACT_ADDRESS, PLOT_ACTION_ABI } from './constants'; -import { decodeLog, processAssetTransfers } from '../../../helpers/utils'; +import { + decodeLog, + grabLogsFromTransaction, + processAssetTransfers, +} from '../../../helpers/utils'; import { CHAIN_IDS } from '../../../helpers/constants'; export function contextualize(transaction: Transaction): Transaction { @@ -24,9 +28,10 @@ export function detect(transaction: Transaction): boolean { * and it also serves to decouple the logic, thereby simplifying the testing process */ // check logs - if (!transaction.logs) return false; + const logs = grabLogsFromTransaction(transaction); + if (logs.length === 0) return false; - for (const log of transaction.logs) { + for (const log of logs) { if (log.address !== PLOT_ACTION_CONTRACT_ADDRESS) continue; const decoded = decodeLog(PLOT_ACTION_ABI, log.data, [ @@ -51,8 +56,9 @@ export function detect(transaction: Transaction): boolean { } export function generate(transaction: Transaction): Transaction { + const logs = grabLogsFromTransaction(transaction); if ( - !transaction.logs || + logs.length === 0 || transaction.chainId !== CHAIN_IDS.gold || !transaction.assetTransfers || !transaction.netAssetTransfers @@ -65,7 +71,7 @@ export function generate(transaction: Transaction): Transaction { ); let decoded; - for (const log of transaction.logs) { + for (const log of logs) { if (log.address !== PLOT_ACTION_CONTRACT_ADDRESS) continue; decoded = decodeLog(PLOT_ACTION_ABI, log.data, [ diff --git a/src/contextualizers/protocol/skyoneer/source.ts b/src/contextualizers/protocol/skyoneer/source.ts index 466d73e8..b5de11ed 100644 --- a/src/contextualizers/protocol/skyoneer/source.ts +++ b/src/contextualizers/protocol/skyoneer/source.ts @@ -7,7 +7,7 @@ import { PACK_ACTIVATION_SOURCE_CONTRACT, PACK_ACTIVATION_SOURCE_ABI, } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; export function contextualize(transaction: Transaction): Transaction { const isPackActivationSource = detect(transaction); @@ -25,9 +25,10 @@ export function detect(transaction: Transaction): boolean { * and it also serves to decouple the logic, thereby simplifying the testing process */ // check logs - if (!transaction.logs) return false; + const logs = grabLogsFromTransaction(transaction); + if (logs.length === 0) return false; - for (const log of transaction.logs) { + for (const log of logs) { if (log.address !== PACK_ACTIVATION_SOURCE_CONTRACT) continue; const decoded = decodeLog(PACK_ACTIVATION_SOURCE_ABI, log.data, [ @@ -46,11 +47,12 @@ export function detect(transaction: Transaction): boolean { } export function generate(transaction: Transaction): Transaction { - if (!transaction.logs || !transaction.chainId) return transaction; + const logs = grabLogsFromTransaction(transaction); + if (logs.length === 0 || !transaction.chainId) return transaction; // decode ActivatedStarterPackOnSource event let decoded; - for (const log of transaction.logs) { + for (const log of logs) { if (log.address !== PACK_ACTIVATION_SOURCE_CONTRACT) continue; decoded = decodeLog(PACK_ACTIVATION_SOURCE_ABI, log.data, [ diff --git a/src/contextualizers/protocol/uniswapV3/uniswapV3Pair.ts b/src/contextualizers/protocol/uniswapV3/uniswapV3Pair.ts index 31d3f367..c94aedb6 100644 --- a/src/contextualizers/protocol/uniswapV3/uniswapV3Pair.ts +++ b/src/contextualizers/protocol/uniswapV3/uniswapV3Pair.ts @@ -7,7 +7,7 @@ import { Transaction, } from '../../../types'; import { UNISWAP_V3_PAIR_ABI, UNIVERSAL_ROUTERS } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; export const contextualize = (transaction: Transaction): Transaction => { const isSwap = detect(transaction); @@ -18,8 +18,8 @@ export const contextualize = (transaction: Transaction): Transaction => { export const detect = (transaction: Transaction): boolean => { // check logs - const logs = transaction.logs; - if (!logs) return false; + const logs = grabLogsFromTransaction(transaction); + if (logs.length === 0) return false; for (const log of logs) { const decoded = decodeLog( @@ -35,14 +35,15 @@ export const detect = (transaction: Transaction): boolean => { // Contextualize for mined txs export const generate = (transaction: Transaction): Transaction => { + const logs = grabLogsFromTransaction(transaction); if ( !transaction.netAssetTransfers || - !transaction.logs || + logs.length === 0 || !transaction.chainId ) return transaction; let decoded; - for (const log of transaction.logs) { + for (const log of logs) { decoded = decodeLog( UNISWAP_V3_PAIR_ABI as Abi, log.data as Hex, diff --git a/src/contextualizers/protocol/zoraCreator/zoraCreator.ts b/src/contextualizers/protocol/zoraCreator/zoraCreator.ts index 257cfe3c..c150d9ff 100644 --- a/src/contextualizers/protocol/zoraCreator/zoraCreator.ts +++ b/src/contextualizers/protocol/zoraCreator/zoraCreator.ts @@ -5,7 +5,7 @@ import { PROTOCOL_REWARDS_CONTRACT, REWARDS_DEPOSIT_TOPIC, } from './constants'; -import { decodeLog } from '../../../helpers/utils'; +import { decodeLog, grabLogsFromTransaction } from '../../../helpers/utils'; import { generate as erc721Generate } from '../../heuristics/erc721Mint/erc721Mint'; import { generate as erc1155Generate } from '../../heuristics/erc1155Mint/erc1155Mint'; @@ -18,8 +18,7 @@ export const contextualize = (transaction: Transaction): Transaction => { export const detect = (transaction: Transaction): boolean => { // check if there is 'RewardsDeposit' log emitted - const logs = - transaction.logs && transaction.logs.length > 0 ? transaction.logs : []; + const logs = grabLogsFromTransaction(transaction); const rewardsDepositLog = logs.find( (log) => log.topic0 === REWARDS_DEPOSIT_TOPIC && @@ -32,6 +31,7 @@ export const detect = (transaction: Transaction): boolean => { // Contextualize for mined txs export const generate = (transaction: Transaction): Transaction => { + const logs = grabLogsFromTransaction(transaction); // detect as heuristic erc721 or erc1155 mint transaction = erc721Generate(transaction); if (transaction.context?.summaries?.en.title !== 'NFT Mint') { @@ -44,8 +44,6 @@ export const generate = (transaction: Transaction): Transaction => { transaction.context.summaries.category = 'PROTOCOL_1'; transaction.context.summaries.en.title = 'Zora'; - const logs = - transaction.logs && transaction.logs.length > 0 ? transaction.logs : []; const rewardsDepositLog = logs.find( (log) => log.topic0 === REWARDS_DEPOSIT_TOPIC, ); diff --git a/src/helpers/utils.ts b/src/helpers/utils.ts index bfd538b0..f6f71b43 100644 --- a/src/helpers/utils.ts +++ b/src/helpers/utils.ts @@ -23,6 +23,7 @@ import { ETHAssetTransfer, ERC20AssetTransfer, ERC20Asset, + Log, } from '../types'; const VALID_CHARS = @@ -497,3 +498,23 @@ export const addAssetTransfersToContext = ( return transaction; }; + +export const grabLogsFromTransaction = (transaction: Transaction): Log[] => { + if (transaction.logs) return transaction.logs; + + if (transaction.receipt?.logs) { + return transaction.receipt.logs.map((log) => { + return { + address: log.address, + topics: log.topics, + data: log.data, + topic0: log.topics?.[0], + topic1: log.topics?.[1], + topic2: log.topics?.[2], + topic3: log.topics?.[3], + } as Log; + }); + } + + return []; +}; From 668f10cc754422b1f1661b7aad93d0fec9556199 Mon Sep 17 00:00:00 2001 From: ponyjackal Date: Fri, 26 Jul 2024 09:47:23 -0700 Subject: [PATCH 2/5] fix: friendTech detection --- src/contextualizers/protocol/friendTech/detect.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/contextualizers/protocol/friendTech/detect.ts b/src/contextualizers/protocol/friendTech/detect.ts index 0437331b..81ca051e 100644 --- a/src/contextualizers/protocol/friendTech/detect.ts +++ b/src/contextualizers/protocol/friendTech/detect.ts @@ -1,11 +1,9 @@ -import { grabLogsFromTransaction } from '../../../helpers/utils'; import { Transaction } from '../../../types'; import { FRIEND_TECH_ADDRESSES } from './constants'; export const detect = (transaction: Transaction): boolean => { - const logs = grabLogsFromTransaction(transaction); /** implement your detection logic */ - if (transaction.to !== FRIEND_TECH_ADDRESSES || logs.length === 0) { + if (transaction.to !== FRIEND_TECH_ADDRESSES) { return false; } // buyShares(address sharesSubject, uint256 amount) From 79ba08a6e85257cd1f968c522dabe3aeeb653ff2 Mon Sep 17 00:00:00 2001 From: ponyjackal Date: Fri, 26 Jul 2024 11:01:30 -0700 Subject: [PATCH 3/5] feat: add unit test for raw transactions with logs in receipt --- src/contextualizers/contextualizer.spec.ts | 15 + .../protocol/ens/registrar.spec.ts | 16 + .../ensRegistrar-raw-0xb14b4771.json | 1042 +++++++++++++ .../registrarWithConfig-raw-0x5d31a49e.json | 1388 +++++++++++++++++ 4 files changed, 2461 insertions(+) create mode 100644 src/contextualizers/test/transactions/ensRegistrar-raw-0xb14b4771.json create mode 100644 src/contextualizers/test/transactions/registrarWithConfig-raw-0x5d31a49e.json diff --git a/src/contextualizers/contextualizer.spec.ts b/src/contextualizers/contextualizer.spec.ts index f1f0d879..22f8b9b1 100644 --- a/src/contextualizers/contextualizer.spec.ts +++ b/src/contextualizers/contextualizer.spec.ts @@ -48,6 +48,9 @@ import ensBulkRenew0x25add712 from './test/transactions/ensBulkRenew-0x25add712. import skyoneerPlotAction0x9436b659 from './test/transactions/skyoneerPlotAction-0x9436b659.json'; import skyoneerPlotAction0x9bb5a737 from './test/transactions/skyoneerPlotAction-0x9bb5a737.json'; import skyoneerPlotAction0x496c6309 from './test/transactions/skyoneerPlotAction-0x496c6309.json'; +// untransformed transactions +import registrarWithConfigRaw0x5d31a49e from './test/transactions/registrarWithConfig-raw-0x5d31a49e.json'; +import ensRegistrarRaw0xb14b4771 from './test/transactions/ensRegistrar-raw-0xb14b4771.json'; describe('ContextualizerService', () => { describe('Detect transactions correctly', () => { @@ -255,5 +258,17 @@ describe('ContextualizerService', () => { ); expect(plotAction3.context?.summaries?.en.title).toBe('Skyoneer'); }); + + it('Should detect raw transactions', () => { + const ens1 = contextualizer.contextualize( + ensRegistrarRaw0xb14b4771 as unknown as Transaction, + ); + expect(ens1.context?.summaries?.en.title).toBe('ENS'); + + const ens2 = contextualizer.contextualize( + registrarWithConfigRaw0x5d31a49e as unknown as Transaction, + ); + expect(ens2.context?.summaries?.en.title).toBe('ENS'); + }); }); }); diff --git a/src/contextualizers/protocol/ens/registrar.spec.ts b/src/contextualizers/protocol/ens/registrar.spec.ts index 8654dbac..e8206095 100644 --- a/src/contextualizers/protocol/ens/registrar.spec.ts +++ b/src/contextualizers/protocol/ens/registrar.spec.ts @@ -7,6 +7,7 @@ import ens0xea1b4ab6 from '../../test/transactions/ens-0xea1b4ab6.json'; import ensBulkRenew0x25add712 from '../../test/transactions/ensBulkRenew-0x25add712.json'; import registrarWithConfig0x5d31a49e from '../../test/transactions/registrarWithConfig-0x5d31a49e.json'; import ensRegistrar0xb14b4771 from '../../test/transactions/ensRegistrar-0xb14b4771.json'; +import ensRegistrarRaw0xb14b4771 from '../../test/transactions/ensRegistrar-raw-0xb14b4771.json'; describe('ENS Registrar', () => { it('Should detect ens registrar', () => { @@ -28,6 +29,11 @@ describe('ENS Registrar', () => { ensRegistrar0xb14b4771 as unknown as Transaction, ); expect(ensRegistrar3).toBe(true); + + const ensRegistrar4 = detect( + ensRegistrarRaw0xb14b4771 as unknown as Transaction, + ); + expect(ensRegistrar4).toBe(true); }); it('Should generate ens context', () => { @@ -81,6 +87,16 @@ describe('ENS Registrar', () => { '0x53c40473dcdfd927c4201ccfe24e314a7d7c3584 REGISTERED lyricist.eth with an expiration of 2025-03-15', ); expect(containsBigInt(registrar1.context)).toBe(false); + + const registrar2 = generate( + ensRegistrarRaw0xb14b4771 as unknown as Transaction, + ); + expect(registrar2.context?.summaries?.en.title).toBe('ENS'); + const desc5 = contextSummary(registrar1.context); + expect(desc5).toBe( + '0x53c40473dcdfd927c4201ccfe24e314a7d7c3584 REGISTERED lyricist.eth with an expiration of 2025-03-15', + ); + expect(containsBigInt(registrar2.context)).toBe(false); }); it('Should not detect as ens registrar', () => { diff --git a/src/contextualizers/test/transactions/ensRegistrar-raw-0xb14b4771.json b/src/contextualizers/test/transactions/ensRegistrar-raw-0xb14b4771.json new file mode 100644 index 00000000..7338bdd2 --- /dev/null +++ b/src/contextualizers/test/transactions/ensRegistrar-raw-0xb14b4771.json @@ -0,0 +1,1042 @@ +{ + "_id": "65f344fdf69c26841eaee307", + "hash": "0xb14b535bbb582f396e52b5f165b8a96f028d6cd9cf1c762419560634acc34771", + "chainId": 1, + "assetTransfers": [ + { + "from": "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "to": "0x00000000008794027c69c26d2a048dbec09de67c", + "type": "eth", + "value": "1638565744096891" + }, + { + "from": "0x00000000008794027c69c26d2a048dbec09de67c", + "to": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "type": "eth", + "value": "9937421904850475945" + }, + { + "asset": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "from": "0x9f4c07a862dfc60323e5b8dc656511502ad6e0d1", + "to": "0x0000000000000000000000000000000000000000", + "tokenId": "84626784014278145841329853376030965554255987151788428515226573591006897301645", + "type": "erc721" + }, + { + "asset": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "from": "0x0000000000000000000000000000000000000000", + "to": "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "tokenId": "84626784014278145841329853376030965554255987151788428515226573591006897301645", + "type": "erc721" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x00000000008794027c69c26d2a048dbec09de67c", + "type": "eth", + "value": "9936121455847224444" + }, + { + "from": "0x00000000008794027c69c26d2a048dbec09de67c", + "to": "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "type": "eth", + "value": "78026940195090" + } + ], + "attributes": [ + { + "key": "blockNumber", + "value": 19435080 + }, + { + "key": "chainId", + "value": 1 + }, + { + "key": "from", + "value": "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584" + }, + { + "key": "parties", + "value": [ + "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "0x00000000008794027c69c26d2a048dbec09de67c", + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "0xcf7fe2e614f568989869f4aade060f4eb8a105be", + "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419", + "0xe62b71cf983019bff55bc83b48601ce8419650cc", + "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "0x9f4c07a862dfc60323e5b8dc656511502ad6e0d1", + "0x0000000000000000000000000000000000000000", + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-84626784014278145841329853376030965554255987151788428515226573591006897301645" + ] + }, + { + "key": "sigHash", + "value": "0xad144a94" + }, + { + "key": "timestamp", + "value": 1710441695 + }, + { + "key": "to", + "value": "0x00000000008794027c69c26d2a048dbec09de67c" + }, + { + "key": "value", + "value": 0.001638565744096891 + }, + { + "key": "ethTransactors", + "value": [ + "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "0x00000000008794027c69c26d2a048dbec09de67c", + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5" + ] + }, + { + "key": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85Transactors", + "value": [ + "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "0x9f4c07a862dfc60323e5b8dc656511502ad6e0d1" + ] + }, + { + "key": "eth", + "value": [0.001560538803901801, 0.0002600898006503, 0.001300449003251501] + }, + { + "key": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "value": [1e-18] + } + ], + "baseFeePerGas": 49660845250, + "blockHash": "0xa492ab2f1d02f8743f1122d2098b5821b37edb5ea8cc71b9933d95dfd0b42173", + "blockNumber": 19435080, + "burntFees": "0", + "decode": { + "fragment": { + "type": "function", + "inputs": [ + { + "name": "", + "type": "bytes[]", + "baseType": "array", + "indexed": null, + "components": null, + "arrayLength": -1, + "arrayChildren": { + "name": "", + "type": "bytes", + "baseType": "bytes", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + } + ], + "name": "register", + "constant": false, + "outputs": [], + "stateMutability": "nonpayable", + "payable": false, + "gas": null + }, + "name": "register", + "args": [ + "0x85f6d155000000000000000000000000000000000000000000000000000000000000008000000000000000000000000053c40473dcdfd927c4201ccfe24e314a7d7c35840000000000000000000000000000000000000000000000000000000001e18558799faa801b1ee0a7ff59e3f345c808ca5461e050b23f7c8acfdac56887dc1a0500000000000000000000000000000000000000000000000000000000000000086c79726963697374000000000000000000000000000000000000000000000000" + ], + "signature": "register(bytes[])", + "selector": "0xad144a94", + "value": "0" + }, + "fork": "shanghai", + "from": "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "gas": 171179, + "gasPrice": "51669863497", + "input": "0xad144a9400000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c485f6d155000000000000000000000000000000000000000000000000000000000000008000000000000000000000000053c40473dcdfd927c4201ccfe24e314a7d7c35840000000000000000000000000000000000000000000000000000000001e18558799faa801b1ee0a7ff59e3f345c808ca5461e050b23f7c8acfdac56887dc1a0500000000000000000000000000000000000000000000000000000000000000086c7972696369737400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "internalSigHashes": [ + { + "from": "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "to": "0x00000000008794027c69c26d2a048dbec09de67c", + "sigHash": "0xad144a94" + }, + { + "from": "0x00000000008794027c69c26d2a048dbec09de67c", + "to": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "sigHash": "0x85f6d155" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "sigHash": "0x96e494e8" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "sigHash": "0xd6e4fa86" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0xcf7fe2e614f568989869f4aade060f4eb8a105be", + "sigHash": "0x50e9a715" + }, + { + "from": "0xcf7fe2e614f568989869f4aade060f4eb8a105be", + "to": "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419", + "sigHash": "0x50d25bcd" + }, + { + "from": "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419", + "to": "0xe62b71cf983019bff55bc83b48601ce8419650cc", + "sigHash": "0x50d25bcd" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "sigHash": "0xfca247ac" + }, + { + "from": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "to": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "sigHash": "0x02571be3" + }, + { + "from": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "to": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "sigHash": "0x06ab5923" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x00000000008794027c69c26d2a048dbec09de67c", + "sigHash": "0x" + }, + { + "from": "0x00000000008794027c69c26d2a048dbec09de67c", + "to": "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "sigHash": "0x" + } + ], + "isoTimestamp": "2024-03-14T18:41:35.000Z", + "minerFees": "8064580624748263", + "netAssetTransfers": { + "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584": { + "received": [ + { + "asset": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "id": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-84626784014278145841329853376030965554255987151788428515226573591006897301645", + "tokenId": "84626784014278145841329853376030965554255987151788428515226573591006897301645", + "type": "erc721" + } + ], + "sent": [ + { + "asset": "eth", + "id": "eth", + "type": "eth", + "value": "1560538803901801" + } + ] + }, + "0x00000000008794027c69c26d2a048dbec09de67c": { + "received": [ + { + "asset": "eth", + "id": "eth", + "type": "eth", + "value": "260089800650300" + } + ], + "sent": [] + }, + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5": { + "received": [ + { + "asset": "eth", + "id": "eth", + "type": "eth", + "value": "1300449003251501" + } + ], + "sent": [] + }, + "0x9f4c07a862dfc60323e5b8dc656511502ad6e0d1": { + "received": [], + "sent": [ + { + "asset": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "id": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-84626784014278145841329853376030965554255987151788428515226573591006897301645", + "tokenId": "84626784014278145841329853376030965554255987151788428515226573591006897301645", + "type": "erc721", + "imageUrl": "https://api.reservoir.tools/redirect/tokens/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85:84626784014278145841329853376030965554255987151788428515226573591006897301645/image/v1?imageSize=small" + } + ] + } + }, + "nonce": 1722, + "parties": [ + "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "0x00000000008794027c69c26d2a048dbec09de67c", + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "0xcf7fe2e614f568989869f4aade060f4eb8a105be", + "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419", + "0xe62b71cf983019bff55bc83b48601ce8419650cc", + "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "0x9f4c07a862dfc60323e5b8dc656511502ad6e0d1", + "0x0000000000000000000000000000000000000000", + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-84626784014278145841329853376030965554255987151788428515226573591006897301645" + ], + "r": "0x9d1a46e8d2ce23e1b14e6c346ecaa8bec961cc174481d0df2a8b843a96356767", + "receipt": { + "blockHash": "0xa492ab2f1d02f8743f1122d2098b5821b37edb5ea8cc71b9933d95dfd0b42173", + "blockNumber": 19435080, + "contractAddress": null, + "cumulativeGasUsed": 2044190, + "effectiveGasPrice": 51669863497, + "from": "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "gasUsed": 156079, + "logsBloom": "0x00000000000008000000000000100000000400000000000000000000100000000000000000000002000000000000000000000000000010000000000000100000000000000000000000000008000000000000002000001000000000000000200000000000020040000000000000000800000000000000000000000010000000000000010000000008000000000000000004000000000000000000004040000000000000000000040000804000010000000000000000000000000000240000000000000002000000000000000000004000000000000000000000000000040020000000000000000004000000000100000000000000000020000040000000002002", + "status": true, + "to": "0x00000000008794027c69c26d2a048dbec09de67c", + "transactionHash": "0xb14b535bbb582f396e52b5f165b8a96f028d6cd9cf1c762419560634acc34771", + "transactionIndex": 37, + "type": "0x0", + "logs": [ + { + "_id": "65f344fd2eee10c4c3169696", + "chainId": 1, + "logIndex": 46, + "transactionHash": "0xb14b535bbb582f396e52b5f165b8a96f028d6cd9cf1c762419560634acc34771", + "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "blockHash": "0xa492ab2f1d02f8743f1122d2098b5821b37edb5ea8cc71b9933d95dfd0b42173", + "blockNumber": 19435080, + "data": "0x", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "from", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "to", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "tokenId", + "type": "uint256", + "baseType": "uint256", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "Transfer", + "anonymous": false + }, + "name": "Transfer", + "signature": "Transfer(address,address,uint256)", + "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "args": [ + "0x9f4c07a862dfc60323e5b8dc656511502ad6e0d1", + "0x0000000000000000000000000000000000000000", + "84626784014278145841329853376030965554255987151788428515226573591006897301645" + ] + }, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000009f4c07a862dfc60323e5b8dc656511502ad6e0d1", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0xbb190ff5c95c4a186c1da7b44737bd424192d3204130b7c648d3311102a0e88d" + ], + "transactionIndex": 37 + }, + { + "_id": "65f344fd2eee10c4c31696a1", + "chainId": 1, + "logIndex": 47, + "transactionHash": "0xb14b535bbb582f396e52b5f165b8a96f028d6cd9cf1c762419560634acc34771", + "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "blockHash": "0xa492ab2f1d02f8743f1122d2098b5821b37edb5ea8cc71b9933d95dfd0b42173", + "blockNumber": 19435080, + "data": "0x", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "from", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "to", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "tokenId", + "type": "uint256", + "baseType": "uint256", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "Transfer", + "anonymous": false + }, + "name": "Transfer", + "signature": "Transfer(address,address,uint256)", + "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "args": [ + "0x0000000000000000000000000000000000000000", + "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "84626784014278145841329853376030965554255987151788428515226573591006897301645" + ] + }, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000053c40473dcdfd927c4201ccfe24e314a7d7c3584", + "0xbb190ff5c95c4a186c1da7b44737bd424192d3204130b7c648d3311102a0e88d" + ], + "transactionIndex": 37 + }, + { + "_id": "65f344fd2eee10c4c31696a5", + "chainId": 1, + "logIndex": 48, + "transactionHash": "0xb14b535bbb582f396e52b5f165b8a96f028d6cd9cf1c762419560634acc34771", + "address": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "blockHash": "0xa492ab2f1d02f8743f1122d2098b5821b37edb5ea8cc71b9933d95dfd0b42173", + "blockNumber": 19435080, + "data": "0x00000000000000000000000053c40473dcdfd927c4201ccfe24e314a7d7c3584", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "node", + "type": "bytes32", + "baseType": "bytes32", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "label", + "type": "bytes32", + "baseType": "bytes32", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "owner", + "type": "address", + "baseType": "address", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "NewOwner", + "anonymous": false + }, + "name": "NewOwner", + "signature": "NewOwner(bytes32,bytes32,address)", + "topic": "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82", + "args": [ + "0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae", + "0xbb190ff5c95c4a186c1da7b44737bd424192d3204130b7c648d3311102a0e88d", + "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584" + ] + }, + "removed": false, + "topics": [ + "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82", + "0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae", + "0xbb190ff5c95c4a186c1da7b44737bd424192d3204130b7c648d3311102a0e88d" + ], + "transactionIndex": 37 + }, + { + "_id": "65f344fd2eee10c4c31696aa", + "chainId": 1, + "logIndex": 49, + "transactionHash": "0xb14b535bbb582f396e52b5f165b8a96f028d6cd9cf1c762419560634acc34771", + "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "blockHash": "0xa492ab2f1d02f8743f1122d2098b5821b37edb5ea8cc71b9933d95dfd0b42173", + "blockNumber": 19435080, + "data": "0x0000000000000000000000000000000000000000000000000000000067d4ca37", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "id", + "type": "uint256", + "baseType": "uint256", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "owner", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "expires", + "type": "uint256", + "baseType": "uint256", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "NameRegistered", + "anonymous": false + }, + "name": "NameRegistered", + "signature": "NameRegistered(uint256,address,uint256)", + "topic": "0xb3d987963d01b2f68493b4bdb130988f157ea43070d4ad840fee0466ed9370d9", + "args": [ + "84626784014278145841329853376030965554255987151788428515226573591006897301645", + "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "1741998647" + ] + }, + "removed": false, + "topics": [ + "0xb3d987963d01b2f68493b4bdb130988f157ea43070d4ad840fee0466ed9370d9", + "0xbb190ff5c95c4a186c1da7b44737bd424192d3204130b7c648d3311102a0e88d", + "0x00000000000000000000000053c40473dcdfd927c4201ccfe24e314a7d7c3584" + ], + "transactionIndex": 37 + }, + { + "_id": "65f344fd2eee10c4c31696b4", + "chainId": 1, + "logIndex": 50, + "transactionHash": "0xb14b535bbb582f396e52b5f165b8a96f028d6cd9cf1c762419560634acc34771", + "address": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "blockHash": "0xa492ab2f1d02f8743f1122d2098b5821b37edb5ea8cc71b9933d95dfd0b42173", + "blockNumber": 19435080, + "data": "0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000049ec060e3272d0000000000000000000000000000000000000000000000000000000067d4ca3700000000000000000000000000000000000000000000000000000000000000086c79726963697374000000000000000000000000000000000000000000000000", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "name", + "type": "string", + "baseType": "string", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "label", + "type": "bytes32", + "baseType": "bytes32", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "owner", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "cost", + "type": "uint256", + "baseType": "uint256", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "expires", + "type": "uint256", + "baseType": "uint256", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "NameRegistered", + "anonymous": false + }, + "name": "NameRegistered", + "signature": "NameRegistered(string,bytes32,address,uint256,uint256)", + "topic": "0xca6abbe9d7f11422cb6ca7629fbf6fe9efb1c621f71ce8f02b9f2a230097404f", + "args": [ + "lyricist", + "0xbb190ff5c95c4a186c1da7b44737bd424192d3204130b7c648d3311102a0e88d", + "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584", + "1300449003251501", + "1741998647" + ] + }, + "removed": false, + "topics": [ + "0xca6abbe9d7f11422cb6ca7629fbf6fe9efb1c621f71ce8f02b9f2a230097404f", + "0xbb190ff5c95c4a186c1da7b44737bd424192d3204130b7c648d3311102a0e88d", + "0x00000000000000000000000053c40473dcdfd927c4201ccfe24e314a7d7c3584" + ], + "transactionIndex": 37 + } + ] + }, + "s": "0x247c84f31764241987c170c185db03249b1e2f52714fde5fe723f8dbe55383fd", + "sigHash": "0xad144a94", + "timestamp": 1710441695, + "to": "0x00000000008794027c69c26d2a048dbec09de67c", + "transactionFee": "8064580624748263", + "transactionIndex": 37, + "type": 0, + "v": "0x25", + "value": "1638565744096891", + "contractsCreated": [], + "enrichedParties": { + "0x53c40473dcdfd927c4201ccfe24e314a7d7c3584": [ + { + "chainId": 1, + "isContract": false, + "ens": "dowjonez.eth", + "ensNew": { + "handle": "dowjonez.eth", + "avatar": "https://assets.airstack.xyz/image/nft/nNBFvZ6wvuIHqDzTFi5pM/pM0Q1IAUgJRNTJrw7f4s297kITduHwptnTfSZ25+vw29XRxavmFl5esndZ6g8h4kBSERgauqnkPUbv2RpB2pKOK8iyurRqjS5dsDpJ2roxW8dNm2v5c9HqSMJuxGaYWuN3w4zG3BdhedU02wrtSzE=/medium.svg" + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + } + } + ], + "0x00000000008794027c69c26d2a048dbec09de67c": [ + { + "chainId": 1, + "label": { + "public": null + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5": [ + { + "chainId": 1, + "label": { + "public": "ENS: ETH Registrar Controller" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 5, + "label": { + "public": "ENS: ETH Registrar Controller" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85": [ + { + "chainId": 1, + "label": { + "public": "ENS: Base Registrar Implementation" + }, + "isContract": true, + "tokenStandard": "erc721", + "imgUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", + "decimals": "0", + "symbol": "ENS", + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 5, + "label": { + "public": "ENS: Base Registrar Implementation" + }, + "isContract": true, + "tokenStandard": "erc721", + "imgUrl": "https://lh3.googleusercontent.com/AmzOv-xluKH2sWPCxHR1Fk5pyReN3w0ihzTSIZN0ymoJmnBiJUdzoFeOk0rXINGcfjC3nxmbPoPudNGWrtH2TxJfLpskJe7i6xt_", + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 11155111, + "label": { + "public": "ENS: Base Registrar Implementation" + }, + "isContract": true, + "tokenStandard": "erc721", + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0xcf7fe2e614f568989869f4aade060f4eb8a105be": [ + { + "chainId": 1, + "label": { + "public": null + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419": [ + { + "chainId": 1, + "label": { + "public": null + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0xe62b71cf983019bff55bc83b48601ce8419650cc": [ + { + "chainId": 1, + "label": { + "public": null + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e": [ + { + "chainId": 1, + "label": { + "public": "ENS: Registry with Fallback" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 5, + "label": { + "public": "ENS: Registry with Fallback" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 11155111, + "label": { + "public": "ENS: Registry with Fallback" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0x9f4c07a862dfc60323e5b8dc656511502ad6e0d1": [ + { + "chainId": 1, + "isContract": false, + "ens": "lowlylyricist.eth", + "ensNew": { + "handle": "lowlylyricist.eth", + "avatar": "https://assets.airstack.xyz/image/nft/nNBFvZ6wvuIHqDzTFi5pM/pM0Q1IAUgJRNTJrw7f4s1WfaSHEBZWkLoRbgki/0rnazTP65BcS+Z5MP1q7Ckv5dGRsQ8klsahPMp0RhQvdkoqCVODOTG1w+EgqZ//F25VdndBOXAIv+HiGFniKy1WQMGdIYEWiYe7CO4Ekg+wA0M=/medium.svg" + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + } + } + ], + "0x0000000000000000000000000000000000000000": [ + { + "chainId": 5, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 11155111, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 10, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 8453, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ] + }, + "assetsEnriched": { + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-84626784014278145841329853376030965554255987151788428515226573591006897301645": { + "asset": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "id": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-84626784014278145841329853376030965554255987151788428515226573591006897301645", + "tokenId": "84626784014278145841329853376030965554255987151788428515226573591006897301645", + "type": "erc721", + "imageUrl": "https://api.reservoir.tools/redirect/tokens/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85:84626784014278145841329853376030965554255987151788428515226573591006897301645/image/v1?imageSize=small" + } + } +} diff --git a/src/contextualizers/test/transactions/registrarWithConfig-raw-0x5d31a49e.json b/src/contextualizers/test/transactions/registrarWithConfig-raw-0x5d31a49e.json new file mode 100644 index 00000000..152caca9 --- /dev/null +++ b/src/contextualizers/test/transactions/registrarWithConfig-raw-0x5d31a49e.json @@ -0,0 +1,1388 @@ +{ + "_id": "65fa2911204f7d7e0c2b564f", + "chainId": 1, + "hash": "0x5d314433c868a39cbbcea125e2d74d7dc81faaecb7e99cbb0641520c7a00a49e", + "accessList": [], + "assetTransfers": [ + { + "from": "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "to": "0x705bfbcfccde554e11df213bf6d463ea00dd57cc", + "type": "eth", + "value": "3202014432442397" + }, + { + "asset": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "from": "0x0000000000000000000000000000000000000000", + "to": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "tokenId": "69850855629816732170399405866153548438970164502664876397550371324647874360664", + "type": "erc721" + }, + { + "asset": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "tokenId": "69850855629816732170399405866153548438970164502664876397550371324647874360664", + "type": "erc721" + }, + { + "from": "0x705bfbcfccde554e11df213bf6d463ea00dd57cc", + "to": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "type": "eth", + "value": "3170311319249899" + }, + { + "from": "0x705bfbcfccde554e11df213bf6d463ea00dd57cc", + "to": "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "type": "eth", + "value": "31703113192498" + } + ], + "attributes": [ + { + "key": "blockNumber", + "value": 19472255 + }, + { + "key": "chainId", + "value": 1 + }, + { + "key": "from", + "value": "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9" + }, + { + "key": "parties", + "value": [ + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "0x705bfbcfccde554e11df213bf6d463ea00dd57cc", + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "0xcf7fe2e614f568989869f4aade060f4eb8a105be", + "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419", + "0xe62b71cf983019bff55bc83b48601ce8419650cc", + "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "0x231b0ee14048e9dccd1d247744d114a4eb5e8e63", + "0x0000000000000000000000000000000000000000", + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-69850855629816732170399405866153548438970164502664876397550371324647874360664" + ] + }, + { + "key": "sigHash", + "value": "0xf7a16963" + }, + { + "key": "timestamp", + "value": 1710893291 + }, + { + "key": "to", + "value": "0x705bfbcfccde554e11df213bf6d463ea00dd57cc" + }, + { + "key": "value", + "value": 0.003202014432442397 + }, + { + "key": "ethTransactors", + "value": [ + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5" + ] + }, + { + "key": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85Transactors", + "value": [ + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "0x0000000000000000000000000000000000000000" + ] + }, + { + "key": "eth", + "value": [0.003170311319249899] + }, + { + "key": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "value": [1e-18] + } + ], + "baseFeePerGas": 30385060359, + "blockHash": "0x8122ca8b31389c118a5f9763e50a5d6c08be283cf5add5a0abbb271d8d059751", + "blockNumber": 19472255, + "burntFees": "8987992009373277", + "decode": { + "fragment": { + "type": "function", + "inputs": [ + { + "name": "", + "type": "string", + "baseType": "string", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "", + "type": "address", + "baseType": "address", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "", + "type": "uint256", + "baseType": "uint256", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "", + "type": "bytes32", + "baseType": "bytes32", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "", + "type": "address", + "baseType": "address", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "", + "type": "address", + "baseType": "address", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "registerWithConfig", + "constant": false, + "outputs": [], + "stateMutability": "nonpayable", + "payable": false, + "gas": null + }, + "name": "registerWithConfig", + "args": [ + "sunnysd", + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "63113904", + "0x90bc5734f225c2f8718b1b437423b7a48e7928fb1281bc8c61b52dc26cebc413", + "0x231b0ee14048e9dccd1d247744d114a4eb5e8e63", + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9" + ], + "signature": "registerWithConfig(string,address,uint256,bytes32,address,address)", + "selector": "0xf7a16963", + "value": "0" + }, + "fork": "shanghai", + "from": "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "gas": 393058, + "gasPrice": "30394006104", + "input": "0xf7a1696300000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000ed53c087b05d1360e78f8a3e4dc59f8d342296f90000000000000000000000000000000000000000000000000000000003c30ab090bc5734f225c2f8718b1b437423b7a48e7928fb1281bc8c61b52dc26cebc413000000000000000000000000231b0ee14048e9dccd1d247744d114a4eb5e8e63000000000000000000000000ed53c087b05d1360e78f8a3e4dc59f8d342296f9000000000000000000000000000000000000000000000000000000000000000773756e6e79736400000000000000000000000000000000000000000000000000", + "internalSigHashes": [ + { + "from": "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "to": "0x705bfbcfccde554e11df213bf6d463ea00dd57cc", + "sigHash": "0xf7a16963" + }, + { + "from": "0x705bfbcfccde554e11df213bf6d463ea00dd57cc", + "to": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "sigHash": "0x83e7f6ff" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "sigHash": "0xd6e4fa86" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0xcf7fe2e614f568989869f4aade060f4eb8a105be", + "sigHash": "0x50e9a715" + }, + { + "from": "0xcf7fe2e614f568989869f4aade060f4eb8a105be", + "to": "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419", + "sigHash": "0x50d25bcd" + }, + { + "from": "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419", + "to": "0xe62b71cf983019bff55bc83b48601ce8419650cc", + "sigHash": "0x50d25bcd" + }, + { + "from": "0x705bfbcfccde554e11df213bf6d463ea00dd57cc", + "to": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "sigHash": "0xf7a16963" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "sigHash": "0x96e494e8" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "sigHash": "0xd6e4fa86" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0xcf7fe2e614f568989869f4aade060f4eb8a105be", + "sigHash": "0x50e9a715" + }, + { + "from": "0xcf7fe2e614f568989869f4aade060f4eb8a105be", + "to": "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419", + "sigHash": "0x50d25bcd" + }, + { + "from": "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419", + "to": "0xe62b71cf983019bff55bc83b48601ce8419650cc", + "sigHash": "0x50d25bcd" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "sigHash": "0xfca247ac" + }, + { + "from": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "to": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "sigHash": "0x02571be3" + }, + { + "from": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "to": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "sigHash": "0x06ab5923" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "sigHash": "0xddf7fcb0" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "sigHash": "0x3f15457f" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "sigHash": "0x1896f70a" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x231b0ee14048e9dccd1d247744d114a4eb5e8e63", + "sigHash": "0xd5fa2b00" + }, + { + "from": "0x231b0ee14048e9dccd1d247744d114a4eb5e8e63", + "to": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "sigHash": "0x02571be3" + }, + { + "from": "0x231b0ee14048e9dccd1d247744d114a4eb5e8e63", + "to": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "sigHash": "0x02571be3" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "sigHash": "0x28ed4f6c" + }, + { + "from": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "to": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "sigHash": "0x02571be3" + }, + { + "from": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "to": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "sigHash": "0x06ab5923" + }, + { + "from": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "to": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "sigHash": "0x23b872dd" + }, + { + "from": "0x705bfbcfccde554e11df213bf6d463ea00dd57cc", + "to": "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "sigHash": "0x" + } + ], + "isoTimestamp": "2024-03-20T00:08:11.000Z", + "maxFeePerGas": "40892225668", + "maxPriorityFeePerGas": "8945745", + "minerFees": "2646178208235", + "netAssetTransfers": { + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9": { + "received": [ + { + "asset": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "id": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-69850855629816732170399405866153548438970164502664876397550371324647874360664", + "tokenId": "69850855629816732170399405866153548438970164502664876397550371324647874360664", + "type": "erc721" + } + ], + "sent": [ + { + "asset": "eth", + "id": "eth", + "type": "eth", + "value": "3170311319249899" + } + ] + }, + "0x0000000000000000000000000000000000000000": { + "received": [], + "sent": [ + { + "asset": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "id": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-69850855629816732170399405866153548438970164502664876397550371324647874360664", + "tokenId": "69850855629816732170399405866153548438970164502664876397550371324647874360664", + "type": "erc721", + "imageUrl": "https://api.reservoir.tools/redirect/tokens/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85:69850855629816732170399405866153548438970164502664876397550371324647874360664/image/v1?imageSize=small" + } + ] + }, + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5": { + "received": [ + { + "asset": "eth", + "id": "eth", + "type": "eth", + "value": "3170311319249899" + } + ], + "sent": [] + } + }, + "nonce": 2584, + "parties": [ + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "0x705bfbcfccde554e11df213bf6d463ea00dd57cc", + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "0xcf7fe2e614f568989869f4aade060f4eb8a105be", + "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419", + "0xe62b71cf983019bff55bc83b48601ce8419650cc", + "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "0x231b0ee14048e9dccd1d247744d114a4eb5e8e63", + "0x0000000000000000000000000000000000000000", + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-69850855629816732170399405866153548438970164502664876397550371324647874360664" + ], + "r": "0x5988e5ba165c43bf48b86bd39bd5a78d181c6377fad551e694f1aef95d638eb3", + "receipt": { + "blockHash": "0x8122ca8b31389c118a5f9763e50a5d6c08be283cf5add5a0abbb271d8d059751", + "blockNumber": 19472255, + "contractAddress": null, + "cumulativeGasUsed": 18232186, + "effectiveGasPrice": 30394006104, + "from": "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "gasUsed": 295803, + "logsBloom": "0x0000000000000800000000004010410000000000000000000000000010000000000000000000000000000000000000000000000080001000000000000012000000000000000000004000000800000008000000000c0010000000000000000000000000000200400000000000000008000000000000000000000000100000000000000100000000000000000200000000040000000000000800000041400000000000000000020400088040000500000000040000000000000000000400000000000000020008000000000000000040000000001000000004000000000000a0000000000000000000000000000104000000000000000000000040000200002002", + "status": true, + "to": "0x705bfbcfccde554e11df213bf6d463ea00dd57cc", + "transactionHash": "0x5d314433c868a39cbbcea125e2d74d7dc81faaecb7e99cbb0641520c7a00a49e", + "transactionIndex": 258, + "type": "0x2", + "logs": [ + { + "_id": "65fa291078d27a82c32940aa", + "chainId": 1, + "logIndex": 328, + "transactionHash": "0x5d314433c868a39cbbcea125e2d74d7dc81faaecb7e99cbb0641520c7a00a49e", + "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "blockHash": "0x8122ca8b31389c118a5f9763e50a5d6c08be283cf5add5a0abbb271d8d059751", + "blockNumber": 19472255, + "data": "0x", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "from", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "to", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "tokenId", + "type": "uint256", + "baseType": "uint256", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "Transfer", + "anonymous": false + }, + "name": "Transfer", + "signature": "Transfer(address,address,uint256)", + "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "args": [ + "0x0000000000000000000000000000000000000000", + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "69850855629816732170399405866153548438970164502664876397550371324647874360664" + ] + }, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "0x9a6e2ee95436469b5ec2b190d884519fbb76686c7eeafba962ff501ecfddf558" + ], + "transactionIndex": 258 + }, + { + "_id": "65fa291078d27a82c32940b9", + "chainId": 1, + "logIndex": 329, + "transactionHash": "0x5d314433c868a39cbbcea125e2d74d7dc81faaecb7e99cbb0641520c7a00a49e", + "address": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "blockHash": "0x8122ca8b31389c118a5f9763e50a5d6c08be283cf5add5a0abbb271d8d059751", + "blockNumber": 19472255, + "data": "0x000000000000000000000000283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "node", + "type": "bytes32", + "baseType": "bytes32", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "label", + "type": "bytes32", + "baseType": "bytes32", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "owner", + "type": "address", + "baseType": "address", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "NewOwner", + "anonymous": false + }, + "name": "NewOwner", + "signature": "NewOwner(bytes32,bytes32,address)", + "topic": "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82", + "args": [ + "0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae", + "0x9a6e2ee95436469b5ec2b190d884519fbb76686c7eeafba962ff501ecfddf558", + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5" + ] + }, + "removed": false, + "topics": [ + "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82", + "0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae", + "0x9a6e2ee95436469b5ec2b190d884519fbb76686c7eeafba962ff501ecfddf558" + ], + "transactionIndex": 258 + }, + { + "_id": "65fa291078d27a82c32940c5", + "chainId": 1, + "logIndex": 330, + "transactionHash": "0x5d314433c868a39cbbcea125e2d74d7dc81faaecb7e99cbb0641520c7a00a49e", + "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "blockHash": "0x8122ca8b31389c118a5f9763e50a5d6c08be283cf5add5a0abbb271d8d059751", + "blockNumber": 19472255, + "data": "0x0000000000000000000000000000000000000000000000000000000069bd339b", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "id", + "type": "uint256", + "baseType": "uint256", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "owner", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "expires", + "type": "uint256", + "baseType": "uint256", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "NameRegistered", + "anonymous": false + }, + "name": "NameRegistered", + "signature": "NameRegistered(uint256,address,uint256)", + "topic": "0xb3d987963d01b2f68493b4bdb130988f157ea43070d4ad840fee0466ed9370d9", + "args": [ + "69850855629816732170399405866153548438970164502664876397550371324647874360664", + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "1774007195" + ] + }, + "removed": false, + "topics": [ + "0xb3d987963d01b2f68493b4bdb130988f157ea43070d4ad840fee0466ed9370d9", + "0x9a6e2ee95436469b5ec2b190d884519fbb76686c7eeafba962ff501ecfddf558", + "0x000000000000000000000000283af0b28c62c092c9727f1ee09c02ca627eb7f5" + ], + "transactionIndex": 258 + }, + { + "_id": "65fa291078d27a82c32940cb", + "chainId": 1, + "logIndex": 331, + "transactionHash": "0x5d314433c868a39cbbcea125e2d74d7dc81faaecb7e99cbb0641520c7a00a49e", + "address": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "blockHash": "0x8122ca8b31389c118a5f9763e50a5d6c08be283cf5add5a0abbb271d8d059751", + "blockNumber": 19472255, + "data": "0x000000000000000000000000231b0ee14048e9dccd1d247744d114a4eb5e8e63", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "node", + "type": "bytes32", + "baseType": "bytes32", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "resolver", + "type": "address", + "baseType": "address", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "NewResolver", + "anonymous": false + }, + "name": "NewResolver", + "signature": "NewResolver(bytes32,address)", + "topic": "0x335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0", + "args": [ + "0xa65c40f6bacd4075055475ed7c935aa26f45c2dc5cd0f6e0e47b016ca068f4e7", + "0x231b0ee14048e9dccd1d247744d114a4eb5e8e63" + ] + }, + "removed": false, + "topics": [ + "0x335721b01866dc23fbee8b6b2c7b1e14d6f05c28cd35a2c934239f94095602a0", + "0xa65c40f6bacd4075055475ed7c935aa26f45c2dc5cd0f6e0e47b016ca068f4e7" + ], + "transactionIndex": 258 + }, + { + "_id": "65fa291078d27a82c32940d5", + "chainId": 1, + "logIndex": 332, + "transactionHash": "0x5d314433c868a39cbbcea125e2d74d7dc81faaecb7e99cbb0641520c7a00a49e", + "address": "0x231b0ee14048e9dccd1d247744d114a4eb5e8e63", + "blockHash": "0x8122ca8b31389c118a5f9763e50a5d6c08be283cf5add5a0abbb271d8d059751", + "blockNumber": 19472255, + "data": "0x000000000000000000000000000000000000000000000000000000000000003c00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000014ed53c087b05d1360e78f8a3e4dc59f8d342296f9000000000000000000000000", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "node", + "type": "bytes32", + "baseType": "bytes32", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "coinType", + "type": "uint256", + "baseType": "uint256", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "newAddress", + "type": "bytes", + "baseType": "bytes", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "AddressChanged", + "anonymous": false + }, + "name": "AddressChanged", + "signature": "AddressChanged(bytes32,uint256,bytes)", + "topic": "0x65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af752", + "args": [ + "0xa65c40f6bacd4075055475ed7c935aa26f45c2dc5cd0f6e0e47b016ca068f4e7", + "60", + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9" + ] + }, + "removed": false, + "topics": [ + "0x65412581168e88a1e60c6459d7f44ae83ad0832e670826c05a4e2476b57af752", + "0xa65c40f6bacd4075055475ed7c935aa26f45c2dc5cd0f6e0e47b016ca068f4e7" + ], + "transactionIndex": 258 + }, + { + "_id": "65fa291078d27a82c32940d9", + "chainId": 1, + "logIndex": 333, + "transactionHash": "0x5d314433c868a39cbbcea125e2d74d7dc81faaecb7e99cbb0641520c7a00a49e", + "address": "0x231b0ee14048e9dccd1d247744d114a4eb5e8e63", + "blockHash": "0x8122ca8b31389c118a5f9763e50a5d6c08be283cf5add5a0abbb271d8d059751", + "blockNumber": 19472255, + "data": "0x000000000000000000000000ed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "node", + "type": "bytes32", + "baseType": "bytes32", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "a", + "type": "address", + "baseType": "address", + "indexed": null, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "AddrChanged", + "anonymous": false + }, + "name": "AddrChanged", + "signature": "AddrChanged(bytes32,address)", + "topic": "0x52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd2", + "args": [ + "0xa65c40f6bacd4075055475ed7c935aa26f45c2dc5cd0f6e0e47b016ca068f4e7", + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9" + ] + }, + "removed": false, + "topics": [ + "0x52d7d861f09ab3d26239d492e8968629f95e9e318cf0b73bfddc441522a15fd2", + "0xa65c40f6bacd4075055475ed7c935aa26f45c2dc5cd0f6e0e47b016ca068f4e7" + ], + "transactionIndex": 258 + }, + { + "_id": "65fa291078d27a82c32940e3", + "chainId": 1, + "logIndex": 334, + "transactionHash": "0x5d314433c868a39cbbcea125e2d74d7dc81faaecb7e99cbb0641520c7a00a49e", + "address": "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e", + "blockHash": "0x8122ca8b31389c118a5f9763e50a5d6c08be283cf5add5a0abbb271d8d059751", + "blockNumber": 19472255, + "data": "0x000000000000000000000000ed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "node", + "type": "bytes32", + "baseType": "bytes32", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "label", + "type": "bytes32", + "baseType": "bytes32", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "owner", + "type": "address", + "baseType": "address", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "NewOwner", + "anonymous": false + }, + "name": "NewOwner", + "signature": "NewOwner(bytes32,bytes32,address)", + "topic": "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82", + "args": [ + "0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae", + "0x9a6e2ee95436469b5ec2b190d884519fbb76686c7eeafba962ff501ecfddf558", + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9" + ] + }, + "removed": false, + "topics": [ + "0xce0457fe73731f824cc272376169235128c118b49d344817417c6d108d155e82", + "0x93cdeb708b7545dc668eb9280176169d1c33cfd8ed6f04690a0bcc88a93fc4ae", + "0x9a6e2ee95436469b5ec2b190d884519fbb76686c7eeafba962ff501ecfddf558" + ], + "transactionIndex": 258 + }, + { + "_id": "65fa291078d27a82c32940e8", + "chainId": 1, + "logIndex": 335, + "transactionHash": "0x5d314433c868a39cbbcea125e2d74d7dc81faaecb7e99cbb0641520c7a00a49e", + "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "blockHash": "0x8122ca8b31389c118a5f9763e50a5d6c08be283cf5add5a0abbb271d8d059751", + "blockNumber": 19472255, + "data": "0x", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "from", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "to", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "tokenId", + "type": "uint256", + "baseType": "uint256", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "Transfer", + "anonymous": false + }, + "name": "Transfer", + "signature": "Transfer(address,address,uint256)", + "topic": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "args": [ + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "69850855629816732170399405866153548438970164502664876397550371324647874360664" + ] + }, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x000000000000000000000000283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "0x000000000000000000000000ed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "0x9a6e2ee95436469b5ec2b190d884519fbb76686c7eeafba962ff501ecfddf558" + ], + "transactionIndex": 258 + }, + { + "_id": "65fa291178d27a82c32940f0", + "chainId": 1, + "logIndex": 336, + "transactionHash": "0x5d314433c868a39cbbcea125e2d74d7dc81faaecb7e99cbb0641520c7a00a49e", + "address": "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5", + "blockHash": "0x8122ca8b31389c118a5f9763e50a5d6c08be283cf5add5a0abbb271d8d059751", + "blockNumber": 19472255, + "data": "0x0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000b4361a002e3eb0000000000000000000000000000000000000000000000000000000069bd339b000000000000000000000000000000000000000000000000000000000000000773756e6e79736400000000000000000000000000000000000000000000000000", + "decode": { + "fragment": { + "type": "event", + "inputs": [ + { + "name": "name", + "type": "string", + "baseType": "string", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "label", + "type": "bytes32", + "baseType": "bytes32", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "owner", + "type": "address", + "baseType": "address", + "indexed": true, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "cost", + "type": "uint256", + "baseType": "uint256", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + }, + { + "name": "expires", + "type": "uint256", + "baseType": "uint256", + "indexed": false, + "components": null, + "arrayLength": null, + "arrayChildren": null + } + ], + "name": "NameRegistered", + "anonymous": false + }, + "name": "NameRegistered", + "signature": "NameRegistered(string,bytes32,address,uint256,uint256)", + "topic": "0xca6abbe9d7f11422cb6ca7629fbf6fe9efb1c621f71ce8f02b9f2a230097404f", + "args": [ + "sunnysd", + "0x9a6e2ee95436469b5ec2b190d884519fbb76686c7eeafba962ff501ecfddf558", + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9", + "3170311319249899", + "1774007195" + ] + }, + "removed": false, + "topics": [ + "0xca6abbe9d7f11422cb6ca7629fbf6fe9efb1c621f71ce8f02b9f2a230097404f", + "0x9a6e2ee95436469b5ec2b190d884519fbb76686c7eeafba962ff501ecfddf558", + "0x000000000000000000000000ed53c087b05d1360e78f8a3e4dc59f8d342296f9" + ], + "transactionIndex": 258 + } + ] + }, + "s": "0x65a5aa7ff689174afa738daec0c7e66827bdd52b38b72614542034e2a5121db0", + "sigHash": "0xf7a16963", + "timestamp": 1710893291, + "to": "0x705bfbcfccde554e11df213bf6d463ea00dd57cc", + "transactionFee": "8990638187581512", + "transactionIndex": 258, + "type": 2, + "v": "0x1", + "value": "3202014432442397", + "contractsCreated": [], + "enrichedParties": { + "0xed53c087b05d1360e78f8a3e4dc59f8d342296f9": [ + { + "chainId": 1, + "isContract": false, + "ens": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + } + } + ], + "0x705bfbcfccde554e11df213bf6d463ea00dd57cc": [ + { + "chainId": 1, + "label": { + "public": null + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 11155111, + "label": { + "public": null + }, + "isContract": true, + "tokenStandard": "erc721", + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0x283af0b28c62c092c9727f1ee09c02ca627eb7f5": [ + { + "chainId": 1, + "label": { + "public": "ENS: ETH Registrar Controller" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 5, + "label": { + "public": "ENS: ETH Registrar Controller" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85": [ + { + "chainId": 1, + "label": { + "public": "ENS: Base Registrar Implementation" + }, + "isContract": true, + "tokenStandard": "erc721", + "imgUrl": "https://i.seadn.io/gae/0cOqWoYA7xL9CkUjGlxsjreSYBdrUBE0c6EO1COG4XE8UeP-Z30ckqUNiL872zHQHQU5MUNMNhfDpyXIP17hRSC5HQ?w=500&auto=format", + "decimals": "0", + "symbol": "ENS", + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 5, + "label": { + "public": "ENS: Base Registrar Implementation" + }, + "isContract": true, + "tokenStandard": "erc721", + "imgUrl": "https://lh3.googleusercontent.com/AmzOv-xluKH2sWPCxHR1Fk5pyReN3w0ihzTSIZN0ymoJmnBiJUdzoFeOk0rXINGcfjC3nxmbPoPudNGWrtH2TxJfLpskJe7i6xt_", + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 11155111, + "label": { + "public": "ENS: Base Registrar Implementation" + }, + "isContract": true, + "tokenStandard": "erc721", + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0xcf7fe2e614f568989869f4aade060f4eb8a105be": [ + { + "chainId": 1, + "label": { + "public": null + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419": [ + { + "chainId": 1, + "label": { + "public": null + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0xe62b71cf983019bff55bc83b48601ce8419650cc": [ + { + "chainId": 1, + "label": { + "public": null + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0x00000000000c2e074ec69a0dfb2997ba6c7d2e1e": [ + { + "chainId": 1, + "label": { + "public": "ENS: Registry with Fallback" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 5, + "label": { + "public": "ENS: Registry with Fallback" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 11155111, + "label": { + "public": "ENS: Registry with Fallback" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0x231b0ee14048e9dccd1d247744d114a4eb5e8e63": [ + { + "chainId": 1, + "label": { + "public": "ENS: Public Resolver" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ], + "0x0000000000000000000000000000000000000000": [ + { + "chainId": 5, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 11155111, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 10, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + }, + { + "chainId": 8453, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "tokenStandard": null, + "imgUrl": null, + "decimals": null, + "symbol": null, + "ensNew": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + }, + "ens": null + } + ] + }, + "assetsEnriched": { + "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-69850855629816732170399405866153548438970164502664876397550371324647874360664": { + "asset": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", + "id": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85-69850855629816732170399405866153548438970164502664876397550371324647874360664", + "tokenId": "69850855629816732170399405866153548438970164502664876397550371324647874360664", + "type": "erc721", + "imageUrl": "https://api.reservoir.tools/redirect/tokens/0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85:69850855629816732170399405866153548438970164502664876397550371324647874360664/image/v1?imageSize=small" + } + } +} From d4243e31603026579e945e7fc862db664a40e6cb Mon Sep 17 00:00:00 2001 From: ponyjackal Date: Fri, 26 Jul 2024 11:42:50 -0700 Subject: [PATCH 4/5] feat: add unit test for nftMint with raw transaction --- src/contextualizers/contextualizer.spec.ts | 6 + .../nft-mint-raw-0xf264bbc2685.json | 885 +++++++++++++ .../test/blocks/zora/17661582_decoded.json | 1106 +++++++++++++++++ 3 files changed, 1997 insertions(+) create mode 100644 src/contextualizers/test/transactions/nft-mint-raw-0xf264bbc2685.json create mode 100644 src/transformers/test/blocks/zora/17661582_decoded.json diff --git a/src/contextualizers/contextualizer.spec.ts b/src/contextualizers/contextualizer.spec.ts index 22f8b9b1..374ee8d0 100644 --- a/src/contextualizers/contextualizer.spec.ts +++ b/src/contextualizers/contextualizer.spec.ts @@ -51,6 +51,7 @@ import skyoneerPlotAction0x496c6309 from './test/transactions/skyoneerPlotAction // untransformed transactions import registrarWithConfigRaw0x5d31a49e from './test/transactions/registrarWithConfig-raw-0x5d31a49e.json'; import ensRegistrarRaw0xb14b4771 from './test/transactions/ensRegistrar-raw-0xb14b4771.json'; +import nftMintRaw0xf264bbc2685 from './test/transactions/nft-mint-raw-0xf264bbc2685.json'; describe('ContextualizerService', () => { describe('Detect transactions correctly', () => { @@ -269,6 +270,11 @@ describe('ContextualizerService', () => { registrarWithConfigRaw0x5d31a49e as unknown as Transaction, ); expect(ens2.context?.summaries?.en.title).toBe('ENS'); + + const nftMint1 = contextualizer.contextualize( + nftMintRaw0xf264bbc2685 as unknown as Transaction, + ); + expect(nftMint1.context?.summaries?.en.title).toBe('NFT Mint'); }); }); }); diff --git a/src/contextualizers/test/transactions/nft-mint-raw-0xf264bbc2685.json b/src/contextualizers/test/transactions/nft-mint-raw-0xf264bbc2685.json new file mode 100644 index 00000000..fc265580 --- /dev/null +++ b/src/contextualizers/test/transactions/nft-mint-raw-0xf264bbc2685.json @@ -0,0 +1,885 @@ +{ + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "chainId": "0x76adf1", + "from": "0xe1D2bd4E0bdd2522671E12fe80c0eAef720B434B", + "gas": 400000, + "gasPrice": "1000253", + "hash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000007", + "nonce": 2695, + "r": "0xaf5c83e9e4a5922e1290189cf395f312e5ac9e8850f9eba7d2b1b40ab1dfb124", + "s": "0x437f59665197a97749b0fdbbea2648fdb1c4624b3b67181ca814d500a56bba53", + "to": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "transactionIndex": 4, + "type": 0, + "v": "0xed5c06", + "value": "999000000000", + "receipt": { + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "contractAddress": null, + "cumulativeGasUsed": 566983, + "effectiveGasPrice": 1000253, + "from": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "gasUsed": 228639, + "l1BaseFeeScalar": "0x4e20", + "l1BlobBaseFee": "0x1", + "l1BlobBaseFeeScalar": "0x9ab40", + "l1Fee": "0xc6b2095bf", + "l1GasPrice": "0x635904ac", + "l1GasUsed": "0x640", + "logs": [ + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 8, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f979" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_2e10629e", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 9, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97a" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_241ccf4c", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 10, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97b" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_f6e86c40", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 11, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97c" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_e0783a99", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 12, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97d" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_0705ad33", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 13, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97e" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_321a39c8", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 14, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97f" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_5c4799f7", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + } + ], + "logsBloom": "0x00000400000000000000000000000000000000000100000000000000400000000000000000000000000000000000000000000000000800000000000000000000000400000000000000000008008000002000000000000000000000000000000000000010020000000000040000000880008000002000000000000010000000000000000000000000000000200000000000000000000000000000000100000000000000000000000000200000000004000000000000100000000000000000000000000002000000000000000000000000000000000000009000000008000020000000000000000000400010000000000200000010000000000200000000200002", + "status": true, + "to": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "type": "0x0" + }, + "traces": [ + { + "action": { + "callType": "call", + "from": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "gas": "0x61a80", + "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000007", + "to": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "value": "0xe8990a4600" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0x37d1f", "output": "0x0" }, + "subtraces": 1, + "traceAddress": [], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionPosition": 4, + "type": "call" + }, + { + "action": { + "callType": "delegatecall", + "from": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "gas": "0x5a66b", + "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000007", + "to": "0xaa20d2b9ee7ee9c7b940f02dfdaf4ecd3c66a341", + "value": "0xe8990a4600" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0x31fde", "output": "0x0" }, + "subtraces": 1, + "traceAddress": [0], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionPosition": 4, + "type": "call" + }, + { + "action": { + "callType": "call", + "from": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "gas": "0x8fc", + "input": "0x", + "to": "0xfb9f360c15a96d9bf3cf48b8aff68f9510da3291", + "value": "0xe8990a4600" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0x0", "output": "0x0" }, + "subtraces": 0, + "traceAddress": [0, 0], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionPosition": 4, + "type": "call" + } + ], + "decoded": { + "signature": "mint(uint256)", + "signature_with_arg_names": "mint(uint256 arg1)", + "name": "mint", + "decoded": [ + { + "internalType": "uint256", + "name": "arg1", + "type": "uint256", + "decoded": "7" + } + ] + }, + "decoded": { + "signature": "mint(uint256)", + "signature_with_arg_names": "mint(uint256 arg1)", + "name": "mint", + "decoded": [ + { + "internalType": "uint256", + "name": "arg1", + "type": "uint256", + "decoded": "7" + } + ] + }, + "pseudoTransactions": [], + "assetTransfers": [ + { + "from": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "to": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "type": "eth", + "value": "999000000000" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "from": "0x0000000000000000000000000000000000000000", + "to": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "tokenId": "63865", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "from": "0x0000000000000000000000000000000000000000", + "to": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "tokenId": "63866", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "from": "0x0000000000000000000000000000000000000000", + "to": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "tokenId": "63867", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "from": "0x0000000000000000000000000000000000000000", + "to": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "tokenId": "63868", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "from": "0x0000000000000000000000000000000000000000", + "to": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "tokenId": "63869", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "from": "0x0000000000000000000000000000000000000000", + "to": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "tokenId": "63870", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "from": "0x0000000000000000000000000000000000000000", + "to": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "tokenId": "63871", + "type": "erc721" + }, + { + "from": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "to": "0xfb9f360c15a96d9bf3cf48b8aff68f9510da3291", + "type": "eth", + "value": "999000000000" + } + ], + "delegateCalls": [ + { + "action": { + "callType": "delegatecall", + "from": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "gas": "0x5a66b", + "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000007", + "to": "0xaa20d2b9ee7ee9c7b940f02dfdaf4ecd3c66a341", + "value": "0xe8990a4600" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { + "gasUsed": "0x31fde", + "output": "0x0" + }, + "subtraces": 1, + "traceAddress": [0], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionPosition": 4, + "type": "call" + } + ], + "errors": [], + "parties": [ + "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "0xaa20d2b9ee7ee9c7b940f02dfdaf4ecd3c66a341", + "0xfb9f360c15a96d9bf3cf48b8aff68f9510da3291", + "0x0000000000000000000000000000000000000000", + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63865", + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63866", + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63867", + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63868", + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63869", + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63870", + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63871" + ], + "internalSigHashes": [ + { + "from": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "to": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "sigHash": "0xa0712d68" + }, + { + "from": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "to": "0xaa20d2b9ee7ee9c7b940f02dfdaf4ecd3c66a341", + "sigHash": "0xa0712d68" + }, + { + "from": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "to": "0xfb9f360c15a96d9bf3cf48b8aff68f9510da3291", + "sigHash": "0x" + } + ], + "netAssetTransfers": { + "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b": { + "received": [ + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63865", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63866", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63867", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63868", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63869", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63870", + "type": "erc721" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63871", + "type": "erc721" + } + ], + "sent": [ + { + "type": "eth", + "value": "999000000000" + } + ] + }, + "0x0000000000000000000000000000000000000000": { + "received": [], + "sent": [ + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63865", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63865/image/v1?imageSize=small" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63866", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63866/image/v1?imageSize=small" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63867", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63867/image/v1?imageSize=small" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63868", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63868/image/v1?imageSize=small" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63869", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63869/image/v1?imageSize=small" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63870", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63870/image/v1?imageSize=small" + }, + { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63871", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63871/image/v1?imageSize=small" + } + ] + }, + "0xfb9f360c15a96d9bf3cf48b8aff68f9510da3291": { + "received": [ + { + "type": "eth", + "value": "999000000000" + } + ], + "sent": [] + } + }, + "pseudotransactions": [], + "contractsCreated": [], + "enrichedParties": { + "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b": [ + { + "chainId": 0, + "isContract": false, + "ensNew": { + "handle": "elsalador.eth", + "avatar": null + }, + "bns": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + } + } + ], + "0x429819842dd13827545a3a7b67e740fb8e5e790a": [ + { + "chainId": 7777777, + "label": { + "public": "Starry Night Reimaginaed" + }, + "isContract": true, + "tokenStandard": "erc721", + "imgUrl": "", + "decimals": "", + "symbol": "STRY", + "ensNew": { + "handle": null, + "avatar": null + }, + "bns": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + } + } + ], + "0xaa20d2b9ee7ee9c7b940f02dfdaf4ecd3c66a341": [ + { + "chainId": 7777777, + "label": { + "public": "" + }, + "isContract": true, + "tokenStandard": "erc721", + "imgUrl": "", + "decimals": 0, + "symbol": "", + "ensNew": { + "handle": null, + "avatar": null + }, + "bns": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + } + } + ], + "0xfb9f360c15a96d9bf3cf48b8aff68f9510da3291": [ + { + "chainId": 0, + "isContract": false, + "ensNew": { + "handle": null, + "avatar": null + }, + "bns": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + } + } + ], + "0x0000000000000000000000000000000000000000": [ + { + "chainId": 11155111, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "imgUrl": "", + "decimals": 0, + "symbol": "", + "ensNew": { + "handle": null, + "avatar": null + }, + "bns": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + } + }, + { + "chainId": 5, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "imgUrl": "", + "decimals": 0, + "symbol": "", + "ensNew": { + "handle": null, + "avatar": null + }, + "bns": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + } + }, + { + "chainId": 10, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "imgUrl": "", + "decimals": 0, + "symbol": "", + "ensNew": { + "handle": null, + "avatar": null + }, + "bns": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + } + }, + { + "chainId": 8453, + "label": { + "public": "Null: 0x000…000" + }, + "isContract": true, + "imgUrl": "", + "decimals": 0, + "symbol": "", + "ensNew": { + "handle": null, + "avatar": null + }, + "bns": { + "handle": null, + "avatar": null + }, + "farcaster": { + "handle": null, + "avatar": null, + "fid": null + } + } + ] + }, + "assetsEnriched": { + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63865": { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63865", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63865/image/v1?imageSize=small" + }, + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63866": { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63866", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63866/image/v1?imageSize=small" + }, + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63867": { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63867", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63867/image/v1?imageSize=small" + }, + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63868": { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63868", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63868/image/v1?imageSize=small" + }, + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63869": { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63869", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63869/image/v1?imageSize=small" + }, + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63870": { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63870", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63870/image/v1?imageSize=small" + }, + "0x429819842dd13827545a3a7b67e740fb8e5e790a-63871": { + "contract": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "tokenId": "63871", + "type": "erc721", + "imageUrl": "https://api-zora.reservoir.tools/redirect/tokens/0x429819842dd13827545a3a7b67e740fb8e5e790a:63871/image/v1?imageSize=small" + } + } +} diff --git a/src/transformers/test/blocks/zora/17661582_decoded.json b/src/transformers/test/blocks/zora/17661582_decoded.json new file mode 100644 index 00000000..821c245c --- /dev/null +++ b/src/transformers/test/blocks/zora/17661582_decoded.json @@ -0,0 +1,1106 @@ +{ + "baseFeePerGas": 253, + "blobGasUsed": "0x0", + "difficulty": "0", + "excessBlobGas": "0x0", + "extraData": "0x", + "gasLimit": 30000000, + "gasUsed": 566983, + "hash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "logsBloom": "0x00020400000000000000000000000000000000000100000000040000400000000000000000000000000000100000000080400002000800000000000000000000400400000000000000000108008000042000000004000000000000008001010000000010020000400c00040000000880008000002000000000000010000000000000000000000002400000300000040000000001002000000000000100000010000000000004002000200000000004000000000000100000000000004000000000000002008000000000000000000000000000000000009000000008000020000000000000000000400812000040000200000010002000400200000000200002", + "miner": "0x4200000000000000000000000000000000000011", + "mixHash": "0xb7979c29754347130965e1fc2f99b4a5b070d8e917897aaae5b0ae584117ea59", + "nonce": "0x0000000000000000", + "number": 17661582, + "parentBeaconBlockRoot": "0x50205a5a2eca0bedd428c85088efd28dcd243ac1546f2faa1a5c3f4335369f45", + "parentHash": "0xa983a792aed6fb35750e34495fc72a3f0c36d1bad28b528c66bf80740fd17be7", + "receiptsRoot": "0xf41b9832830d9ccb6136b18575439b22b2a8afaaef16fa6839e482bf983e0e22", + "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347", + "size": 1361, + "stateRoot": "0x735dbfe10ef10aab983398c198c1a1eefc19c7a850893ad2dd8d128f017dc258", + "timestamp": 1722017003, + "totalDifficulty": "0", + "transactions": [ + { + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "depositReceiptVersion": "0x1", + "from": "0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001", + "gas": 1000000, + "gasPrice": "0", + "hash": "0xa5122cc722366bb3a61988ddcb599d4b953337be5c4cb64b0adc1a9e7b67ae21", + "input": "0x440a5e2000004e200009ab4000000000000000040000000066a3e4a300000000013729bf00000000000000000000000000000000000000000000000000000000635904ac0000000000000000000000000000000000000000000000000000000000000001f572aaa327583bf384f40977726184d950a5027c48d3cb23cfc7d709b4e94476000000000000000000000000625726c858dbf78c0125436c943bf4b4be9d9033", + "mint": "0x0", + "nonce": 17661583, + "r": "0x0", + "s": "0x0", + "sourceHash": "0xb704f655ea21b66cc46ff51b11ef1fbb86b5768eb5aed80c5fe4b84e14d89c2e", + "to": "0x4200000000000000000000000000000000000015", + "transactionIndex": 0, + "type": 126, + "v": "0x0", + "value": "0", + "receipt": { + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "contractAddress": null, + "cumulativeGasUsed": 43839, + "depositNonce": "0x10d7e8f", + "depositReceiptVersion": "0x1", + "effectiveGasPrice": 0, + "from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001", + "gasUsed": 43839, + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": true, + "to": "0x4200000000000000000000000000000000000015", + "transactionHash": "0xa5122cc722366bb3a61988ddcb599d4b953337be5c4cb64b0adc1a9e7b67ae21", + "transactionIndex": 0, + "type": "0x7e" + }, + "traces": [ + { + "action": { + "callType": "call", + "from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001", + "gas": "0xf4240", + "input": "0x440a5e2000004e200009ab4000000000000000040000000066a3e4a300000000013729bf00000000000000000000000000000000000000000000000000000000635904ac0000000000000000000000000000000000000000000000000000000000000001f572aaa327583bf384f40977726184d950a5027c48d3cb23cfc7d709b4e94476000000000000000000000000625726c858dbf78c0125436c943bf4b4be9d9033", + "to": "0x4200000000000000000000000000000000000015", + "value": "0x0" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0xf4240", "output": "0x0" }, + "subtraces": 1, + "traceAddress": [], + "transactionHash": "0xa5122cc722366bb3a61988ddcb599d4b953337be5c4cb64b0adc1a9e7b67ae21", + "transactionPosition": 0, + "type": "call" + }, + { + "action": { + "callType": "delegatecall", + "from": "0x4200000000000000000000000000000000000015", + "gas": "0xe9b75", + "input": "0x440a5e2000004e200009ab4000000000000000040000000066a3e4a300000000013729bf00000000000000000000000000000000000000000000000000000000635904ac0000000000000000000000000000000000000000000000000000000000000001f572aaa327583bf384f40977726184d950a5027c48d3cb23cfc7d709b4e94476000000000000000000000000625726c858dbf78c0125436c943bf4b4be9d9033", + "to": "0x07dbe8500fc591d1852b76fee44d5a05e13097ff", + "value": "0x0" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0x3fac", "output": "0x0" }, + "subtraces": 0, + "traceAddress": [0], + "transactionHash": "0xa5122cc722366bb3a61988ddcb599d4b953337be5c4cb64b0adc1a9e7b67ae21", + "transactionPosition": 0, + "type": "call" + } + ], + "decoded": null + }, + { + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "chainId": "0x76adf1", + "from": "0x740C3DEc04AED70e38509eDB7e95e298Aea2AE1C", + "gas": 67869, + "gasPrice": "3000000", + "hash": "0xcb9f307dcaeaa365e257c24f439877d3f98d0556e755fbc82632ff3789e3a7fe", + "input": "0xd0e30db0", + "nonce": 6, + "r": "0xf3183805c350ffbab23213541b835547c4b94ce6f017d4b79a4879d7a1b6c041", + "s": "0x34caf878d187e248fc628d92729460af4082c0d80ebb2c0754c685a305ad2b2b", + "to": "0x4200000000000000000000000000000000000006", + "transactionIndex": 1, + "type": 0, + "v": "0xed5c06", + "value": "3000000000000000", + "receipt": { + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "contractAddress": null, + "cumulativeGasUsed": 88705, + "effectiveGasPrice": 3000000, + "from": "0x740c3dec04aed70e38509edb7e95e298aea2ae1c", + "gasUsed": 44866, + "l1BaseFeeScalar": "0x4e20", + "l1BlobBaseFee": "0x1", + "l1BlobBaseFeeScalar": "0x9ab40", + "l1Fee": "0xc6b2095bf", + "l1GasPrice": "0x635904ac", + "l1GasUsed": "0x640", + "logs": [ + { + "address": "0x4200000000000000000000000000000000000006", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x000000000000000000000000000000000000000000000000000aa87bee538000", + "logIndex": 0, + "removed": false, + "topics": [ + "0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c", + "0x000000000000000000000000740c3dec04aed70e38509edb7e95e298aea2ae1c" + ], + "transactionHash": "0xcb9f307dcaeaa365e257c24f439877d3f98d0556e755fbc82632ff3789e3a7fe", + "transactionIndex": 1, + "id": "log_254eaf3e", + "decoded": { + "signature": "Deposit(address,uint256)", + "signature_with_arg_names": "Deposit(address indexed user,uint256 amount)", + "name": "Deposit", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address", + "decoded": "0x740c3dec04aed70e38509edb7e95e298aea2ae1c" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256", + "decoded": "3000000000000000" + } + ] + } + } + ], + "logsBloom": "0x00020000000000000000000000000000000000000000000000040000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000008000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000001002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000", + "status": true, + "to": "0x4200000000000000000000000000000000000006", + "transactionHash": "0xcb9f307dcaeaa365e257c24f439877d3f98d0556e755fbc82632ff3789e3a7fe", + "transactionIndex": 1, + "type": "0x0" + }, + "traces": [ + { + "action": { + "callType": "call", + "from": "0x740c3dec04aed70e38509edb7e95e298aea2ae1c", + "gas": "0x1091d", + "input": "0xd0e30db0", + "to": "0x4200000000000000000000000000000000000006", + "value": "0xaa87bee538000" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0xaf42", "output": "0x0" }, + "subtraces": 0, + "traceAddress": [], + "transactionHash": "0xcb9f307dcaeaa365e257c24f439877d3f98d0556e755fbc82632ff3789e3a7fe", + "transactionPosition": 1, + "type": "call" + } + ], + "decoded": { + "signature": "deposit()", + "signature_with_arg_names": "deposit()", + "name": "deposit", + "decoded": [] + } + }, + { + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "chainId": "0x76adf1", + "from": "0xB7B6BB431f84F6A02Aba398A47D718925f996063", + "gas": 21000, + "gasPrice": "2000000", + "hash": "0x26c4d81b181a412e98713ebaa18d4f7a9d8e402cf4d73566ce77e721212d08b0", + "input": "0x", + "nonce": 4, + "r": "0x20c01e000e6ae28a4bb1646518022267c9038ed4d2c05433caea3307200759b7", + "s": "0x4abab1caee12c3b88bd52cc58e728ce92e1899ea143c27886eef03d71929273b", + "to": "0xD383ca0Fa47c5fCe9AdDE78e378796D42B79CE6D", + "transactionIndex": 2, + "type": 0, + "v": "0xed5c05", + "value": "1986373361921587", + "receipt": { + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "contractAddress": null, + "cumulativeGasUsed": 109705, + "effectiveGasPrice": 2000000, + "from": "0xb7b6bb431f84f6a02aba398a47d718925f996063", + "gasUsed": 21000, + "l1BaseFeeScalar": "0x4e20", + "l1BlobBaseFee": "0x1", + "l1BlobBaseFeeScalar": "0x9ab40", + "l1Fee": "0xc6b2095bf", + "l1GasPrice": "0x635904ac", + "l1GasUsed": "0x640", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "status": true, + "to": "0xd383ca0fa47c5fce9adde78e378796d42b79ce6d", + "transactionHash": "0x26c4d81b181a412e98713ebaa18d4f7a9d8e402cf4d73566ce77e721212d08b0", + "transactionIndex": 2, + "type": "0x0" + }, + "traces": [ + { + "action": { + "callType": "call", + "from": "0xb7b6bb431f84f6a02aba398a47d718925f996063", + "gas": "0x5208", + "input": "0x", + "to": "0xd383ca0fa47c5fce9adde78e378796d42b79ce6d", + "value": "0x70e9896a0ee33" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0x5208", "output": "0x0" }, + "subtraces": 0, + "traceAddress": [], + "transactionHash": "0x26c4d81b181a412e98713ebaa18d4f7a9d8e402cf4d73566ce77e721212d08b0", + "transactionPosition": 2, + "type": "call" + } + ] + }, + { + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "chainId": "0x76adf1", + "from": "0x38B8360f0902AC0e5fb34f759D8cdddb3df59FFE", + "gas": 400000, + "gasPrice": "1000253", + "hash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000007", + "nonce": 2700, + "r": "0xb443753d50bcf2cac807ba52d87cdaa69248bd4feee78e4d6996546be7b5e2c0", + "s": "0x6dea97f3226d956192c4fa50298007a769433d73f78ba0227a64ed35a582ad79", + "to": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "transactionIndex": 3, + "type": 0, + "v": "0xed5c06", + "value": "999000000000", + "receipt": { + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "contractAddress": null, + "cumulativeGasUsed": 338344, + "effectiveGasPrice": 1000253, + "from": "0x38b8360f0902ac0e5fb34f759d8cdddb3df59ffe", + "gasUsed": 228639, + "l1BaseFeeScalar": "0x4e20", + "l1BlobBaseFee": "0x1", + "l1BlobBaseFeeScalar": "0x9ab40", + "l1Fee": "0xc6b2095bf", + "l1GasPrice": "0x635904ac", + "l1GasUsed": "0x640", + "logs": [ + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 1, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000038b8360f0902ac0e5fb34f759d8cdddb3df59ffe", + "0x000000000000000000000000000000000000000000000000000000000000f972" + ], + "transactionHash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "transactionIndex": 3, + "id": "log_bb53c5d8", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0x38b8360f0902ac0e5fb34f759d8cdddb3df59ffe" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 2, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000038b8360f0902ac0e5fb34f759d8cdddb3df59ffe", + "0x000000000000000000000000000000000000000000000000000000000000f973" + ], + "transactionHash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "transactionIndex": 3, + "id": "log_79dfe38d", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0x38b8360f0902ac0e5fb34f759d8cdddb3df59ffe" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 3, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000038b8360f0902ac0e5fb34f759d8cdddb3df59ffe", + "0x000000000000000000000000000000000000000000000000000000000000f974" + ], + "transactionHash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "transactionIndex": 3, + "id": "log_3dbf8556", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0x38b8360f0902ac0e5fb34f759d8cdddb3df59ffe" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 4, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000038b8360f0902ac0e5fb34f759d8cdddb3df59ffe", + "0x000000000000000000000000000000000000000000000000000000000000f975" + ], + "transactionHash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "transactionIndex": 3, + "id": "log_19c74607", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0x38b8360f0902ac0e5fb34f759d8cdddb3df59ffe" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 5, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000038b8360f0902ac0e5fb34f759d8cdddb3df59ffe", + "0x000000000000000000000000000000000000000000000000000000000000f976" + ], + "transactionHash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "transactionIndex": 3, + "id": "log_0d489b8d", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0x38b8360f0902ac0e5fb34f759d8cdddb3df59ffe" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 6, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000038b8360f0902ac0e5fb34f759d8cdddb3df59ffe", + "0x000000000000000000000000000000000000000000000000000000000000f977" + ], + "transactionHash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "transactionIndex": 3, + "id": "log_451ab06e", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0x38b8360f0902ac0e5fb34f759d8cdddb3df59ffe" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 7, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000038b8360f0902ac0e5fb34f759d8cdddb3df59ffe", + "0x000000000000000000000000000000000000000000000000000000000000f978" + ], + "transactionHash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "transactionIndex": 3, + "id": "log_3c7ea2ca", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0x38b8360f0902ac0e5fb34f759d8cdddb3df59ffe" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + } + ], + "logsBloom": "0x00000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000080400002000000000000000000000000400400000000000000000108000000040000000000000000000000000001010000000000020000400400000000000800000000000000000000000010000000000000000000000002400000100000040000000000000000000000000000000010000000000004002000200000000000000000000000000000000000004000000000000002008000000000000000000000000000000000000000000000000020000000000000000000000802000040000000000000002000000000000000000000", + "status": true, + "to": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "transactionHash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "transactionIndex": 3, + "type": "0x0" + }, + "traces": [ + { + "action": { + "callType": "call", + "from": "0x38b8360f0902ac0e5fb34f759d8cdddb3df59ffe", + "gas": "0x61a80", + "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000007", + "to": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "value": "0xe8990a4600" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0x37d1f", "output": "0x0" }, + "subtraces": 1, + "traceAddress": [], + "transactionHash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "transactionPosition": 3, + "type": "call" + }, + { + "action": { + "callType": "delegatecall", + "from": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "gas": "0x5a66b", + "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000007", + "to": "0xaa20d2b9ee7ee9c7b940f02dfdaf4ecd3c66a341", + "value": "0xe8990a4600" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0x31fde", "output": "0x0" }, + "subtraces": 1, + "traceAddress": [0], + "transactionHash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "transactionPosition": 3, + "type": "call" + }, + { + "action": { + "callType": "call", + "from": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "gas": "0x8fc", + "input": "0x", + "to": "0xfb9f360c15a96d9bf3cf48b8aff68f9510da3291", + "value": "0xe8990a4600" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0x0", "output": "0x0" }, + "subtraces": 0, + "traceAddress": [0, 0], + "transactionHash": "0x1d6acf7fa1f25de979bf88d3ea9dcf238772ee514f205660e89ab04fb863a53a", + "transactionPosition": 3, + "type": "call" + } + ], + "decoded": { + "signature": "mint(uint256)", + "signature_with_arg_names": "mint(uint256 arg1)", + "name": "mint", + "decoded": [ + { + "internalType": "uint256", + "name": "arg1", + "type": "uint256", + "decoded": "7" + } + ] + } + }, + { + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "chainId": "0x76adf1", + "from": "0xe1D2bd4E0bdd2522671E12fe80c0eAef720B434B", + "gas": 400000, + "gasPrice": "1000253", + "hash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000007", + "nonce": 2695, + "r": "0xaf5c83e9e4a5922e1290189cf395f312e5ac9e8850f9eba7d2b1b40ab1dfb124", + "s": "0x437f59665197a97749b0fdbbea2648fdb1c4624b3b67181ca814d500a56bba53", + "to": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "transactionIndex": 4, + "type": 0, + "v": "0xed5c06", + "value": "999000000000", + "receipt": { + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "contractAddress": null, + "cumulativeGasUsed": 566983, + "effectiveGasPrice": 1000253, + "from": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "gasUsed": 228639, + "l1BaseFeeScalar": "0x4e20", + "l1BlobBaseFee": "0x1", + "l1BlobBaseFeeScalar": "0x9ab40", + "l1Fee": "0xc6b2095bf", + "l1GasPrice": "0x635904ac", + "l1GasUsed": "0x640", + "logs": [ + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 8, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f979" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_2e10629e", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 9, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97a" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_241ccf4c", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 10, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97b" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_f6e86c40", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 11, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97c" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_e0783a99", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 12, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97d" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_0705ad33", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 13, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97e" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_321a39c8", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + }, + { + "address": "0x429819842dD13827545a3a7B67E740Fb8E5e790a", + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "data": "0x", + "logIndex": 14, + "removed": false, + "topics": [ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000e1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "0x000000000000000000000000000000000000000000000000000000000000f97f" + ], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "id": "log_5c4799f7", + "decoded": { + "signature": "Transfer(address,address,uint256)", + "signature_with_arg_names": "Transfer(address indexed from,address indexed to,uint256 value)", + "name": "Transfer", + "decoded": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address", + "decoded": "0x0000000000000000000000000000000000000000" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address", + "decoded": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ] + } + } + ], + "logsBloom": "0x00000400000000000000000000000000000000000100000000000000400000000000000000000000000000000000000000000000000800000000000000000000000400000000000000000008008000002000000000000000000000000000000000000010020000000000040000000880008000002000000000000010000000000000000000000000000000200000000000000000000000000000000100000000000000000000000000200000000004000000000000100000000000000000000000000002000000000000000000000000000000000000009000000008000020000000000000000000400010000000000200000010000000000200000000200002", + "status": true, + "to": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionIndex": 4, + "type": "0x0" + }, + "traces": [ + { + "action": { + "callType": "call", + "from": "0xe1d2bd4e0bdd2522671e12fe80c0eaef720b434b", + "gas": "0x61a80", + "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000007", + "to": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "value": "0xe8990a4600" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0x37d1f", "output": "0x0" }, + "subtraces": 1, + "traceAddress": [], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionPosition": 4, + "type": "call" + }, + { + "action": { + "callType": "delegatecall", + "from": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "gas": "0x5a66b", + "input": "0xa0712d680000000000000000000000000000000000000000000000000000000000000007", + "to": "0xaa20d2b9ee7ee9c7b940f02dfdaf4ecd3c66a341", + "value": "0xe8990a4600" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0x31fde", "output": "0x0" }, + "subtraces": 1, + "traceAddress": [0], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionPosition": 4, + "type": "call" + }, + { + "action": { + "callType": "call", + "from": "0x429819842dd13827545a3a7b67e740fb8e5e790a", + "gas": "0x8fc", + "input": "0x", + "to": "0xfb9f360c15a96d9bf3cf48b8aff68f9510da3291", + "value": "0xe8990a4600" + }, + "blockHash": "0xee8346758ae89caf6a3fd067a6145e0bcf8832592d52b5016a3e34fc705370c2", + "blockNumber": 17661582, + "result": { "gasUsed": "0x0", "output": "0x0" }, + "subtraces": 0, + "traceAddress": [0, 0], + "transactionHash": "0xf264b9ebe82f8be0531c2c1fb6fe8901c5eb96671e3db09722bd9e1579bc2685", + "transactionPosition": 4, + "type": "call" + } + ], + "decoded": { + "signature": "mint(uint256)", + "signature_with_arg_names": "mint(uint256 arg1)", + "name": "mint", + "decoded": [ + { + "internalType": "uint256", + "name": "arg1", + "type": "uint256", + "decoded": "7" + } + ] + } + } + ], + "transactionsRoot": "0xd7764181d6f4c8b712664fdc240b3df9c7600318701c66a9630047e79cf4d13b", + "uncles": [], + "withdrawals": [], + "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "chainId": 0 +} From 5683e047eae123f0698425b9877c90e6d116c65a Mon Sep 17 00:00:00 2001 From: Paul Cowgill Date: Wed, 31 Jul 2024 14:02:07 -0600 Subject: [PATCH 5/5] Add comment with context on change --- src/helpers/utils.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/helpers/utils.ts b/src/helpers/utils.ts index f6f71b43..72342386 100644 --- a/src/helpers/utils.ts +++ b/src/helpers/utils.ts @@ -503,6 +503,9 @@ export const grabLogsFromTransaction = (transaction: Transaction): Log[] => { if (transaction.logs) return transaction.logs; if (transaction.receipt?.logs) { + // This mapping doesn't get the result to perfect parity with + // the Once Upon API's format, but it's got all the required parts that + // contextualizations depend on return transaction.receipt.logs.map((log) => { return { address: log.address,