@gearbox-protocol/sdk 1.18.2 → 1.18.3
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.
- package/lib/core/chains.d.ts +6 -0
- package/lib/core/chains.js +7 -1
- package/package.json +1 -1
package/lib/core/chains.d.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import { ethers } from "ethers";
|
|
2
2
|
export declare const MAINNET_NETWORK = 1;
|
|
3
3
|
export declare const GOERLI_NETWORK = 5;
|
|
4
|
+
export declare const OPTIMISM_NETWORK = 10;
|
|
5
|
+
export declare const POLYGON_NETWORK = 137;
|
|
4
6
|
export declare const LOCAL_NETWORK = 1337;
|
|
5
7
|
export declare const HARDHAT_NETWORK = 31337;
|
|
8
|
+
export declare const ARBITRUM_NETWORK = 42161;
|
|
6
9
|
export declare const CHAINS: {
|
|
7
10
|
readonly Mainnet: 1;
|
|
8
11
|
readonly Goerli: 5;
|
|
9
12
|
readonly Local: 1337;
|
|
10
13
|
readonly Hardhat: 31337;
|
|
14
|
+
readonly Optimism: 10;
|
|
15
|
+
readonly Polygon: 137;
|
|
16
|
+
readonly Arbiturum: 42161;
|
|
11
17
|
};
|
|
12
18
|
export declare type NetworkType = "Mainnet" | "Goerli";
|
|
13
19
|
export declare const getNetworkType: (chainId: number, localAs?: NetworkType) => NetworkType;
|
package/lib/core/chains.js
CHANGED
|
@@ -37,19 +37,25 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
var _a;
|
|
39
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.detectNetwork = exports.isSupportedNetwork = exports.getNetworkType = exports.CHAINS = exports.HARDHAT_NETWORK = exports.LOCAL_NETWORK = exports.GOERLI_NETWORK = exports.MAINNET_NETWORK = void 0;
|
|
40
|
+
exports.detectNetwork = exports.isSupportedNetwork = exports.getNetworkType = exports.CHAINS = exports.ARBITRUM_NETWORK = exports.HARDHAT_NETWORK = exports.LOCAL_NETWORK = exports.POLYGON_NETWORK = exports.OPTIMISM_NETWORK = exports.GOERLI_NETWORK = exports.MAINNET_NETWORK = void 0;
|
|
41
41
|
var token_1 = require("../tokens/token");
|
|
42
42
|
var types_1 = require("../types");
|
|
43
43
|
var constants_1 = require("./constants");
|
|
44
44
|
exports.MAINNET_NETWORK = 1;
|
|
45
45
|
exports.GOERLI_NETWORK = 5;
|
|
46
|
+
exports.OPTIMISM_NETWORK = 10;
|
|
47
|
+
exports.POLYGON_NETWORK = 137;
|
|
46
48
|
exports.LOCAL_NETWORK = 1337;
|
|
47
49
|
exports.HARDHAT_NETWORK = 31337;
|
|
50
|
+
exports.ARBITRUM_NETWORK = 42161;
|
|
48
51
|
exports.CHAINS = {
|
|
49
52
|
Mainnet: exports.MAINNET_NETWORK,
|
|
50
53
|
Goerli: exports.GOERLI_NETWORK,
|
|
51
54
|
Local: exports.LOCAL_NETWORK,
|
|
52
55
|
Hardhat: exports.HARDHAT_NETWORK,
|
|
56
|
+
Optimism: exports.OPTIMISM_NETWORK,
|
|
57
|
+
Polygon: exports.POLYGON_NETWORK,
|
|
58
|
+
Arbiturum: exports.ARBITRUM_NETWORK,
|
|
53
59
|
};
|
|
54
60
|
var SUPPORTED_CHAINS = (_a = {},
|
|
55
61
|
_a[exports.CHAINS.Mainnet] = "Mainnet",
|