Skip to content

Commit 3aa9691

Browse files
IvanMacaronevang1nt0ki
authored
add Lessgas (DefiLlama#8893)
* add fetch * Change calculation method * add log * change tvl method * add * code refactor --------- Co-authored-by: evan <[email protected]> Co-authored-by: g1nt0ki <[email protected]>
1 parent f2b7671 commit 3aa9691

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

projects/lessgas/abi.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"balanceOf": "function balanceOf(address account) view returns (uint256)",
3+
"totalSupply": "uint256:totalSupply"
4+
}

projects/lessgas/index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const { getConfig } = require('../helper/cache')
2+
const HOST = 'https://api2.lessgas.xyz'
3+
4+
const staking = async (a, b, c, { api }) => {
5+
let { data: { result } } = await getConfig('lessgas', `${HOST}/llama/staking`)
6+
const tokensAndOwners = result.map(i => [i[1], i[0]])
7+
return api.sumTokens({ tokensAndOwners })
8+
}
9+
10+
module.exports = {
11+
methodology: "Get the amount of tokens in lessgas platform",
12+
map: {
13+
tvl: () => ({}),
14+
staking,
15+
}
16+
};

0 commit comments

Comments
 (0)