Skip to content

Commit

Permalink
patch bsc getlogs
Browse files Browse the repository at this point in the history
  • Loading branch information
waynebruce0x committed Dec 4, 2023
1 parent a45a908 commit 0bb87a6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions projects/pendle/v2.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,23 @@ const config = {
},
bsc: {
factory: "0x2bEa6BfD8fbFF45aA2a893EB3B6d85D10EFcC70E",
fromBlock: 29484286,
fromBlock: 34060741,
pts: [
"0x5eC2ae0AFDEc891E7702344dc2A31C636B3627Eb",
"0x70c1138B54ba212776d3A9d29b6160C54C31cd5d",
"0x04eb6B56ff53f457c8E857ca8D4fbC8d9a531c0C",
],
},
optimism: {
factory: '0x17F100fB4bE2707675c6439468d38249DD993d58',
factory: "0x17F100fB4bE2707675c6439468d38249DD993d58",
fromBlock: 108061448,
}
},
};

module.exports = {};

Object.keys(config).forEach((chain) => {
const { factory, fromBlock } = config[chain];
const { factory, fromBlock, pts } = config[chain];
module.exports[chain] = {
tvl: async (_, _b, _cb, { api }) => {
const logs = await getLogs({
Expand All @@ -40,6 +45,7 @@ Object.keys(config).forEach((chain) => {
fromBlock,
});
const pt = logs.map((i) => i.PT);
if (pts) pt.push(...pts);
let sy = [
...new Set(
(
Expand Down

0 comments on commit 0bb87a6

Please sign in to comment.