Skip to content

Commit

Permalink
Adds scraping of explicit wraps/unwraps in APIv2.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrés Elizondo committed Aug 8, 2024
1 parent 563cb6d commit 0e76744
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 0e76744

Please sign in to comment.