Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions projects/helper/chains.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
"everscale",
"evmos",
"fantom",
"fhe",
"filecoin",
"findora",
"firechain",
Expand Down
19 changes: 12 additions & 7 deletions projects/mind-restake/index.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
const config = {
ethereum: "0x6a5D488EC17d6a7a1872AaB88feC90c1B2Df4196",
scroll: "0xea3E87699D11B77Fba754Bf0257a25664B97437d",
bsc: "0x6a5D488EC17d6a7a1872AaB88feC90c1B2Df4196",
bsc: "0x1987d8109638A028BB8bE654531B15642a8708E3",
fhe:"0xe8451dC0959469e42F2679b3eC085e58FB212b11"
};

// const token = "0xd55C9fB62E176a8Eb6968f32958FeFDD0962727E"

module.exports = {
methodology: "Counts the total amount of asset tokens deposited in each of the Strategy contracts registered in the helper contract on each chain.",
methodology: "Counts the total amount of FHE tokens deposited in Mind Agentic World contracts on BSC and MindChain.",
}

Object.keys(config).forEach(chain => {
const target = config[chain]
module.exports[chain] = {
tvl: async (api) => {
const [_vaults, tokens, bals] = await api.call({
abi: "function getPoolTotalAssets() view returns (address[] memory,address[] memory, uint256[] memory)",
const tvlAmount = await api.call({
abi: "function allHubAssetAmount() view returns (uint256)",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we continue using getPoolTotalAssets() instead?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our product has been updated — it now calculates the staked TVL across various hubs.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cant see the contract code on bscscan - can you point me to the source code fot allHubAssetAmount()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, our contract hasn't been open-sourced yet. I'll switch to a new method for the calculation — thank you!

target,
})
api.add(tokens, bals)
const bigIntAmount = BigInt(tvlAmount);
const amountInToken = bigIntAmount / BigInt(10 ** 18);
// api.add(token, tvlAmount,{ priceChain: "bsc" })
api.addCGToken("mind-network", amountInToken)
}
}
})

Loading