From 3fe4fead9ae2a58c6658ad68ad7aa5e5f877f3ba Mon Sep 17 00:00:00 2001 From: Codonyat <48455632+Codonyat@users.noreply.github.com> Date: Tue, 22 Jul 2025 16:57:21 +0200 Subject: [PATCH 1/3] Update index.js Updated to new vault contract address. --- projects/sir-trading/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/sir-trading/index.js b/projects/sir-trading/index.js index 40fe8b4fa83..5d80c2fb912 100644 --- a/projects/sir-trading/index.js +++ b/projects/sir-trading/index.js @@ -1,4 +1,4 @@ -const VAULT_ADDRESS = '0xB91AE2c8365FD45030abA84a4666C4dB074E53E7'; +const VAULT_ADDRESS = '0x7Dad75dD36dE234C937C105e652B6E50d68b0309'; const abi = { "paramsById": "function paramsById(uint48 vaultId) view returns ((address debtToken, address collateralToken, int8 leverageTier))" } From 123b80e83457e20cba2f73e12ad6e355c14bd5d7 Mon Sep 17 00:00:00 2001 From: Codonyat <48455632+Codonyat@users.noreply.github.com> Date: Sun, 2 Nov 2025 12:01:27 +0100 Subject: [PATCH 2/3] Added TVL of hour HyperEVM deployment --- projects/sir-trading/index.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/projects/sir-trading/index.js b/projects/sir-trading/index.js index 5d80c2fb912..972439318a6 100644 --- a/projects/sir-trading/index.js +++ b/projects/sir-trading/index.js @@ -1,15 +1,25 @@ -const VAULT_ADDRESS = '0x7Dad75dD36dE234C937C105e652B6E50d68b0309'; +const ETH_VAULT_ADDRESS = '0x7Dad75dD36dE234C937C105e652B6E50d68b0309'; +const HYPER_VAULT_ADDRESS = '0x4a35e7448Dad9cAc6B3e529050B5a6Ee56A0eDF0' const abi = { "paramsById": "function paramsById(uint48 vaultId) view returns ((address debtToken, address collateralToken, int8 leverageTier))" } -async function tvl(api) { - const res = await api.fetchList({ lengthAbi: 'numberOfVaults', itemAbi: abi.paramsById, target: VAULT_ADDRESS }) +async function tvl(target, api) { + const res = await api.fetchList({ lengthAbi: 'numberOfVaults', itemAbi: abi.paramsById, target }) const tokens = res.map(v => v.collateralToken) - return api.sumTokens({ tokens, owner: VAULT_ADDRESS }) + return api.sumTokens({ tokens, owner: target }) +} + +async function tvlEthereum(api) { + return tvl(ETH_VAULT_ADDRESS, api) +} + +async function tvlHyperEVM(api) { + return tvl(HYPER_VAULT_ADDRESS, api) } module.exports = { methodology: "Token balance in the vault contract", - ethereum: { tvl } + ethereum: { tvl: tvlEthereum }, + hyperevm: { tvl: tvlHyperEVM } }; From 679230e4ee79e10fceaab07599f5a93fdf08cf7f Mon Sep 17 00:00:00 2001 From: Codonyat <48455632+Codonyat@users.noreply.github.com> Date: Sun, 2 Nov 2025 12:11:38 +0100 Subject: [PATCH 3/3] Fixed network name --- projects/sir-trading/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/sir-trading/index.js b/projects/sir-trading/index.js index 972439318a6..2a70f74b6e1 100644 --- a/projects/sir-trading/index.js +++ b/projects/sir-trading/index.js @@ -21,5 +21,5 @@ async function tvlHyperEVM(api) { module.exports = { methodology: "Token balance in the vault contract", ethereum: { tvl: tvlEthereum }, - hyperevm: { tvl: tvlHyperEVM } + hyperliquid: { tvl: tvlHyperEVM } };