Skip to content

Commit

Permalink
post.tech was integrated
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonmezturk committed Sep 22, 2023
1 parent 62ccbb2 commit a6c0512
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/factory/providers/arbitrum/posttech/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ITvlParams, ITvlReturn } from '../../../../interfaces/ITvl';
import formatter from '../../../../util/formatter';

const POST_TECH = '0x87da6930626fe0c7db8bc15587ec0e410937e5dc';
const START_BLOCK = 126045171;
const WETH_ADDRESS = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';

async function tvl(params: ITvlParams): Promise<Partial<ITvlReturn>> {
const { block, chain, provider, web3 } = params;
if (block < START_BLOCK) {
return { balances: {} };
}

const balances = {
[WETH_ADDRESS]: await web3.eth.getBalance(POST_TECH, block),
};

formatter.convertBalancesToFixed(balances);
return { balances };
}
export { tvl };

0 comments on commit a6c0512

Please sign in to comment.