Skip to content

Commit

Permalink
Merge pull request #263 from dappradar/tezos_updated
Browse files Browse the repository at this point in the history
Tezos updated
  • Loading branch information
Sonmezturk authored Mar 6, 2024
2 parents 982d940 + e6f478d commit 5d0d512
Show file tree
Hide file tree
Showing 7 changed files with 2,437 additions and 23 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@project-serum/anchor": "^0.18.2",
"@solana/web3.js": "^1.30.2",
"@supercharge/promise-pool": "^2.4.0",
"@taquito/taquito": "^14.1.0",
"@taquito/taquito": "^14.2.0",
"aptos": "^1.21.0",
"bignumber.js": "^9.1.0",
"dotenv": "^16.0.3",
Expand Down
25 changes: 25 additions & 0 deletions src/factory/providers/bsc/squadswap/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { ITvlParams, ITvlReturn } from '../../../../interfaces/ITvl';
import uniswapV2 from '../../../../util/calculators/uniswapV2';
import formatter from '../../../../util/formatter';

const START_BLOCK = 34130751;
const FACTORY_ADDRESS = '0x1D9F43a6195054313ac1aE423B1f810f593b6ac1';

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

const { balances, poolBalances } = await uniswapV2.getTvl(
FACTORY_ADDRESS,
block,
chain,
provider,
web3,
);
formatter.convertBalancesToFixed(balances);
return { balances, poolBalances };
}

export { tvl };
Loading

0 comments on commit 5d0d512

Please sign in to comment.