Skip to content

Commit 238835e

Browse files
authored
feat: add Utopia Miner contract ABI and TVL calculation (#16917)
1 parent d33d1da commit 238835e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

projects/utopia/index.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const sdk = require('@defillama/sdk');
2+
3+
const UTOPIA_MINER_CONTRACT = '0x61ea85A817344789d836fbC18B9099bB280b383D';
4+
5+
async function tvl(api) {
6+
const contractBalance = await sdk.api.eth.getBalance({
7+
target: UTOPIA_MINER_CONTRACT,
8+
chain: 'bsc',
9+
});
10+
11+
api.addGasToken(contractBalance.output);
12+
}
13+
14+
module.exports = {
15+
methodology:
16+
'TVL is calculated as the total BNB balance locked in the Utopia Miner contract.',
17+
bsc: {
18+
tvl,
19+
},
20+
};

0 commit comments

Comments
 (0)