Skip to content

Commit

Permalink
add new project
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Lucky committed Aug 9, 2024
1 parent 02687bb commit f82a9b4
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions projects/SecWareX/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

const BigNumber = require('bignumber.js');

const USDT_MINT = "0x55d398326f99059ff775485246999027b3197955";
const SECWAREX_FOUNDATION = "0x34ebddd30ccbd3f1e385b41bdadb30412323e34f";
const SECWAREX_REVENUE_POOL = "0x648d7f4ad39186949e37e9223a152435ab97706c";

const BALANCE_ABI = 'erc20:balanceOf';

async function tvl(api) {
const foundationBalance = await api.call({
abi: BALANCE_ABI,
target: USDT_MINT,
params: [SECWAREX_FOUNDATION],
});
const revenueBalance = await api.call({
abi: BALANCE_ABI,
target: USDT_MINT,
params: [SECWAREX_REVENUE_POOL],
});
const total = BigNumber(foundationBalance).plus(BigNumber(revenueBalance)).toFixed(0);
api.add(USDT_MINT, total);
}

module.exports = {
bsc: {
tvl
},
methodology: "Count the profits of SecWareX",
start: 36724659
};

0 comments on commit f82a9b4

Please sign in to comment.