Skip to content

Commit

Permalink
Merge pull request #9407 from jiangxiaop/main
Browse files Browse the repository at this point in the history
Create index.js
  • Loading branch information
waynebruce0x authored Mar 18, 2024
2 parents 3e33a08 + 82c8bb1 commit e62c319
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions projects/MantaTimeLockContract/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const MANTA = '0x95CeF13441Be50d20cA4558CC0a27B601aC544E5';
const STONE = '0xEc901DA9c68E90798BbBb74c11406A32A70652C3';
const TIME_LOCK_CONTRACT = '0x8Bb6CaE3f1CADA07Dd14bA951e02886ea6bBA183';

async function tvl(_, _1, _2, { api }) {
const mantaBalance = await api.call({
abi: 'erc20:balanceOf',
target: MANTA,
params: [TIME_LOCK_CONTRACT],
});

api.add(MANTA, mantaBalance);

const stoneBalance = await api.call({
abi: 'erc20:balanceOf',
target: STONE,
params: [TIME_LOCK_CONTRACT],
});

api.add(STONE, stoneBalance);
}

module.exports = {
timetravel: true,
misrepresentedTokens: false,
methodology: 'counts the number of (MANTA OR STONE) in the time lock contract.',
start: 1497066,
manta: {
tvl,
}
};

0 comments on commit e62c319

Please sign in to comment.