@curvefi/api 2.4.3 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/lib/constants/abis/eursusd2/swap.json +1199 -0
  2. package/lib/constants/abis/eursusd2/zap.json +270 -0
  3. package/lib/constants/abis/factory-v2/DepositZapFantom.json +164 -0
  4. package/lib/constants/abis/factory-v2/DepositZapMetaUsd2Fantom.json +197 -0
  5. package/lib/constants/abis/factory-v2/MetaUSDGeist.json +932 -0
  6. package/lib/constants/abis/fusdt/swap.json +1221 -0
  7. package/lib/constants/abis/fusdt/zap.json +215 -0
  8. package/lib/constants/abis/gauge_child.json +0 -100
  9. package/lib/constants/abis/gauge_rewards_only.json +649 -0
  10. package/lib/constants/abis/ren-arbitrum/swap.json +1069 -0
  11. package/lib/constants/abis/ren-fantom/swap.json +868 -0
  12. package/lib/constants/abis/tricrypto/swapNoZap.json +1250 -0
  13. package/lib/constants/aliases.d.ts +2 -0
  14. package/lib/constants/aliases.js +25 -1
  15. package/lib/constants/coins/arbitrum.d.ts +7 -0
  16. package/lib/constants/coins/arbitrum.js +23 -0
  17. package/lib/constants/coins/fantom.d.ts +7 -0
  18. package/lib/constants/coins/fantom.js +36 -0
  19. package/lib/constants/pools/arbitrum.d.ts +4 -0
  20. package/lib/constants/pools/arbitrum.js +125 -0
  21. package/lib/constants/pools/fantom.d.ts +4 -0
  22. package/lib/constants/pools/fantom.js +191 -0
  23. package/lib/constants/pools/index.d.ts +3 -1
  24. package/lib/constants/pools/index.js +5 -1
  25. package/lib/constants/pools/polygon.js +30 -0
  26. package/lib/curve.js +42 -10
  27. package/lib/factory/common.js +31 -0
  28. package/lib/factory/constants.d.ts +6 -0
  29. package/lib/factory/constants.js +85 -3
  30. package/lib/factory/factory-crypto.js +4 -0
  31. package/lib/factory/factory.js +6 -0
  32. package/lib/pools/PoolTemplate.d.ts +2 -1
  33. package/lib/pools/PoolTemplate.js +30 -25
  34. package/lib/pools/poolConstructor.js +3 -3
  35. package/lib/router.js +6 -6
  36. package/lib/utils.js +6 -0
  37. package/package.json +1 -1
@@ -1,3 +1,5 @@
1
1
  export declare const ALIASES_ETHEREUM: import("../interfaces").IDict<string>;
2
2
  export declare const ALIASES_POLYGON: import("../interfaces").IDict<string>;
3
+ export declare const ALIASES_FANTOM: import("../interfaces").IDict<string>;
3
4
  export declare const ALIASES_AVALANCHE: import("../interfaces").IDict<string>;
5
+ export declare const ALIASES_ARBITRUM: import("../interfaces").IDict<string>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ALIASES_AVALANCHE = exports.ALIASES_POLYGON = exports.ALIASES_ETHEREUM = void 0;
3
+ exports.ALIASES_ARBITRUM = exports.ALIASES_AVALANCHE = exports.ALIASES_FANTOM = exports.ALIASES_POLYGON = exports.ALIASES_ETHEREUM = void 0;
4
4
  var utils_1 = require("./utils");
5
5
  exports.ALIASES_ETHEREUM = (0, utils_1.lowerCaseValues)({
6
6
  "crv": "0xD533a949740bb3306d119CC777fa900bA034cd52",
@@ -26,6 +26,18 @@ exports.ALIASES_POLYGON = (0, utils_1.lowerCaseValues)({
26
26
  "crypto_factory": "0xE5De15A9C9bBedb4F5EC13B131E61245f2983A69",
27
27
  "registry_exchange": "",
28
28
  });
29
+ exports.ALIASES_FANTOM = (0, utils_1.lowerCaseValues)({
30
+ "crv": "0x1E4F97b9f9F913c46F1632781732927B9019C68b",
31
+ "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
32
+ "voting_escrow": "0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2",
33
+ "gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
34
+ "address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
35
+ "router": "0xfA9a30350048B2BF66865ee20363067c66f67e58",
36
+ "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
37
+ "factory": "0x686d67265703d1f124c45e33d47d794c566889ba",
38
+ "crypto_factory": "0xE5De15A9C9bBedb4F5EC13B131E61245f2983A69",
39
+ "registry_exchange": "",
40
+ });
29
41
  exports.ALIASES_AVALANCHE = (0, utils_1.lowerCaseValues)({
30
42
  "crv": "0x47536F17F4fF30e64A96a7555826b8f9e66ec468",
31
43
  "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
@@ -38,3 +50,15 @@ exports.ALIASES_AVALANCHE = (0, utils_1.lowerCaseValues)({
38
50
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
39
51
  "registry_exchange": "",
40
52
  });
53
+ exports.ALIASES_ARBITRUM = (0, utils_1.lowerCaseValues)({
54
+ "crv": "0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978",
55
+ "minter": "0xabC000d88f23Bb45525E447528DBF656A9D55bf5",
56
+ "voting_escrow": "0x5f3b5DfEb7B28CDbD7FAba78963EE202a494e2A2",
57
+ "gauge_controller": "0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB",
58
+ "address_provider": "0x0000000022d53366457f9d5e68ec105046fc4383",
59
+ "router": "0xfA9a30350048B2BF66865ee20363067c66f67e58",
60
+ "deposit_and_stake": "0xB7De33440B7171159a9718CBE748086cecDd9685",
61
+ "factory": '0xb17b674D9c5CB2e441F8e196a2f048A81355d031',
62
+ "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
63
+ "registry_exchange": "",
64
+ });
@@ -0,0 +1,7 @@
1
+ export declare const COINS_ARBITRUM: {
2
+ [index: string]: string;
3
+ };
4
+ export declare const cTokensArbitrum: never[];
5
+ export declare const yTokensArbitrum: never[];
6
+ export declare const ycTokensArbitrum: never[];
7
+ export declare const aTokensArbitrum: never[];
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.aTokensArbitrum = exports.ycTokensArbitrum = exports.yTokensArbitrum = exports.cTokensArbitrum = exports.COINS_ARBITRUM = void 0;
4
+ var utils_1 = require("../utils");
5
+ exports.COINS_ARBITRUM = (0, utils_1.lowerCaseValues)({
6
+ 'crv': '0x11cDb42B0EB46D95f990BeDD4695A6e3fA034978',
7
+ // --- USD ---
8
+ 'usdc': '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8',
9
+ 'usdt': '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9',
10
+ '2crv': '0x7f90122bf0700f9e7e1f688fe926940e8839f353',
11
+ // --- EUR ---
12
+ 'eurs': '0xd22a58f79e9481d1a88e00c343885a588b34b68b',
13
+ // --- BTC ---
14
+ 'wbtc': '0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f',
15
+ 'renbtc': '0xDBf31dF14B66535aF65AaC99C32e9eA844e14501',
16
+ // --- ETH ---
17
+ "eth": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
18
+ "weth": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
19
+ });
20
+ exports.cTokensArbitrum = []; //.map((a) => a.toLowerCase());
21
+ exports.yTokensArbitrum = []; //.map((a) => a.toLowerCase());
22
+ exports.ycTokensArbitrum = []; //.map((a) => a.toLowerCase());
23
+ exports.aTokensArbitrum = []; //.map((a) => a.toLowerCase());
@@ -0,0 +1,7 @@
1
+ export declare const COINS_FANTOM: {
2
+ [index: string]: string;
3
+ };
4
+ export declare const cTokensFantom: string[];
5
+ export declare const yTokensFantom: never[];
6
+ export declare const ycTokensFantom: never[];
7
+ export declare const aTokensFantom: string[];
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.aTokensFantom = exports.ycTokensFantom = exports.yTokensFantom = exports.cTokensFantom = exports.COINS_FANTOM = void 0;
4
+ var utils_1 = require("../utils");
5
+ exports.COINS_FANTOM = (0, utils_1.lowerCaseValues)({
6
+ 'crv': '0x1E4F97b9f9F913c46F1632781732927B9019C68b',
7
+ // --- USD ---
8
+ 'dai': '0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e',
9
+ 'usdc': '0x04068da6c83afcfa0e13ba15a6696662335d5b75',
10
+ 'fusdt': '0x049d68029688eabf473097a2fc38ef61633a3c7a',
11
+ 'idai': '0x04c762a5dF2Fa02FE868F25359E0C259fB811CfE',
12
+ 'iusdc': '0x328A7b4d538A2b3942653a9983fdA3C12c571141',
13
+ 'ifusdt': '0x70faC71debfD67394D1278D98A29dea79DC6E57A',
14
+ 'gdai': '0x07e6332dd090d287d3489245038daf987955dcfb',
15
+ 'gusdc': '0xe578c856933d8e1082740bf7661e379aa2a30b26',
16
+ 'gfusdt': '0x940f41f0ec9ba1a34cf001cc03347ac092f5f6b5',
17
+ 'dai+usdc': '0x27e611fd27b276acbd5ffd632e5eaebec9761e40',
18
+ 'frax': '0xdc301622e621166bd8e82f2ca0a26c13ad0be355',
19
+ // --- BTC ---
20
+ 'btc': '0x321162Cd933E2Be498Cd2267a90534A804051b11',
21
+ 'renbtc': '0xDBf31dF14B66535aF65AaC99C32e9eA844e14501',
22
+ // --- ETH ---
23
+ 'eth': '0x74b23882a30290451A17c44f4F05243b6b58C76d',
24
+ });
25
+ exports.cTokensFantom = [
26
+ '0x04c762a5dF2Fa02FE868F25359E0C259fB811CfE',
27
+ '0x328A7b4d538A2b3942653a9983fdA3C12c571141',
28
+ '0x70faC71debfD67394D1278D98A29dea79DC6E57A', // iFUSDT
29
+ ].map(function (a) { return a.toLowerCase(); });
30
+ exports.yTokensFantom = []; //.map((a) => a.toLowerCase());
31
+ exports.ycTokensFantom = []; //.map((a) => a.toLowerCase());
32
+ exports.aTokensFantom = [
33
+ '0x07e6332dd090d287d3489245038daf987955dcfb',
34
+ '0xe578c856933d8e1082740bf7661e379aa2a30b26',
35
+ '0x940f41f0ec9ba1a34cf001cc03347ac092f5f6b5', // gfUSDT
36
+ ].map(function (a) { return a.toLowerCase(); });
@@ -0,0 +1,4 @@
1
+ import { IPoolData } from "../../interfaces";
2
+ export declare const POOLS_DATA_ARBITRUM: {
3
+ [index: string]: IPoolData;
4
+ };
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.POOLS_DATA_ARBITRUM = void 0;
7
+ var utils_1 = require("../utils");
8
+ var swap_json_1 = __importDefault(require("../abis/2pool/swap.json"));
9
+ var swap_json_2 = __importDefault(require("../abis/tricrypto2/swap.json"));
10
+ var deposit_json_1 = __importDefault(require("../abis/tricrypto2/deposit.json"));
11
+ var swap_json_3 = __importDefault(require("../abis/eursusd2/swap.json"));
12
+ var zap_json_1 = __importDefault(require("../abis/eursusd2/zap.json"));
13
+ var swap_json_4 = __importDefault(require("../abis/ren-arbitrum/swap.json"));
14
+ var gauge_child_json_1 = __importDefault(require("../abis/gauge_child.json"));
15
+ exports.POOLS_DATA_ARBITRUM = (0, utils_1.lowerCasePoolDataAddresses)({
16
+ '2pool': {
17
+ name: "2pool",
18
+ full_name: "2pool",
19
+ symbol: "2pool",
20
+ reference_asset: "USD",
21
+ swap_address: '0x7f90122bf0700f9e7e1f688fe926940e8839f353',
22
+ token_address: '0x7f90122bf0700f9e7e1f688fe926940e8839f353',
23
+ // gauge_address: '0xbF7E49483881C76487b0989CD7d9A8239B20CA41', // Rewards-Only
24
+ gauge_address: '0xCE5F24B7A95e9cBa7df4B54E911B4A3Dc8CDAf6f',
25
+ is_plain: true,
26
+ underlying_coins: ['USDC', 'USDT'],
27
+ wrapped_coins: ['USDC', 'USDT'],
28
+ underlying_coin_addresses: [
29
+ '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8',
30
+ '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9',
31
+ ],
32
+ wrapped_coin_addresses: [
33
+ '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8',
34
+ '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9',
35
+ ],
36
+ underlying_decimals: [6, 6],
37
+ wrapped_decimals: [6, 6],
38
+ swap_abi: swap_json_1.default,
39
+ gauge_abi: gauge_child_json_1.default,
40
+ },
41
+ tricrypto: {
42
+ name: "tricrypto",
43
+ full_name: "tricrypto",
44
+ symbol: "tricrypto",
45
+ reference_asset: 'CRYPTO',
46
+ is_crypto: true,
47
+ swap_address: '0x960ea3e3C7FB317332d990873d354E18d7645590',
48
+ token_address: '0x8e0B8c8BB9db49a46697F3a5Bb8A308e744821D2',
49
+ // gauge_address: '0x97E2768e8E73511cA874545DC5Ff8067eB19B787', // Rewards-Only
50
+ gauge_address: '0x555766f3da968ecBefa690Ffd49A2Ac02f47aa5f',
51
+ deposit_address: '0xF97c707024ef0DD3E77a0824555a46B622bfB500',
52
+ underlying_coins: ['USDT', 'WBTC', 'ETH'],
53
+ wrapped_coins: ['USDT', 'WBTC', 'WETH'],
54
+ underlying_coin_addresses: [
55
+ '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9',
56
+ '0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f',
57
+ '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
58
+ ],
59
+ wrapped_coin_addresses: [
60
+ '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9',
61
+ '0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f',
62
+ '0x82af49447d8a07e3bd95bd0d56f35241523fbab1',
63
+ ],
64
+ underlying_decimals: [6, 8, 18],
65
+ wrapped_decimals: [6, 8, 18],
66
+ swap_abi: swap_json_2.default,
67
+ gauge_abi: gauge_child_json_1.default,
68
+ deposit_abi: deposit_json_1.default,
69
+ },
70
+ 'ren': {
71
+ name: "ren",
72
+ full_name: "ren",
73
+ symbol: "ren",
74
+ reference_asset: 'BTC',
75
+ is_plain: true,
76
+ swap_address: '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb',
77
+ token_address: '0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb',
78
+ // gauge_address: '0xC2b1DF84112619D190193E48148000e3990Bf627', // Rewards-Only
79
+ gauge_address: '0xDB3fd1bfC67b5D4325cb31C04E0Cae52f1787FD6',
80
+ underlying_coins: ['WBTC', 'renBTC'],
81
+ wrapped_coins: ['WBTC', 'renBTC'],
82
+ underlying_coin_addresses: [
83
+ '0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f',
84
+ '0xDBf31dF14B66535aF65AaC99C32e9eA844e14501',
85
+ ],
86
+ wrapped_coin_addresses: [
87
+ '0x2f2a2543B76A4166549F7aaB2e75Bef0aefC5B0f',
88
+ '0xDBf31dF14B66535aF65AaC99C32e9eA844e14501',
89
+ ],
90
+ underlying_decimals: [8, 8],
91
+ wrapped_decimals: [8, 8],
92
+ swap_abi: swap_json_4.default,
93
+ gauge_abi: gauge_child_json_1.default,
94
+ },
95
+ eursusd: {
96
+ name: "eursusd",
97
+ full_name: "eursusd",
98
+ symbol: "eursusd",
99
+ reference_asset: 'CRYPTO',
100
+ swap_address: '0xA827a652Ead76c6B0b3D19dba05452E06e25c27e',
101
+ token_address: '0x3dFe1324A0ee9d86337d06aEB829dEb4528DB9CA',
102
+ // gauge_address: '0x37C7ef6B0E23C9bd9B620A6daBbFEC13CE30D824', // Rewards-Only
103
+ gauge_address: '0x6339eF8Df0C2d3d3E7eE697E241666a916B81587',
104
+ deposit_address: '0x25e2e8d104BC1A70492e2BE32dA7c1f8367F9d2c',
105
+ is_meta: true,
106
+ is_crypto: true,
107
+ base_pool: '2pool',
108
+ underlying_coins: ['EURS', 'USDC', 'USDT'],
109
+ wrapped_coins: ['EURS', '2CRV'],
110
+ underlying_coin_addresses: [
111
+ '0xd22a58f79e9481d1a88e00c343885a588b34b68b',
112
+ '0xff970a61a04b1ca14834a43f5de4533ebddb5cc8',
113
+ '0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9',
114
+ ],
115
+ wrapped_coin_addresses: [
116
+ '0xd22a58f79e9481d1a88e00c343885a588b34b68b',
117
+ '0x7f90122bf0700f9e7e1f688fe926940e8839f353',
118
+ ],
119
+ underlying_decimals: [2, 6, 6],
120
+ wrapped_decimals: [2, 18],
121
+ swap_abi: swap_json_3.default,
122
+ gauge_abi: gauge_child_json_1.default,
123
+ deposit_abi: zap_json_1.default,
124
+ },
125
+ });
@@ -0,0 +1,4 @@
1
+ import { IPoolData } from "../../interfaces";
2
+ export declare const POOLS_DATA_FANTOM: {
3
+ [index: string]: IPoolData;
4
+ };
@@ -0,0 +1,191 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.POOLS_DATA_FANTOM = void 0;
7
+ var utils_1 = require("../utils");
8
+ var swap_json_1 = __importDefault(require("../abis/2pool/swap.json"));
9
+ var swap_json_2 = __importDefault(require("../abis/fusdt/swap.json"));
10
+ var zap_json_1 = __importDefault(require("../abis/fusdt/zap.json"));
11
+ var swap_json_3 = __importDefault(require("../abis/ren-fantom/swap.json"));
12
+ var swapNoZap_json_1 = __importDefault(require("../abis/tricrypto/swapNoZap.json"));
13
+ var swap_json_4 = __importDefault(require("../abis/ib/swap.json"));
14
+ var swap_json_5 = __importDefault(require("../abis/aave/swap.json"));
15
+ // import paaveRewardsabi from '../abis/paave/rewards.json';
16
+ var gauge_child_json_1 = __importDefault(require("../abis/gauge_child.json"));
17
+ var gauge_rewards_only_json_1 = __importDefault(require("../abis/gauge_rewards_only.json"));
18
+ var streamer_json_1 = __importDefault(require("../abis/streamer.json"));
19
+ exports.POOLS_DATA_FANTOM = (0, utils_1.lowerCasePoolDataAddresses)({
20
+ '2pool': {
21
+ name: "2pool",
22
+ full_name: "2pool",
23
+ symbol: "2pool",
24
+ reference_asset: "USD",
25
+ swap_address: '0x27e611fd27b276acbd5ffd632e5eaebec9761e40',
26
+ token_address: '0x27e611fd27b276acbd5ffd632e5eaebec9761e40',
27
+ // old_gauge: '0x0a53FaDa2d943057C47A301D25a4D9b3B8e01e8E', // Unused
28
+ // old_gauge: '0x8866414733F22295b7563f9C5299715D2D76CAf4',
29
+ gauge_address: '0x15bB164F9827De760174d3d3dAD6816eF50dE13c',
30
+ is_plain: true,
31
+ underlying_coins: ['DAI', 'USDC'],
32
+ wrapped_coins: ['DAI', 'USDC'],
33
+ underlying_coin_addresses: [
34
+ '0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e',
35
+ '0x04068da6c83afcfa0e13ba15a6696662335d5b75',
36
+ ],
37
+ wrapped_coin_addresses: [
38
+ '0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e',
39
+ '0x04068da6c83afcfa0e13ba15a6696662335d5b75',
40
+ ],
41
+ underlying_decimals: [18, 6],
42
+ wrapped_decimals: [18, 6],
43
+ swap_abi: swap_json_1.default,
44
+ gauge_abi: gauge_child_json_1.default,
45
+ },
46
+ fusdt: {
47
+ name: "fusdt",
48
+ full_name: "fusdt",
49
+ symbol: "fusdt",
50
+ reference_asset: "USD",
51
+ swap_address: '0x92d5ebf3593a92888c25c0abef126583d4b5312e',
52
+ token_address: '0x92d5ebf3593a92888c25c0abef126583d4b5312e',
53
+ // old_gauge: '0x4f3E8F405CF5aFC05D68142F3783bDfE13811522', // Unused
54
+ gauge_address: '0x06e3C4da96fd076b97b7ca3Ae23527314b6140dF',
55
+ deposit_address: '0xa42bd395f183726d1a8774cfa795771f8acfd777',
56
+ sCurveRewards_address: '0xfe1a3dd8b169fb5bf0d5dbfe813d956f39ff6310',
57
+ is_meta: true,
58
+ base_pool: '2pool',
59
+ underlying_coins: ['fUSDT', 'DAI', 'USDC'],
60
+ wrapped_coins: ['fUSDT', 'DAI+USDC'],
61
+ underlying_coin_addresses: [
62
+ '0x049d68029688eabf473097a2fc38ef61633a3c7a',
63
+ '0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e',
64
+ '0x04068da6c83afcfa0e13ba15a6696662335d5b75',
65
+ ],
66
+ wrapped_coin_addresses: [
67
+ '0x049d68029688eabf473097a2fc38ef61633a3c7a',
68
+ '0x27e611fd27b276acbd5ffd632e5eaebec9761e40',
69
+ ],
70
+ underlying_decimals: [6, 18, 6],
71
+ wrapped_decimals: [6, 18],
72
+ swap_abi: swap_json_2.default,
73
+ gauge_abi: gauge_rewards_only_json_1.default,
74
+ deposit_abi: zap_json_1.default,
75
+ sCurveRewards_abi: streamer_json_1.default,
76
+ },
77
+ ren: {
78
+ name: "ren",
79
+ full_name: "ren",
80
+ symbol: "ren",
81
+ reference_asset: "BTC",
82
+ is_plain: true,
83
+ swap_address: '0x3eF6A01A0f81D6046290f3e2A8c5b843e738E604',
84
+ token_address: '0x5B5CFE992AdAC0C9D48E05854B2d91C73a003858',
85
+ // old_gauge: '0x6600e98b71dabfD4A8Cac03b302B0189Adb86Afb',
86
+ // gauge_address: '0xBdFF0C27dd073C119ebcb1299a68A6A92aE607F0',
87
+ gauge_address: '0xbC38bD19227F91424eD4132F630f51C9A42Fa338',
88
+ underlying_coins: ['BTC', 'renBTC'],
89
+ wrapped_coins: ['BTC', 'renBTC'],
90
+ underlying_coin_addresses: [
91
+ '0x321162Cd933E2Be498Cd2267a90534A804051b11',
92
+ '0xDBf31dF14B66535aF65AaC99C32e9eA844e14501',
93
+ ],
94
+ wrapped_coin_addresses: [
95
+ '0x321162Cd933E2Be498Cd2267a90534A804051b11',
96
+ '0xDBf31dF14B66535aF65AaC99C32e9eA844e14501',
97
+ ],
98
+ underlying_decimals: [8, 8],
99
+ wrapped_decimals: [8, 8],
100
+ swap_abi: swap_json_3.default,
101
+ gauge_abi: gauge_child_json_1.default,
102
+ },
103
+ tricrypto: {
104
+ name: "tricrypto",
105
+ full_name: "tricrypto",
106
+ symbol: "tricrypto",
107
+ reference_asset: "CRYPTO",
108
+ swap_address: '0x3a1659Ddcf2339Be3aeA159cA010979FB49155FF',
109
+ token_address: '0x58e57cA18B7A47112b877E31929798Cd3D703b0f',
110
+ // gauge_address: '0x00702BbDEaD24C40647f235F15971dB0867F6bdB',
111
+ gauge_address: '0x319E268f0A4C85D404734ee7958857F5891506d7',
112
+ is_crypto: true,
113
+ is_plain: true,
114
+ underlying_coins: ['fUSDT', 'BTC', 'ETH'],
115
+ wrapped_coins: ['fUSDT', 'BTC', 'ETH'],
116
+ underlying_coin_addresses: [
117
+ '0x049d68029688eAbF473097a2fC38ef61633A3C7A',
118
+ '0x321162Cd933E2Be498Cd2267a90534A804051b11',
119
+ '0x74b23882a30290451A17c44f4F05243b6b58C76d',
120
+ ],
121
+ wrapped_coin_addresses: [
122
+ '0x049d68029688eAbF473097a2fC38ef61633A3C7A',
123
+ '0x321162Cd933E2Be498Cd2267a90534A804051b11',
124
+ '0x74b23882a30290451A17c44f4F05243b6b58C76d',
125
+ ],
126
+ underlying_decimals: [6, 8, 18],
127
+ wrapped_decimals: [6, 8, 18],
128
+ swap_abi: swapNoZap_json_1.default,
129
+ gauge_abi: gauge_child_json_1.default,
130
+ },
131
+ ib: {
132
+ name: "ib",
133
+ full_name: "ib",
134
+ symbol: "ib",
135
+ reference_asset: "USD",
136
+ swap_address: '0x4FC8D635c3cB1d0aa123859e2B2587d0FF2707b1',
137
+ token_address: '0xDf38ec60c0eC001142a33eAa039e49E9b84E64ED',
138
+ gauge_address: '0xDee85272EAe1aB4afBc6433F4d819BaBC9c7045A',
139
+ sCurveRewards_address: '0x92bbf58c2a4514d44343b987d608627eb7d1d24f',
140
+ is_lending: true,
141
+ underlying_coins: ['DAI', 'USDC', 'fUSDT'],
142
+ wrapped_coins: ['iDAI', 'iUSDC', 'iFUSDT'],
143
+ underlying_coin_addresses: [
144
+ '0x8D11eC38a3EB5E956B052f67Da8Bdc9bef8Abf3E',
145
+ '0x04068DA6C83AFCFA0e13ba15A6696662335D5B75',
146
+ '0x049d68029688eAbF473097a2fC38ef61633A3C7A',
147
+ ],
148
+ wrapped_coin_addresses: [
149
+ '0x04c762a5dF2Fa02FE868F25359E0C259fB811CfE',
150
+ '0x328A7b4d538A2b3942653a9983fdA3C12c571141',
151
+ '0x70faC71debfD67394D1278D98A29dea79DC6E57A',
152
+ ],
153
+ underlying_decimals: [18, 6, 6],
154
+ wrapped_decimals: [8, 8, 8],
155
+ use_lending: [true, true, true],
156
+ swap_abi: swap_json_4.default,
157
+ gauge_abi: gauge_rewards_only_json_1.default,
158
+ sCurveRewards_abi: streamer_json_1.default,
159
+ },
160
+ geist: {
161
+ name: "geist",
162
+ full_name: "geist",
163
+ symbol: "geist",
164
+ reference_asset: "USD",
165
+ swap_address: '0x0fa949783947Bf6c1b171DB13AEACBB488845B3f',
166
+ token_address: '0xD02a30d33153877BC20e5721ee53DeDEE0422B2F',
167
+ // gauge_address: '0xd4F94D0aaa640BBb72b5EEc2D85F6D114D81a88E',
168
+ gauge_address: '0xF7b9c402c4D6c2eDbA04a7a515b53D11B1E9b2cc',
169
+ is_lending: true,
170
+ underlying_coins: ['DAI', 'USDC', 'fUSDT'],
171
+ wrapped_coins: ['gDAI', 'gUSDC', 'gfUSDT'],
172
+ underlying_coin_addresses: [
173
+ '0x8d11ec38a3eb5e956b052f67da8bdc9bef8abf3e',
174
+ '0x04068da6c83afcfa0e13ba15a6696662335d5b75',
175
+ '0x049d68029688eabf473097a2fc38ef61633a3c7a',
176
+ ],
177
+ wrapped_coin_addresses: [
178
+ '0x07e6332dd090d287d3489245038daf987955dcfb',
179
+ '0xe578c856933d8e1082740bf7661e379aa2a30b26',
180
+ '0x940f41f0ec9ba1a34cf001cc03347ac092f5f6b5',
181
+ ],
182
+ underlying_decimals: [18, 6, 6],
183
+ wrapped_decimals: [18, 6, 6],
184
+ use_lending: [true, true, true],
185
+ swap_abi: swap_json_5.default,
186
+ gauge_abi: gauge_child_json_1.default,
187
+ // sCurveRewards_abi: paaveRewardsabi,
188
+ // sCurveRewards_address: '0xd4f94d0aaa640bbb72b5eec2d85f6d114d81a88e',
189
+ // reward_token: "0xd8321aa83fb0a4ecd6348d4577431310a6e0814d",
190
+ },
191
+ });
@@ -1,4 +1,6 @@
1
1
  import { POOLS_DATA_ETHEREUM } from "./ethereum";
2
2
  import { POOLS_DATA_POLYGON } from "./polygon";
3
+ import { POOLS_DATA_FANTOM } from "./fantom";
3
4
  import { POOLS_DATA_AVALANCHE } from "./avalanche";
4
- export { POOLS_DATA_ETHEREUM, POOLS_DATA_POLYGON, POOLS_DATA_AVALANCHE, };
5
+ import { POOLS_DATA_ARBITRUM } from "./arbitrum";
6
+ export { POOLS_DATA_ETHEREUM, POOLS_DATA_POLYGON, POOLS_DATA_FANTOM, POOLS_DATA_AVALANCHE, POOLS_DATA_ARBITRUM, };
@@ -1,9 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.POOLS_DATA_AVALANCHE = exports.POOLS_DATA_POLYGON = exports.POOLS_DATA_ETHEREUM = void 0;
3
+ exports.POOLS_DATA_ARBITRUM = exports.POOLS_DATA_AVALANCHE = exports.POOLS_DATA_FANTOM = exports.POOLS_DATA_POLYGON = exports.POOLS_DATA_ETHEREUM = void 0;
4
4
  var ethereum_1 = require("./ethereum");
5
5
  Object.defineProperty(exports, "POOLS_DATA_ETHEREUM", { enumerable: true, get: function () { return ethereum_1.POOLS_DATA_ETHEREUM; } });
6
6
  var polygon_1 = require("./polygon");
7
7
  Object.defineProperty(exports, "POOLS_DATA_POLYGON", { enumerable: true, get: function () { return polygon_1.POOLS_DATA_POLYGON; } });
8
+ var fantom_1 = require("./fantom");
9
+ Object.defineProperty(exports, "POOLS_DATA_FANTOM", { enumerable: true, get: function () { return fantom_1.POOLS_DATA_FANTOM; } });
8
10
  var avalanche_1 = require("./avalanche");
9
11
  Object.defineProperty(exports, "POOLS_DATA_AVALANCHE", { enumerable: true, get: function () { return avalanche_1.POOLS_DATA_AVALANCHE; } });
12
+ var arbitrum_1 = require("./arbitrum");
13
+ Object.defineProperty(exports, "POOLS_DATA_ARBITRUM", { enumerable: true, get: function () { return arbitrum_1.POOLS_DATA_ARBITRUM; } });
@@ -138,4 +138,34 @@ exports.POOLS_DATA_POLYGON = (0, utils_1.lowerCasePoolDataAddresses)({
138
138
  gauge_abi: gauge_child_json_1.default,
139
139
  deposit_abi: deposit_json_1.default,
140
140
  },
141
+ eursusd: {
142
+ name: "eursusd",
143
+ full_name: "eursusd",
144
+ symbol: "eursusd",
145
+ reference_asset: 'CRYPTO',
146
+ swap_address: '0x9b3d675FDbe6a0935E8B7d1941bc6f78253549B7',
147
+ token_address: '0x7BD9757FbAc089d60DaFF1Fa6bfE3BC99b0F5735',
148
+ gauge_address: '0x18006c6A7955Bf6Db72DE34089B975f733601660',
149
+ deposit_address: '0x4DF7eF55E99a56851187822d96B4E17D98A47DeD',
150
+ is_meta: true,
151
+ is_crypto: true,
152
+ base_pool: 'aave',
153
+ underlying_coins: ['EURS', 'DAI', 'USDC', 'USDT'],
154
+ wrapped_coins: ['EURS', 'am3CRV'],
155
+ underlying_coin_addresses: [
156
+ '0xe111178a87a3bff0c8d18decba5798827539ae99',
157
+ '0x8f3cf7ad23cd3cadbd9735aff958023239c6a063',
158
+ '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',
159
+ '0xc2132d05d31c914a87c6611c10748aeb04b58e8f', // USDT
160
+ ],
161
+ wrapped_coin_addresses: [
162
+ '0xe111178a87a3bff0c8d18decba5798827539ae99',
163
+ '0xE7a24EF0C5e95Ffb0f6684b813A78F2a3AD7D171', // am3CRV
164
+ ],
165
+ underlying_decimals: [2, 18, 6, 6],
166
+ wrapped_decimals: [2, 18],
167
+ swap_abi: swap_json_4.default,
168
+ gauge_abi: gauge_child_json_1.default,
169
+ deposit_abi: deposit_json_1.default,
170
+ },
141
171
  });
package/lib/curve.js CHANGED
@@ -82,7 +82,9 @@ var factory_crypto_json_1 = __importDefault(require("./constants/abis/factory-cr
82
82
  var pools_1 = require("./constants/pools");
83
83
  var ethereum_1 = require("./constants/coins/ethereum");
84
84
  var polygon_1 = require("./constants/coins/polygon");
85
+ var fantom_1 = require("./constants/coins/fantom");
85
86
  var avalanche_1 = require("./constants/coins/avalanche");
87
+ var arbitrum_1 = require("./constants/coins/arbitrum");
86
88
  var aliases_1 = require("./constants/aliases");
87
89
  var utils_1 = require("./constants/utils");
88
90
  exports.NETWORK_CONSTANTS = {
@@ -106,6 +108,16 @@ exports.NETWORK_CONSTANTS = {
106
108
  ycTokens: polygon_1.ycTokensPolygon,
107
109
  aTokens: polygon_1.aTokensPolygon,
108
110
  },
111
+ 250: {
112
+ NAME: 'fantom',
113
+ ALIASES: aliases_1.ALIASES_FANTOM,
114
+ POOLS_DATA: pools_1.POOLS_DATA_FANTOM,
115
+ COINS: fantom_1.COINS_FANTOM,
116
+ cTokens: fantom_1.cTokensFantom,
117
+ yTokens: fantom_1.yTokensFantom,
118
+ ycTokens: fantom_1.ycTokensFantom,
119
+ aTokens: fantom_1.aTokensFantom,
120
+ },
109
121
  43114: {
110
122
  NAME: 'avalanche',
111
123
  ALIASES: aliases_1.ALIASES_AVALANCHE,
@@ -116,6 +128,16 @@ exports.NETWORK_CONSTANTS = {
116
128
  ycTokens: avalanche_1.ycTokensAvalanche,
117
129
  aTokens: avalanche_1.aTokensAvalanche,
118
130
  },
131
+ 42161: {
132
+ NAME: 'arbitrum',
133
+ ALIASES: aliases_1.ALIASES_ARBITRUM,
134
+ POOLS_DATA: pools_1.POOLS_DATA_ARBITRUM,
135
+ COINS: arbitrum_1.COINS_ARBITRUM,
136
+ cTokens: arbitrum_1.cTokensArbitrum,
137
+ yTokens: arbitrum_1.yTokensArbitrum,
138
+ ycTokens: arbitrum_1.ycTokensArbitrum,
139
+ aTokens: arbitrum_1.aTokensArbitrum,
140
+ },
119
141
  };
120
142
  var Curve = /** @class */ (function () {
121
143
  function Curve() {
@@ -146,7 +168,7 @@ var Curve = /** @class */ (function () {
146
168
  ) {
147
169
  if (options === void 0) { options = {}; }
148
170
  return __awaiter(this, void 0, void 0, function () {
149
- var network, _a, _b, cTokens, yTokens, ycTokens, aTokens, customAbiTokens, _c, _i, _d, pool, _e, _f, coinAddr, _g, _h, coinAddr, _j, _k, coinAddr, _minterABI, addressProviderContract, _l;
171
+ var network, _a, _b, cTokens, yTokens, ycTokens, aTokens, customAbiTokens, _c, err_1, _i, _d, pool, _e, _f, coinAddr, _g, _h, coinAddr, _j, _k, coinAddr, _minterABI, addressProviderContract, _l;
150
172
  return __generator(this, function (_m) {
151
173
  switch (_m.label) {
152
174
  case 0:
@@ -236,19 +258,27 @@ var Curve = /** @class */ (function () {
236
258
  return [4 /*yield*/, this.multicallProvider.init(this.provider)];
237
259
  case 3:
238
260
  _m.sent();
239
- if (!this.signer) return [3 /*break*/, 5];
261
+ if (!this.signer) return [3 /*break*/, 8];
262
+ _m.label = 4;
263
+ case 4:
264
+ _m.trys.push([4, 6, , 7]);
240
265
  _c = this;
241
266
  return [4 /*yield*/, this.signer.getAddress()];
242
- case 4:
243
- _c.signerAddress = _m.sent();
244
- return [3 /*break*/, 6];
245
267
  case 5:
246
- this.signerAddress = '';
247
- _m.label = 6;
268
+ _c.signerAddress = _m.sent();
269
+ return [3 /*break*/, 7];
248
270
  case 6:
271
+ err_1 = _m.sent();
272
+ this.signer = null;
273
+ return [3 /*break*/, 7];
274
+ case 7: return [3 /*break*/, 9];
275
+ case 8:
276
+ this.signerAddress = '';
277
+ _m.label = 9;
278
+ case 9:
249
279
  this.feeData = { gasPrice: options.gasPrice, maxFeePerGas: options.maxFeePerGas, maxPriorityFeePerGas: options.maxPriorityFeePerGas };
250
280
  return [4 /*yield*/, this.updateFeeData()];
251
- case 7:
281
+ case 10:
252
282
  _m.sent();
253
283
  for (_i = 0, _d = Object.values(this.constants.POOLS_DATA); _i < _d.length; _i++) {
254
284
  pool = _d[_i];
@@ -283,6 +313,8 @@ var Curve = /** @class */ (function () {
283
313
  coinAddr = _h[_g];
284
314
  if (customAbiTokens.includes(coinAddr))
285
315
  continue;
316
+ if (coinAddr in this.contracts)
317
+ continue;
286
318
  this.contracts[coinAddr] = {
287
319
  contract: new ethers_1.Contract(coinAddr, ERC20_json_1.default, this.signer || this.provider),
288
320
  multicallContract: new ethcall_1.Contract(coinAddr, ERC20_json_1.default),
@@ -360,7 +392,7 @@ var Curve = /** @class */ (function () {
360
392
  addressProviderContract = this.contracts[this.constants.ALIASES.address_provider].contract;
361
393
  _l = this.constants.ALIASES;
362
394
  return [4 /*yield*/, addressProviderContract.get_address(2, this.constantOptions)];
363
- case 8:
395
+ case 11:
364
396
  _l.registry_exchange = _m.sent();
365
397
  this.contracts[this.constants.ALIASES.registry_exchange] = {
366
398
  contract: new ethers_1.Contract(this.constants.ALIASES.registry_exchange, registry_exchange_json_1.default, this.signer || this.provider),
@@ -451,7 +483,7 @@ var Curve = /** @class */ (function () {
451
483
  return __generator(this, function (_e) {
452
484
  switch (_e.label) {
453
485
  case 0:
454
- if (this.chainId !== 1 && this.chainId !== 137)
486
+ if (![1, 137, 250].includes(this.chainId))
455
487
  return [2 /*return*/];
456
488
  if (!useApi) return [3 /*break*/, 2];
457
489
  _a = this.constants;