mirror of
https://github.com/alexgo-io/DefiLlama-Adapters.git
synced 2026-01-12 08:34:23 +08:00
feat: Vaultedge adapter (#16915)
This commit is contained in:
33
projects/vaultedge/index.js
Normal file
33
projects/vaultedge/index.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const { sumTokens2 } = require("../helper/unwrapLPs");
|
||||
|
||||
const ADMIN_ADDRESSES = {
|
||||
plasma: "0xe0a8d5d839f65Ef787E13C50D29d9Aa31353fa31",
|
||||
};
|
||||
|
||||
async function tvl(api) {
|
||||
const adminContract = ADMIN_ADDRESSES[api.chain];
|
||||
const collAddresses = await api.call({
|
||||
abi: "address[]:getValidCollateral",
|
||||
target: adminContract,
|
||||
});
|
||||
const activePool = await api.call({
|
||||
abi: "address:activePool",
|
||||
target: adminContract,
|
||||
});
|
||||
await sumTokens2({
|
||||
api,
|
||||
tokens: collAddresses,
|
||||
owner: activePool,
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
methodology:
|
||||
"Adds up the total value locked as collateral on the Vaultedge platform",
|
||||
start: '2025-10-31', // Thursday, October 31, 2025
|
||||
};
|
||||
|
||||
Object.keys(ADMIN_ADDRESSES).forEach((chain) => {
|
||||
module.exports[chain] = { tvl };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user