@curvefi/api 2.5.1 → 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.
@@ -2,3 +2,4 @@ export declare const ALIASES_ETHEREUM: import("../interfaces").IDict<string>;
2
2
  export declare const ALIASES_POLYGON: import("../interfaces").IDict<string>;
3
3
  export declare const ALIASES_FANTOM: import("../interfaces").IDict<string>;
4
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_FANTOM = 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",
@@ -50,3 +50,15 @@ exports.ALIASES_AVALANCHE = (0, utils_1.lowerCaseValues)({
50
50
  "crypto_factory": '0xF18056Bbd320E96A48e3Fbf8bC061322531aac99',
51
51
  "registry_exchange": "",
52
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,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
+ });
@@ -2,4 +2,5 @@ import { POOLS_DATA_ETHEREUM } from "./ethereum";
2
2
  import { POOLS_DATA_POLYGON } from "./polygon";
3
3
  import { POOLS_DATA_FANTOM } from "./fantom";
4
4
  import { POOLS_DATA_AVALANCHE } from "./avalanche";
5
- export { POOLS_DATA_ETHEREUM, POOLS_DATA_POLYGON, POOLS_DATA_FANTOM, 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,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.POOLS_DATA_AVALANCHE = exports.POOLS_DATA_FANTOM = 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");
@@ -9,3 +9,5 @@ var fantom_1 = require("./fantom");
9
9
  Object.defineProperty(exports, "POOLS_DATA_FANTOM", { enumerable: true, get: function () { return fantom_1.POOLS_DATA_FANTOM; } });
10
10
  var avalanche_1 = require("./avalanche");
11
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; } });
package/lib/curve.js CHANGED
@@ -84,6 +84,7 @@ var ethereum_1 = require("./constants/coins/ethereum");
84
84
  var polygon_1 = require("./constants/coins/polygon");
85
85
  var fantom_1 = require("./constants/coins/fantom");
86
86
  var avalanche_1 = require("./constants/coins/avalanche");
87
+ var arbitrum_1 = require("./constants/coins/arbitrum");
87
88
  var aliases_1 = require("./constants/aliases");
88
89
  var utils_1 = require("./constants/utils");
89
90
  exports.NETWORK_CONSTANTS = {
@@ -127,6 +128,16 @@ exports.NETWORK_CONSTANTS = {
127
128
  ycTokens: avalanche_1.ycTokensAvalanche,
128
129
  aTokens: avalanche_1.aTokensAvalanche,
129
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
+ },
130
141
  };
131
142
  var Curve = /** @class */ (function () {
132
143
  function Curve() {
@@ -66,5 +66,17 @@ function setFactoryZapContracts() {
66
66
  multicallContract: new ethcall_1.Contract(metaBtcZapAddress, DepositZapMetaBtcPolygon_json_1.default),
67
67
  };
68
68
  }
69
+ else if (this.chainId === 42161) {
70
+ var metaUsdZapAddress = "0x7544Fe3d184b6B55D6B36c3FCA1157eE0Ba30287".toLowerCase();
71
+ this.contracts[metaUsdZapAddress] = {
72
+ contract: new ethers_1.Contract(metaUsdZapAddress, DepositZapFantom_json_1.default, this.signer || this.provider),
73
+ multicallContract: new ethcall_1.Contract(metaUsdZapAddress, DepositZapFantom_json_1.default),
74
+ };
75
+ var metaBtcZapAddress = "0x803A2B40c5a9BB2B86DD630B274Fa2A9202874C2".toLowerCase();
76
+ this.contracts[metaBtcZapAddress] = {
77
+ contract: new ethers_1.Contract(metaBtcZapAddress, DepositZapFantom_json_1.default, this.signer || this.provider),
78
+ multicallContract: new ethcall_1.Contract(metaBtcZapAddress, DepositZapFantom_json_1.default),
79
+ };
80
+ }
69
81
  }
70
82
  exports.setFactoryZapContracts = setFactoryZapContracts;
@@ -3,14 +3,17 @@ export declare const implementationABIDictEthereum: IDict<any>;
3
3
  export declare const implementationABIDictPolygon: IDict<any>;
4
4
  export declare const implementationABIDictFantom: IDict<any>;
5
5
  export declare const implementationABIDictAvalanche: IDict<any>;
6
+ export declare const implementationABIDictArbitrum: IDict<any>;
6
7
  export declare const implementationBasePoolIdDictEthereum: IDict<string>;
7
8
  export declare const implementationBasePoolIdDictPolygon: IDict<string>;
8
9
  export declare const implementationBasePoolIdDictFantom: IDict<string>;
9
10
  export declare const implementationBasePoolIdDictAvalanche: IDict<string>;
11
+ export declare const implementationBasePoolIdDictArbitrum: IDict<string>;
10
12
  export declare const basePoolIdZapDictEthereum: IDict<string>;
11
13
  export declare const basePoolIdZapDictPolygon: IDict<string>;
12
14
  export declare const basePoolIdZapDictFantom: IDict<string>;
13
15
  export declare const basePoolIdZapDictAvalanche: IDict<string>;
16
+ export declare const basePoolIdZapDictArbitrum: IDict<string>;
14
17
  export declare const NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
15
18
  export declare const NATIVE_TOKENS: {
16
19
  [index: number]: {
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.FACTORY_CONSTANTS = exports.NATIVE_TOKENS = exports.NATIVE_TOKEN_ADDRESS = exports.basePoolIdZapDictAvalanche = exports.basePoolIdZapDictFantom = exports.basePoolIdZapDictPolygon = exports.basePoolIdZapDictEthereum = exports.implementationBasePoolIdDictAvalanche = exports.implementationBasePoolIdDictFantom = exports.implementationBasePoolIdDictPolygon = exports.implementationBasePoolIdDictEthereum = exports.implementationABIDictAvalanche = exports.implementationABIDictFantom = exports.implementationABIDictPolygon = exports.implementationABIDictEthereum = void 0;
6
+ exports.FACTORY_CONSTANTS = exports.NATIVE_TOKENS = exports.NATIVE_TOKEN_ADDRESS = exports.basePoolIdZapDictArbitrum = exports.basePoolIdZapDictAvalanche = exports.basePoolIdZapDictFantom = exports.basePoolIdZapDictPolygon = exports.basePoolIdZapDictEthereum = exports.implementationBasePoolIdDictArbitrum = exports.implementationBasePoolIdDictAvalanche = exports.implementationBasePoolIdDictFantom = exports.implementationBasePoolIdDictPolygon = exports.implementationBasePoolIdDictEthereum = exports.implementationABIDictArbitrum = exports.implementationABIDictAvalanche = exports.implementationABIDictFantom = exports.implementationABIDictPolygon = exports.implementationABIDictEthereum = void 0;
7
7
  var swap_json_1 = __importDefault(require("../constants/abis/factoryPools/swap.json"));
8
8
  var MetaUSD_json_1 = __importDefault(require("../constants/abis/factory-v2/MetaUSD.json"));
9
9
  var MetaUSDBalances_json_1 = __importDefault(require("../constants/abis/factory-v2/MetaUSDBalances.json"));
@@ -105,6 +105,24 @@ exports.implementationABIDictAvalanche = {
105
105
  "0x0eb0F1FaF5F509Ac53fA224477509EAD167cf410": Plain4ETH_json_1.default,
106
106
  "0xCE94D3E5b0D80565D7B713A687b39a3Dc81780BA": Plain4Optimized_json_1.default,
107
107
  };
108
+ exports.implementationABIDictArbitrum = {
109
+ "0x09672362833d8f703D5395ef3252D4Bfa51c15ca": MetaUSD_json_1.default,
110
+ "0xBE175115BF33E12348ff77CcfEE4726866A0Fbd5": MetaUSDBalances_json_1.default,
111
+ "0x094d12e5b541784701FD8d65F11fc0598FBC6332": MetaBTCRen_json_1.default,
112
+ "0xF1f85a74AD6c64315F85af52d3d46bF715236ADc": MetaBTCBalancesRen_json_1.default,
113
+ "0x54e8A25d0Ac0E4945b697C80b8372445FEA17A62": Plain2Basic_json_1.default,
114
+ "0xD68970e266cE1A015953897C7055a5E0bC657Af8": Plain2Balances_json_1.default,
115
+ "0x7DA64233Fefb352f8F501B357c018158ED8aA455": Plain2ETH_json_1.default,
116
+ "0x0100fBf414071977B19fC38e6fc7c32FE444F5C9": Plain2Optimized_json_1.default,
117
+ "0xe381C25de995d62b453aF8B931aAc84fcCaa7A62": Plain3Basic_json_1.default,
118
+ "0xc379bA7b8e1c6C48D64e1cf9dD602C97c9fD0F40": Plain3Balances_json_1.default,
119
+ "0xAAe75FAebCae43b9d541Fd875622BE48D9B4f5D0": Plain3ETH_json_1.default,
120
+ "0x8866414733F22295b7563f9C5299715D2D76CAf4": Plain3Optimized_json_1.default,
121
+ "0x8d53E5De033078367Ad91527c53abfd1Eb6bfa86": Plain4Basic_json_1.default,
122
+ "0x2ac56cEBc2D27c9bB51a11773355E44371Eb88D3": Plain4Balances_json_1.default,
123
+ "0x89287c32c2CAC1C76227F6d300B2DBbab6b75C08": Plain4ETH_json_1.default,
124
+ "0x06e3C4da96fd076b97b7ca3Ae23527314b6140dF": Plain4Optimized_json_1.default,
125
+ };
108
126
  exports.implementationBasePoolIdDictEthereum = {
109
127
  "0x5F890841f657d90E081bAbdB532A05996Af79Fe6": "3pool",
110
128
  "0x213be373FDff327658139C7df330817DAD2d5bBE": "3pool",
@@ -136,6 +154,12 @@ exports.implementationBasePoolIdDictAvalanche = {
136
154
  "0xa27f39E9C21b3376F43266E13Ad5A5d6E9BdB320": "ren",
137
155
  "0x505C34ED8dBE96d2D5C7D83158aA844887770970": "ren",
138
156
  };
157
+ exports.implementationBasePoolIdDictArbitrum = {
158
+ "0x09672362833d8f703D5395ef3252D4Bfa51c15ca": "2pool",
159
+ "0xBE175115BF33E12348ff77CcfEE4726866A0Fbd5": "2pool",
160
+ "0x094d12e5b541784701FD8d65F11fc0598FBC6332": "ren",
161
+ "0xF1f85a74AD6c64315F85af52d3d46bF715236ADc": "ren",
162
+ };
139
163
  exports.basePoolIdZapDictEthereum = {
140
164
  '3pool': "0xA79828DF1850E8a3A3064576f380D90aECDD3359".toLowerCase(),
141
165
  fraxusdc: "0x08780fb7E580e492c1935bEe4fA5920b94AA95Da".toLowerCase(),
@@ -155,22 +179,31 @@ exports.basePoolIdZapDictAvalanche = {
155
179
  aave: "0x001E3BA199B4FF4B5B6e97aCD96daFC0E2e4156e".toLowerCase(),
156
180
  ren: "0xEeB3DDBcc4174e0b3fd1C13aD462b95D11Ef42C3".toLowerCase(),
157
181
  };
182
+ exports.basePoolIdZapDictArbitrum = {
183
+ "2pool": "0x7544Fe3d184b6B55D6B36c3FCA1157eE0Ba30287".toLowerCase(),
184
+ ren: "0x803A2B40c5a9BB2B86DD630B274Fa2A9202874C2".toLowerCase(),
185
+ };
158
186
  exports.NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
159
187
  exports.NATIVE_TOKENS = {
160
188
  1: {
161
189
  symbol: 'ETH',
162
190
  wrappedSymbol: 'WETH',
163
- wrappedAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
191
+ wrappedAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'.toLowerCase(),
164
192
  },
165
193
  137: {
166
194
  symbol: 'MATIC',
167
195
  wrappedSymbol: 'WMATIC',
168
- wrappedAddress: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270',
196
+ wrappedAddress: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270'.toLowerCase(),
169
197
  },
170
198
  250: {
171
199
  symbol: 'FTM',
172
200
  wrappedSymbol: 'WFTM',
173
- wrappedAddress: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83',
201
+ wrappedAddress: '0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83'.toLowerCase(),
202
+ },
203
+ 42161: {
204
+ symbol: 'ETH',
205
+ wrappedSymbol: 'WETH',
206
+ wrappedAddress: '0x82af49447d8a07e3bd95bd0d56f35241523fbab1'.toLowerCase(),
174
207
  },
175
208
  };
176
209
  exports.FACTORY_CONSTANTS = {
@@ -194,4 +227,9 @@ exports.FACTORY_CONSTANTS = {
194
227
  implementationBasePoolIdDict: exports.implementationBasePoolIdDictAvalanche,
195
228
  basePoolIdZapDict: exports.basePoolIdZapDictAvalanche,
196
229
  },
230
+ 42161: {
231
+ implementationABIDict: exports.implementationABIDictArbitrum,
232
+ implementationBasePoolIdDict: exports.implementationBasePoolIdDictArbitrum,
233
+ basePoolIdZapDict: exports.basePoolIdZapDictArbitrum,
234
+ },
197
235
  };
@@ -229,6 +229,8 @@ function getExistingCoinAddressNameDict() {
229
229
  dict[constants_1.NATIVE_TOKEN_ADDRESS] = "FTM";
230
230
  if (this.chainId === 43114)
231
231
  dict[constants_1.NATIVE_TOKEN_ADDRESS] = "AVAX";
232
+ if (this.chainId === 42161)
233
+ dict[constants_1.NATIVE_TOKEN_ADDRESS] = "ETH";
232
234
  return dict;
233
235
  }
234
236
  function getCoinAddressNameDict(coinAddresses, existingCoinAddrNameDict) {
@@ -65,6 +65,7 @@ var BLACK_LIST = {
65
65
  ],
66
66
  250: [],
67
67
  43114: [],
68
+ 42161: [],
68
69
  };
69
70
  var deepFlatten = function (arr) { return [].concat.apply([], arr.map(function (v) { return (Array.isArray(v) ? deepFlatten(v) : v); })); };
70
71
  function getFactoryIdsAndSwapAddresses() {
@@ -260,6 +261,8 @@ function getExistingCoinAddressNameDict() {
260
261
  dict["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"] = "FTM";
261
262
  if (this.chainId === 43114)
262
263
  dict["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"] = "AVAX";
264
+ if (this.chainId === 42161)
265
+ dict["0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"] = "ETH";
263
266
  return dict;
264
267
  }
265
268
  function getCoinAddressNameDict(coinAddresses, existingCoinAddrNameDict) {
@@ -262,7 +262,7 @@ var PoolTemplate = /** @class */ (function () {
262
262
  case 0:
263
263
  if (this.gauge === ethers_1.ethers.constants.AddressZero)
264
264
  return [2 /*return*/, []];
265
- if (![137, 250, 43114].includes(curve_1.curve.chainId)) return [3 /*break*/, 8];
265
+ if (![137, 250, 43114, 42161].includes(curve_1.curve.chainId)) return [3 /*break*/, 8];
266
266
  apy = [];
267
267
  return [4 /*yield*/, this.rewardTokens()];
268
268
  case 1:
@@ -16,6 +16,7 @@ var __extends = (this && this.__extends) || (function () {
16
16
  })();
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.getPool = void 0;
19
+ var curve_1 = require("../curve");
19
20
  var PoolTemplate_1 = require("./PoolTemplate");
20
21
  var poolBalancesMixin_1 = require("./mixins/poolBalancesMixin");
21
22
  var depositBalancedAmountsMixins_1 = require("./mixins/depositBalancedAmountsMixins");
@@ -226,7 +227,7 @@ var getPool = function (poolId) {
226
227
  }
227
228
  }
228
229
  // swap and swapEstimateGas
229
- if (poolId === 'tricrypto2') {
230
+ if ('exchange(uint256,uint256,uint256,uint256,bool)' in curve_1.curve.contracts[poolDummy.address].contract) { // tricrypto2 (eth), tricrypto (arbitrum)
230
231
  Object.assign(Pool.prototype, swapMixins_1.swapTricrypto2Mixin);
231
232
  }
232
233
  else if (poolDummy.isMetaFactory && (0, exports.getPool)(poolDummy.basePool).isLending) {
@@ -238,7 +239,7 @@ var getPool = function (poolId) {
238
239
  // swapWrapped and swapWrappedEstimateGas
239
240
  if (!poolDummy.isPlain && !poolDummy.isFake) {
240
241
  Object.assign(Pool.prototype, swapWrappedMixins_1.swapWrappedExpectedAndApproveMixin);
241
- if (poolId === 'tricrypto2') {
242
+ if ('exchange(uint256,uint256,uint256,uint256,bool)' in curve_1.curve.contracts[poolDummy.address].contract) { // tricrypto2 (eth), tricrypto (arbitrum)
242
243
  Object.assign(Pool.prototype, swapWrappedMixins_1.swapWrappedTricrypto2Mixin);
243
244
  }
244
245
  else {
package/lib/utils.js CHANGED
@@ -455,12 +455,14 @@ var _getUsdRate = function (assetId) { return __awaiter(void 0, void 0, void 0,
455
455
  137: 'polygon-pos',
456
456
  250: 'fantom',
457
457
  43114: 'avalanche',
458
+ 42161: 'arbitrum-one',
458
459
  }[curve_1.curve.chainId];
459
460
  nativeTokenName = {
460
461
  1: 'ethereum',
461
462
  137: 'matic-network',
462
463
  250: 'fantom',
463
464
  43114: 'avalanche-2',
465
+ 42161: 'ethereum',
464
466
  }[curve_1.curve.chainId];
465
467
  if (chainName === undefined) {
466
468
  throw Error('curve object is not initialized');
@@ -526,6 +528,7 @@ var getTVL = function (chainId) {
526
528
  137: "polygon",
527
529
  250: "fantom",
528
530
  43114: "avalanche",
531
+ 42161: "arbitrum",
529
532
  }[chainId]) !== null && _a !== void 0 ? _a : "ethereum";
530
533
  promises = [
531
534
  (0, external_api_1._getPoolsFromApi)(network, "main"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "2.5.1",
3
+ "version": "2.6.0",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "author": "Macket",