Skip to content

Commit

Permalink
friend.tech integrated
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonmezturk committed Oct 11, 2023
1 parent 14a06ec commit ff2100e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ nodeUrls['CRONOS_NODE_URL'] = process.env['CRONOS_NODE_URL'];
nodeUrls['ARBITRUM_NODE_URL'] = process.env['ARBITRUM_NODE_URL'];
nodeUrls['ZKSYNC-ERA_NODE_URL'] = process.env['ZKSYNC-ERA_NODE_URL'];
nodeUrls['ELYSIUM_NODE_URL'] = process.env['ELYSIUM_NODE_URL'];
nodeUrls['BASE_NODE_URL'] = process.env['ZKSYNC-BASE_NODE_URL'];
nodeUrls['BASE_NODE_URL'] = process.env['BASE_NODE_URL'];

export { config, nodeUrls };
21 changes: 21 additions & 0 deletions src/factory/providers/base/friendtech/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';
import util from '../../../../util/blockchainUtil';

const POST_TECH = '0xcf205808ed36593aa40a44f10c7f7c2f67d4a4d4';
const START_BLOCK = 2430440;

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

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

formatter.convertBalancesToFixed(balances);
return { balances };
}
export { tvl };
4 changes: 4 additions & 0 deletions src/util/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ const data = {
prefix: 'lava_',
delay: 400,
},
base: {
prefix: 'base_',
delay: 400,
},
},
FILTERS: {
MarketCapInFiat: 'marketCapInFiat',
Expand Down

0 comments on commit ff2100e

Please sign in to comment.