Skip to content

Commit cd34958

Browse files
committed
curve: track sonic
1 parent 9929231 commit cd34958

File tree

2 files changed

+26
-15
lines changed

2 files changed

+26
-15
lines changed

projects/curve/contracts.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,5 +214,12 @@
214214
"CurveStableswapFactoryNG": "0xd7E72f3615aa65b92A4DBdC211E296a35512988B",
215215
"CurveTwocryptoFactoryNG": "0x5Ea9DD3b6f042A34Df818C6c1324BC5A7c61427a",
216216
"CurveTricryptoFactoryNG": "0x7Ca46A636b02D4aBC66883D7FF164bDE506DC66a"
217+
},
218+
"sonic": {
219+
"gasTokenDummy": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
220+
"wrapped": "0x039e2fb66102314ce7b64ce5ce3e5183bc94ad38",
221+
"CurveStableswapFactoryNG": "0x7C2085419BE6a04f4ad88ea91bC9F5C6E6C463D8",
222+
"CurveTwocryptoFactoryNG": "0x1A83348F9cCFD3Fe1A8C0adBa580Ac4e267Fe495",
223+
"CurveTricryptoFactoryNG": "0x635742dCC8313DCf8c904206037d962c042EAfBd"
217224
}
218225
}

projects/curve/index.js

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ const contracts = require("./contracts.json");
1111
const { getLogs } = require('../helper/cache/getLogs')
1212

1313
const chains = [
14-
"ethereum", //-200M
15-
"polygon", //-40M
16-
"arbitrum", //G
17-
"aurora", //G
18-
"avax", //-30M
19-
"fantom", //-80M
20-
"optimism", //-6M
21-
"xdai", //G
14+
"ethereum",
15+
"polygon",
16+
"arbitrum",
17+
"aurora",
18+
"avax",
19+
"fantom",
20+
"optimism",
21+
"xdai",
2222
"moonbeam",
2323
"celo",
2424
"kava",
@@ -29,7 +29,9 @@ const chains = [
2929
"mantle",
3030
"taiko",
3131
"corn",
32-
]; // Object.keys(contracts);
32+
"sonic",
33+
"ink",
34+
];
3335
const registryIds = {
3436
stableswap: 0,
3537
stableFactory: 3,
@@ -94,7 +96,7 @@ async function getPools(block, chain) {
9496
let { registriesMapping, addressProvider } = contracts[chain]
9597
if (!registriesMapping) {
9698
registriesMapping = {};
97-
if(addressProvider){
99+
if (addressProvider) {
98100
(await sdk.api.abi.multiCall({
99101
block, chain,
100102
calls: Object.values(registryIds).map(r => ({ params: r })),
@@ -259,18 +261,20 @@ module.exports = chainTypeExports(chains);
259261
module.exports.ethereum["staking"] = staking(
260262
contracts.ethereum.veCRV,
261263
contracts.ethereum.CRV
262-
);
264+
);
263265

264266
module.exports.harmony = {
265267
tvl: async (api) => {
266268
if (api.timestamp > 1655989200) {
267269
// harmony hack
268270
return {};
269271
}
270-
return api.sumTokens({ owner: '0xC5cfaDA84E902aD92DD40194f0883ad49639b023', tokens: [
271-
"0xef977d2f931c1978db5f6747666fa1eacb0d0339",
272-
"0x3c2b8be99c50593081eaa2a724f0b8285f5aba8f"
273-
]})
272+
return api.sumTokens({
273+
owner: '0xC5cfaDA84E902aD92DD40194f0883ad49639b023', tokens: [
274+
"0xef977d2f931c1978db5f6747666fa1eacb0d0339",
275+
"0x3c2b8be99c50593081eaa2a724f0b8285f5aba8f"
276+
]
277+
})
274278
}
275279
};
276280

0 commit comments

Comments
 (0)