Skip to content

Commit ebaf3f2

Browse files
author
Semon
committed
fix: Correcting the method for obtaining the amount of tokens staked.
1 parent 0226d4e commit ebaf3f2

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

projects/axlp/config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"arbitrum": {
3+
"AMLP": {
4+
"token": "0x152f5E6142db867f905a68617dBb6408D7993a4b",
5+
"staker": "0x3a66b81be26f2d799C5A96A011e1E3FB2BA50999"
6+
},
7+
"AHLP": {
8+
"token": "0x5fd22dA8315992dbbD82d5AC1087803ff134C2c4",
9+
"staker": "0x1ba274EBbB07353657ed8C76A87ACf362E408D85"
10+
}
11+
}
12+
}

projects/axlp/index.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
const sAMLP_arbitrum = '0xbC08F30c18a79a3a18dBbd40931C551F91EDB9dB'
2-
const sAHLP_arbitrum = '0x50c30f24b957B1ac9e31558e55Bf7dc4ab685eA9'
1+
const config = require('./config.json')
32

43
module.exports = {
5-
methodology: 'counts the number of sAMLP and sAHLP tokens in the contract.',
4+
methodology: 'counts the number of AMLP and AHLP tokens in the staking contracts.',
65
arbitrum: {
76
tvl: async (api) => {
8-
const [sAMLP_supply, sAHLP_supply] = await api.multiCall({
9-
abi: 'erc20:totalSupply',
10-
calls: [sAMLP_arbitrum, sAHLP_arbitrum]
7+
const [amlp_staker_balance, ahlp_staker_balance] = await api.multiCall({
8+
abi: 'erc20:balanceOf',
9+
calls: [
10+
{ target: config.arbitrum.AMLP.token, params: [config.arbitrum.AMLP.staker] },
11+
{ target: config.arbitrum.AHLP.token, params: [config.arbitrum.AHLP.staker] }
12+
]
1113
})
12-
api.add(sAMLP_arbitrum, sAMLP_supply)
13-
api.add(sAHLP_arbitrum, sAHLP_supply)
14+
api.add(config.arbitrum.AMLP.token, amlp_staker_balance)
15+
api.add(config.arbitrum.AHLP.token, ahlp_staker_balance)
1416
}
1517
}
1618
}

0 commit comments

Comments
 (0)