Skip to content

Commit

Permalink
feat: update parties
Browse files Browse the repository at this point in the history
  • Loading branch information
ponyjackal committed Feb 26, 2024
1 parent 79f6b88 commit 102b0ee
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/transformers/_common/parties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export function transform(block: RawBlock): RawBlock {
return result;
});
// nfts
<<<<<<< HEAD
const nftTransfers = tx.assetTransfers?.filter(
(transfer) =>
transfer.type === AssetType.ERC721 ||
Expand All @@ -83,6 +84,19 @@ export function transform(block: RawBlock): RawBlock {
(transfer) => `${transfer.asset.toLowerCase()}-${transfer.tokenId}`,
)
: [];
=======
const nfts = tx.receipt.logs
.filter(
(log) =>
(log.decoded?.name === 'Transfer' ||
log.decoded?.name === 'Approval') &&
log.decoded?.decoded[2]?.type === 'uint256',
)
.map(
(log) =>
`${log.address.toLowerCase()}-${log.decoded?.decoded[2].decoded}`,
);
>>>>>>> abd39ae (feat: update parties)
// contracts created
const contractsCreated = tx.contracts?.map((contract) => contract.address);
parties = [
Expand Down

0 comments on commit 102b0ee

Please sign in to comment.