Skip to content

Commit

Permalink
enrichedParties and assetsEnriched
Browse files Browse the repository at this point in the history
  • Loading branch information
guscost committed May 15, 2024
1 parent fd30001 commit 54c2b84
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"transactionFee": "329210634372624000051437959100",
"logs": [],
"netAssetTransfers": {},
"pseudotransactions": [],
"pseudoTransactions": [],
"contractsCreated": [],
"enrichedParties": {
"0xab18fdc21c33c3c60bbca753997a657f00d43f9e": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30292,7 +30292,7 @@
}
],
"netAssetTransfers": {},
"pseudotransactions": [],
"pseudoTransactions": [],
"contractsCreated": [],
"enrichedParties": {
"0xab18fdc21c33c3c60bbca753997a657f00d43f9e": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
}
],
"netAssetTransfers": {},
"pseudotransactions": [],
"pseudoTransactions": [],
"contractsCreated": [],
"enrichedParties": {
"0xab18fdc21c33c3c60bbca753997a657f00d43f9e": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29589,7 +29589,7 @@
}
],
"netAssetTransfers": {},
"pseudotransactions": [],
"pseudoTransactions": [],
"contractsCreated": [],
"enrichedParties": {
"0xab18fdc21c33c3c60bbca753997a657f00d43f9e": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@
"sent": []
}
},
"pseudotransactions": [],
"pseudoTransactions": [],
"contractsCreated": [],
"enrichedParties": {
"0xf70da97812cb96acdf810712aa562db8dfa3dbef": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@
"sent": []
}
},
"pseudotransactions": [],
"pseudoTransactions": [],
"contractsCreated": [],
"enrichedParties": {
"0x4337003fcd2f56de3977ccb806383e9161628d0e": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@
"sent": []
}
},
"pseudotransactions": [],
"pseudoTransactions": [],
"contractsCreated": [],
"enrichedParties": {
"0x15cc6926a4bea1eb176a738f7a8c63e65b437f84": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@
"sent": []
}
},
"pseudotransactions": [],
"pseudoTransactions": [],
"contractsCreated": [],
"enrichedParties": {
"0x2c2926b92782e30150ff779220a1ece076f2a827": [
Expand Down
32 changes: 30 additions & 2 deletions src/types/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from 'viem';
import { Log, RawReceipt } from './log';
import { ContextVariable, ContextSummaryType } from './context';
import { NetAssetTransfers, AssetTransfer } from './asset';
import { NetAssetTransfers, AssetTransfer, Asset } from './asset';
import { InternalHashType, StdObj } from './shared';
import { Contract } from './contract';

Expand Down Expand Up @@ -69,6 +69,32 @@ export type Receipt = TransactionReceipt & {
l1GasUsed?: string;
};

export type AddressMeta = {
chainId: number;
isContract: boolean;
ensNew: {
handle: string | null;
avatar: string | null;
};
bns: {
handle: string | null;
avatar: string | null;
};
farcaster: {
handle: string | null;
avatar: string | null;
fid: number | null;
};
};

export type TransactionEnrichedParties = {
[address: string]: AddressMeta[];
};

export type TransactionAssetsEnriched = {
[address: string]: Asset & { imageUrl: string | null };
};

export type TransactionContextType = {
variables?: ContextVariable;
summaries?: ContextSummaryType;
Expand All @@ -78,7 +104,9 @@ export type TransactionContextType = {
// MongoDB document
export type Transaction = BaseTransaction & {
assetTransfers?: AssetTransfer[];
pseudotransactions?: PseudoTransaction[];
pseudoTransactions?: PseudoTransaction[];
enrichedParties: TransactionEnrichedParties;
assetsEnriched: TransactionAssetsEnriched;
sigHash: string;
internalSigHashes: SigHash[];
parties: string[];
Expand Down

0 comments on commit 54c2b84

Please sign in to comment.