Skip to content

Commit

Permalink
Merge pull request #152 from 0xProject/andres/deng-329-event-scrapers…
Browse files Browse the repository at this point in the history
…-zid-extraction-for-apiv2-explicit

Adds scraping of explicit wraps/unwraps in APIv2.
  • Loading branch information
AndresElizondo authored Aug 27, 2024
2 parents 1ebc055 + 0e76744 commit fd2f815
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/parsers/web3/parse_web3_objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ export function parseTransaction(rawTx: EVMTransaction): Transaction {
const bytesPos = rawTx.input.indexOf('fbc019a7');
transaction.affiliateAddress = '0x'.concat(rawTx.input.slice(bytesPos + 32, bytesPos + 72));
transaction.quoteTimestamp = null;
} else if (transaction.input.includes('56a993cd')) {
// APIv2 explicit wrap/unwrap event (Doesn't go through Settler)
const bytesPos = rawTx.input.indexOf('56a993cd') + '0x56a993cd'.length;
transaction.quoteId = '0x'.concat(rawTx.input.slice(bytesPos, bytesPos + 24));
transaction.affiliateAddress = null;
transaction.quoteTimestamp = null;
}

return transaction;
Expand Down

0 comments on commit fd2f815

Please sign in to comment.