@gainsnetwork/sdk 0.0.18 → 0.0.19

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 (146) hide show
  1. package/README.md +11 -11
  2. package/lib/constants.d.ts +135 -0
  3. package/lib/constants.js +123 -0
  4. package/lib/contracts/addresses.d.ts +2 -2
  5. package/lib/contracts/addresses.js +15 -15
  6. package/lib/contracts/addresses.json +23 -23
  7. package/lib/contracts/index.d.ts +6 -6
  8. package/lib/contracts/index.js +32 -32
  9. package/lib/contracts/types/generated/GFarmTradingStorageV5.d.ts +1911 -1911
  10. package/lib/contracts/types/generated/GFarmTradingStorageV5.js +2 -2
  11. package/lib/contracts/types/generated/GNSNftRewardsV6.d.ts +533 -533
  12. package/lib/contracts/types/generated/GNSNftRewardsV6.js +2 -2
  13. package/lib/contracts/types/generated/GNSPairInfosV6_1.d.ts +911 -911
  14. package/lib/contracts/types/generated/GNSPairInfosV6_1.js +2 -2
  15. package/lib/contracts/types/generated/GNSPairsStorageV6.d.ts +660 -660
  16. package/lib/contracts/types/generated/GNSPairsStorageV6.js +2 -2
  17. package/lib/contracts/types/generated/GTokenOpenPnlFeed.d.ts +557 -557
  18. package/lib/contracts/types/generated/GTokenOpenPnlFeed.js +2 -2
  19. package/lib/contracts/types/generated/common.d.ts +22 -22
  20. package/lib/contracts/types/generated/common.js +2 -2
  21. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.d.ts +83 -83
  22. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.js +2691 -2691
  23. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.d.ts +100 -100
  24. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.js +1003 -1003
  25. package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.d.ts +98 -98
  26. package/lib/contracts/types/generated/factories/GNSPairInfosV6_1__factory.js +1485 -1485
  27. package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.d.ts +117 -117
  28. package/lib/contracts/types/generated/factories/GNSPairsStorageV6__factory.js +1265 -1265
  29. package/lib/contracts/types/generated/factories/GTokenOpenPnlFeed__factory.d.ts +59 -59
  30. package/lib/contracts/types/generated/factories/GTokenOpenPnlFeed__factory.js +765 -765
  31. package/lib/contracts/types/generated/factories/index.d.ts +5 -5
  32. package/lib/contracts/types/generated/factories/index.js +16 -16
  33. package/lib/contracts/types/generated/index.d.ts +11 -11
  34. package/lib/contracts/types/generated/index.js +37 -37
  35. package/lib/contracts/types/index.d.ts +16 -16
  36. package/lib/contracts/types/index.js +2 -2
  37. package/lib/contracts/utils/index.d.ts +3 -3
  38. package/lib/contracts/utils/index.js +19 -19
  39. package/lib/contracts/utils/openLimitOrders.d.ts +8 -8
  40. package/lib/contracts/utils/openLimitOrders.js +77 -77
  41. package/lib/contracts/utils/openTrades.d.ts +9 -9
  42. package/lib/contracts/utils/openTrades.js +193 -169
  43. package/lib/contracts/utils/pairs.d.ts +6 -6
  44. package/lib/contracts/utils/pairs.js +102 -102
  45. package/lib/index.d.ts +4 -3
  46. package/lib/index.js +20 -19
  47. package/lib/markets/commodities.d.ts +1 -1
  48. package/lib/markets/commodities.js +31 -31
  49. package/lib/markets/crypto.d.ts +1 -1
  50. package/lib/markets/crypto.js +6 -6
  51. package/lib/markets/forex.d.ts +2 -2
  52. package/lib/markets/forex.js +38 -38
  53. package/lib/markets/index.d.ts +5 -5
  54. package/lib/markets/index.js +21 -21
  55. package/lib/markets/indices.d.ts +1 -1
  56. package/lib/markets/indices.js +6 -6
  57. package/lib/markets/stocks.d.ts +3 -3
  58. package/lib/markets/stocks.js +54 -54
  59. package/lib/trade/fees.d.ts +15 -15
  60. package/lib/trade/fees.js +45 -45
  61. package/lib/trade/index.d.ts +2 -2
  62. package/lib/trade/index.js +18 -18
  63. package/lib/trade/pnl.d.ts +7 -7
  64. package/lib/trade/pnl.js +43 -43
  65. package/lib/trade/types.d.ts +157 -157
  66. package/lib/trade/types.js +8 -8
  67. package/package.json +104 -104
  68. package/lib/contracts/types/GFarmTradingStorageV5.d.ts +0 -1911
  69. package/lib/contracts/types/GFarmTradingStorageV5.js +0 -2
  70. package/lib/contracts/types/GNSPairInfosV6_1.d.ts +0 -911
  71. package/lib/contracts/types/GNSPairInfosV6_1.js +0 -2
  72. package/lib/contracts/types/GNSPairsStorageV6.d.ts +0 -660
  73. package/lib/contracts/types/GNSPairsStorageV6.js +0 -2
  74. package/lib/contracts/types/common.d.ts +0 -22
  75. package/lib/contracts/types/common.js +0 -2
  76. package/lib/contracts/types/factories/GFarmTradingStorageV5__factory.d.ts +0 -83
  77. package/lib/contracts/types/factories/GFarmTradingStorageV5__factory.js +0 -2691
  78. package/lib/contracts/types/factories/GNSPairInfosV6_1__factory.d.ts +0 -98
  79. package/lib/contracts/types/factories/GNSPairInfosV6_1__factory.js +0 -1485
  80. package/lib/contracts/types/factories/GNSPairsStorageV6__factory.d.ts +0 -117
  81. package/lib/contracts/types/factories/GNSPairsStorageV6__factory.js +0 -1265
  82. package/lib/contracts/types/factories/index.d.ts +0 -3
  83. package/lib/contracts/types/factories/index.js +0 -12
  84. package/lib/contracts/utils/openTradesOriginal.d.ts +0 -3
  85. package/lib/contracts/utils/openTradesOriginal.js +0 -134
  86. package/lib/src/contracts/addresses.d.ts +0 -2
  87. package/lib/src/contracts/addresses.js +0 -15
  88. package/lib/src/contracts/addresses.json +0 -20
  89. package/lib/src/contracts/index.d.ts +0 -6
  90. package/lib/src/contracts/index.js +0 -31
  91. package/lib/src/contracts/types/generated/GFarmTradingStorageV5.d.ts +0 -1911
  92. package/lib/src/contracts/types/generated/GFarmTradingStorageV5.js +0 -2
  93. package/lib/src/contracts/types/generated/GNSPairInfosV6_1.d.ts +0 -911
  94. package/lib/src/contracts/types/generated/GNSPairInfosV6_1.js +0 -2
  95. package/lib/src/contracts/types/generated/GNSPairsStorageV6.d.ts +0 -660
  96. package/lib/src/contracts/types/generated/GNSPairsStorageV6.js +0 -2
  97. package/lib/src/contracts/types/generated/GTokenOpenPnlFeed.d.ts +0 -557
  98. package/lib/src/contracts/types/generated/GTokenOpenPnlFeed.js +0 -2
  99. package/lib/src/contracts/types/generated/common.d.ts +0 -22
  100. package/lib/src/contracts/types/generated/common.js +0 -2
  101. package/lib/src/contracts/types/generated/factories/GFarmTradingStorageV5__factory.d.ts +0 -83
  102. package/lib/src/contracts/types/generated/factories/GFarmTradingStorageV5__factory.js +0 -2691
  103. package/lib/src/contracts/types/generated/factories/GNSPairInfosV6_1__factory.d.ts +0 -98
  104. package/lib/src/contracts/types/generated/factories/GNSPairInfosV6_1__factory.js +0 -1485
  105. package/lib/src/contracts/types/generated/factories/GNSPairsStorageV6__factory.d.ts +0 -117
  106. package/lib/src/contracts/types/generated/factories/GNSPairsStorageV6__factory.js +0 -1265
  107. package/lib/src/contracts/types/generated/factories/GTokenOpenPnlFeed__factory.d.ts +0 -59
  108. package/lib/src/contracts/types/generated/factories/GTokenOpenPnlFeed__factory.js +0 -765
  109. package/lib/src/contracts/types/generated/factories/index.d.ts +0 -4
  110. package/lib/src/contracts/types/generated/factories/index.js +0 -14
  111. package/lib/src/contracts/types/generated/index.d.ts +0 -9
  112. package/lib/src/contracts/types/generated/index.js +0 -35
  113. package/lib/src/contracts/types/index.d.ts +0 -13
  114. package/lib/src/contracts/types/index.js +0 -2
  115. package/lib/src/contracts/utils/index.d.ts +0 -2
  116. package/lib/src/contracts/utils/index.js +0 -18
  117. package/lib/src/contracts/utils/openTrades.d.ts +0 -3
  118. package/lib/src/contracts/utils/openTrades.js +0 -107
  119. package/lib/src/contracts/utils/pairs.d.ts +0 -6
  120. package/lib/src/contracts/utils/pairs.js +0 -102
  121. package/lib/src/index.d.ts +0 -3
  122. package/lib/src/index.js +0 -19
  123. package/lib/src/markets/commodities.d.ts +0 -1
  124. package/lib/src/markets/commodities.js +0 -31
  125. package/lib/src/markets/crypto.d.ts +0 -1
  126. package/lib/src/markets/crypto.js +0 -6
  127. package/lib/src/markets/forex.d.ts +0 -2
  128. package/lib/src/markets/forex.js +0 -38
  129. package/lib/src/markets/index.d.ts +0 -5
  130. package/lib/src/markets/index.js +0 -21
  131. package/lib/src/markets/indices.d.ts +0 -1
  132. package/lib/src/markets/indices.js +0 -6
  133. package/lib/src/markets/stocks.d.ts +0 -3
  134. package/lib/src/markets/stocks.js +0 -54
  135. package/lib/src/trade/fees.d.ts +0 -15
  136. package/lib/src/trade/fees.js +0 -45
  137. package/lib/src/trade/index.d.ts +0 -2
  138. package/lib/src/trade/index.js +0 -18
  139. package/lib/src/trade/pnl.d.ts +0 -7
  140. package/lib/src/trade/pnl.js +0 -43
  141. package/lib/src/trade/types.d.ts +0 -143
  142. package/lib/src/trade/types.js +0 -8
  143. package/lib/test/index.d.ts +0 -1
  144. package/lib/test/index.js +0 -22
  145. package/lib/test.d.ts +0 -1
  146. package/lib/test.js +0 -37
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # Gains Network SDK
2
-
3
- ## Install
4
-
5
- ```bash
6
- npm install @gainsnetwork/sdk
7
- ```
8
-
9
- ## Usage
10
-
11
- ## API
1
+ # Gains Network SDK
2
+
3
+ ## Install
4
+
5
+ ```bash
6
+ npm install @gainsnetwork/sdk
7
+ ```
8
+
9
+ ## Usage
10
+
11
+ ## API
@@ -0,0 +1,135 @@
1
+ export declare const pairs: {
2
+ "BTC/USD": string;
3
+ "ETH/USD": string;
4
+ "LINK/USD": string;
5
+ "DOGE/USD": string;
6
+ "MATIC/USD": string;
7
+ "ADA/USD": string;
8
+ "SUSHI/USD": string;
9
+ "AAVE/USD": string;
10
+ "ALGO/USD": string;
11
+ "BAT/USD": string;
12
+ "COMP/USD": string;
13
+ "DOT/USD": string;
14
+ "EOS/USD": string;
15
+ "LTC/USD": string;
16
+ "MANA/USD": string;
17
+ "OMG/USD": string;
18
+ "SNX/USD": string;
19
+ "UNI/USD": string;
20
+ "XLM/USD": string;
21
+ "XRP/USD": string;
22
+ "ZEC/USD": string;
23
+ "EUR/USD": string;
24
+ "USD/JPY": string;
25
+ "GBP/USD": string;
26
+ "USD/CHF": string;
27
+ "AUD/USD": string;
28
+ "USD/CAD": string;
29
+ "NZD/USD": string;
30
+ "EUR/CHF": string;
31
+ "EUR/JPY": string;
32
+ "EUR/GBP": string;
33
+ "LUNA/USD": string;
34
+ "YFI/USD": string;
35
+ "SOL/USD": string;
36
+ "XTZ/USD": string;
37
+ "BCH/USD": string;
38
+ "BNT/USD": string;
39
+ "CRV/USD": string;
40
+ "DASH/USD": string;
41
+ "ETC/USD": string;
42
+ "ICP/USD": string;
43
+ "MKR/USD": string;
44
+ "NEO/USD": string;
45
+ "THETA/USD": string;
46
+ "TRX/USD": string;
47
+ "ZRX/USD": string;
48
+ "SAND/USD": string;
49
+ "BNB/USD": string;
50
+ "AXS/USD": string;
51
+ "GRT/USD": string;
52
+ "HBAR/USD": string;
53
+ "XMR/USD": string;
54
+ "ENJ/USD": string;
55
+ "FTM/USD": string;
56
+ "FTT/USD": string;
57
+ "APE/USD": string;
58
+ "CHZ/USD": string;
59
+ "SHIB/USD": string;
60
+ "AAPL/USD": string;
61
+ "FB/USD": string;
62
+ "GOOGL/USD": string;
63
+ "AMZN/USD": string;
64
+ "MSFT/USD": string;
65
+ "TSLA/USD": string;
66
+ "SNAP/USD": string;
67
+ "NVDA/USD": string;
68
+ "V/USD": string;
69
+ "MA/USD": string;
70
+ "PFE/USD": string;
71
+ "KO/USD": string;
72
+ "DIS/USD": string;
73
+ "GME/USD": string;
74
+ "NKE/USD": string;
75
+ "AMD/USD": string;
76
+ "PYPL/USD": string;
77
+ "ABNB/USD": string;
78
+ "BA/USD": string;
79
+ "SBUX/USD": string;
80
+ "WMT/USD": string;
81
+ "INTC/USD": string;
82
+ "MCD/USD": string;
83
+ "META/USD": string;
84
+ "GOOGL_1/USD": string;
85
+ "GME_1/USD": string;
86
+ "AMZN_1/USD": string;
87
+ "TSLA_1/USD": string;
88
+ "SPY/USD": string;
89
+ "QQQ/USD": string;
90
+ "IWM/USD": string;
91
+ "DIA/USD": string;
92
+ "XAU/USD": string;
93
+ "XAG/USD": string;
94
+ "USD/CNH": string;
95
+ "USD/SGD": string;
96
+ "EUR/SEK": string;
97
+ "USD/KRW": string;
98
+ "EUR/NOK": string;
99
+ "USD/INR": string;
100
+ "USD/MXN": string;
101
+ "USD/TWD": string;
102
+ "USD/ZAR": string;
103
+ "USD/BRL": string;
104
+ "AVAX/USD": string;
105
+ "ATOM/USD": string;
106
+ "NEAR/USD": string;
107
+ "QNT/USD": string;
108
+ "IOTA/USD": string;
109
+ "TON/USD": string;
110
+ "RPL/USD": string;
111
+ };
112
+ export declare const tickerChanges: {
113
+ FB: {
114
+ newTicker: string;
115
+ date: string;
116
+ };
117
+ };
118
+ export declare const stockSplits: {
119
+ "AMZN_1/USD": {
120
+ date: string;
121
+ split: number;
122
+ };
123
+ "GOOGL_1/USD": {
124
+ date: string;
125
+ split: number;
126
+ };
127
+ "GME_1/USD": {
128
+ date: string;
129
+ split: number;
130
+ };
131
+ "TSLA_1/USD": {
132
+ date: string;
133
+ split: number;
134
+ };
135
+ };
@@ -0,0 +1,123 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.stockSplits = exports.tickerChanges = exports.pairs = void 0;
4
+ exports.pairs = {
5
+ "BTC/USD": "crypto",
6
+ "ETH/USD": "crypto",
7
+ "LINK/USD": "crypto",
8
+ "DOGE/USD": "crypto",
9
+ "MATIC/USD": "crypto",
10
+ "ADA/USD": "crypto",
11
+ "SUSHI/USD": "crypto",
12
+ "AAVE/USD": "crypto",
13
+ "ALGO/USD": "crypto",
14
+ "BAT/USD": "crypto",
15
+ "COMP/USD": "crypto",
16
+ "DOT/USD": "crypto",
17
+ "EOS/USD": "crypto",
18
+ "LTC/USD": "crypto",
19
+ "MANA/USD": "crypto",
20
+ "OMG/USD": "crypto",
21
+ "SNX/USD": "crypto",
22
+ "UNI/USD": "crypto",
23
+ "XLM/USD": "crypto",
24
+ "XRP/USD": "crypto",
25
+ "ZEC/USD": "crypto",
26
+ "EUR/USD": "forex",
27
+ "USD/JPY": "forex",
28
+ "GBP/USD": "forex",
29
+ "USD/CHF": "forex",
30
+ "AUD/USD": "forex",
31
+ "USD/CAD": "forex",
32
+ "NZD/USD": "forex",
33
+ "EUR/CHF": "forex",
34
+ "EUR/JPY": "forex",
35
+ "EUR/GBP": "forex",
36
+ "LUNA/USD": "crypto",
37
+ "YFI/USD": "crypto",
38
+ "SOL/USD": "crypto",
39
+ "XTZ/USD": "crypto",
40
+ "BCH/USD": "crypto",
41
+ "BNT/USD": "crypto",
42
+ "CRV/USD": "crypto",
43
+ "DASH/USD": "crypto",
44
+ "ETC/USD": "crypto",
45
+ "ICP/USD": "crypto",
46
+ "MKR/USD": "crypto",
47
+ "NEO/USD": "crypto",
48
+ "THETA/USD": "crypto",
49
+ "TRX/USD": "crypto",
50
+ "ZRX/USD": "crypto",
51
+ "SAND/USD": "crypto",
52
+ "BNB/USD": "crypto",
53
+ "AXS/USD": "crypto",
54
+ "GRT/USD": "crypto",
55
+ "HBAR/USD": "crypto",
56
+ "XMR/USD": "crypto",
57
+ "ENJ/USD": "crypto",
58
+ "FTM/USD": "crypto",
59
+ "FTT/USD": "crypto",
60
+ "APE/USD": "crypto",
61
+ "CHZ/USD": "crypto",
62
+ "SHIB/USD": "crypto",
63
+ "AAPL/USD": "stocks",
64
+ "FB/USD": "stocks",
65
+ "GOOGL/USD": "stocks",
66
+ "AMZN/USD": "stocks",
67
+ "MSFT/USD": "stocks",
68
+ "TSLA/USD": "stocks",
69
+ "SNAP/USD": "stocks",
70
+ "NVDA/USD": "stocks",
71
+ "V/USD": "stocks",
72
+ "MA/USD": "stocks",
73
+ "PFE/USD": "stocks",
74
+ "KO/USD": "stocks",
75
+ "DIS/USD": "stocks",
76
+ "GME/USD": "stocks",
77
+ "NKE/USD": "stocks",
78
+ "AMD/USD": "stocks",
79
+ "PYPL/USD": "stocks",
80
+ "ABNB/USD": "stocks",
81
+ "BA/USD": "stocks",
82
+ "SBUX/USD": "stocks",
83
+ "WMT/USD": "stocks",
84
+ "INTC/USD": "stocks",
85
+ "MCD/USD": "stocks",
86
+ "META/USD": "stocks",
87
+ "GOOGL_1/USD": "stocks",
88
+ "GME_1/USD": "stocks",
89
+ "AMZN_1/USD": "stocks",
90
+ "TSLA_1/USD": "stocks",
91
+ "SPY/USD": "indices",
92
+ "QQQ/USD": "indices",
93
+ "IWM/USD": "indices",
94
+ "DIA/USD": "indices",
95
+ "XAU/USD": "commodities",
96
+ "XAG/USD": "commodities",
97
+ "USD/CNH": "forex",
98
+ "USD/SGD": "forex",
99
+ "EUR/SEK": "forex",
100
+ "USD/KRW": "forex",
101
+ "EUR/NOK": "forex",
102
+ "USD/INR": "forex",
103
+ "USD/MXN": "forex",
104
+ "USD/TWD": "forex",
105
+ "USD/ZAR": "forex",
106
+ "USD/BRL": "forex",
107
+ "AVAX/USD": "crypto",
108
+ "ATOM/USD": "crypto",
109
+ "NEAR/USD": "crypto",
110
+ "QNT/USD": "crypto",
111
+ "IOTA/USD": "crypto",
112
+ "TON/USD": "crypto",
113
+ "RPL/USD": "crypto",
114
+ };
115
+ exports.tickerChanges = {
116
+ FB: { newTicker: "META", date: "06/09/2022" },
117
+ };
118
+ exports.stockSplits = {
119
+ "AMZN_1/USD": { date: "6/6/2022", split: 20 },
120
+ "GOOGL_1/USD": { date: "7/18/2022", split: 20 },
121
+ "GME_1/USD": { date: "7/22/2022", split: 4 },
122
+ "TSLA_1/USD": { date: "8/25/2022", split: 3 },
123
+ };
@@ -1,2 +1,2 @@
1
- import { ContractAddresses } from "./types";
2
- export declare const getContractAddressesForChain: (chainId: number) => ContractAddresses;
1
+ import { ContractAddresses } from "./types";
2
+ export declare const getContractAddressesForChain: (chainId: number) => ContractAddresses;
@@ -1,15 +1,15 @@
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.getContractAddressesForChain = void 0;
7
- const addresses_json_1 = __importDefault(require("./addresses.json"));
8
- const getContractAddressesForChain = (chainId) => {
9
- const _addresses = addresses_json_1.default;
10
- if (!_addresses[chainId]) {
11
- throw new Error(`Unknown chain id (${chainId}). No known contracts have been deployed on this chain.`);
12
- }
13
- return _addresses[chainId];
14
- };
15
- exports.getContractAddressesForChain = getContractAddressesForChain;
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.getContractAddressesForChain = void 0;
7
+ const addresses_json_1 = __importDefault(require("./addresses.json"));
8
+ const getContractAddressesForChain = (chainId) => {
9
+ const _addresses = addresses_json_1.default;
10
+ if (!_addresses[chainId]) {
11
+ throw new Error(`Unknown chain id (${chainId}). No known contracts have been deployed on this chain.`);
12
+ }
13
+ return _addresses[chainId];
14
+ };
15
+ exports.getContractAddressesForChain = getContractAddressesForChain;
@@ -1,23 +1,23 @@
1
- {
2
- "137": {
3
- "gfarmTradingStorageV5": "0xaee4d11a16B2bc65EDD6416Fb626EB404a6D65BD",
4
- "gnsPairsStorageV6": "0x6e5326e944F528c243B9Ca5d14fe5C9269a8c922",
5
- "gnsPairInfosV6_1": "0xEe7442aCcC1C27f2C69423576d3b1D25b563E977",
6
- "gTokenOpenPnlFeed": "0x8d687276543b92819F2f2B5C3faad4AD27F4440c",
7
- "gnsNftRewardsV6": "0x3470756E5B490a974Bc25FeEeEb24c11102f5268"
8
- },
9
- "42161": {
10
- "gfarmTradingStorageV5": "0xcFa6ebD475d89dB04cAd5A756fff1cb2BC5bE33c",
11
- "gnsPairsStorageV6": "0xf67Df2a4339eC1591615d94599081Dd037960d4b",
12
- "gnsPairInfosV6_1": "0x04a5e3cf21B0080B72fAcDca634349A56982D497",
13
- "gTokenOpenPnlFeed": "0x990BA9Edd8a9615A23E4c452E63A80e519A4a23D",
14
- "gnsNftRewardsV6": "0xc2d107e870927E3fb1127E6c1a33De5C863505b8"
15
- },
16
- "80001": {
17
- "gfarmTradingStorageV5": "0x4d2dF485c608aa55A23d8d98dD2B4FA24Ba0f2Cf",
18
- "gnsPairsStorageV6": "0xF7F324bc1D659f01A9a8d00C40d65568b25b4007",
19
- "gnsPairInfosV6_1": "0xe780bBf94b0257fEDccF4EAEcBC70722E6F5F574",
20
- "gTokenOpenPnlFeed": "0xA7C829CB2346E12DC49Fd5ea8002Abaf48E9396C",
21
- "gnsNftRewardsV6": "0x3982E3de77DAd60373C0c2c539fCb93Bd288D2f5"
22
- }
23
- }
1
+ {
2
+ "137": {
3
+ "gfarmTradingStorageV5": "0xaee4d11a16B2bc65EDD6416Fb626EB404a6D65BD",
4
+ "gnsPairsStorageV6": "0x6e5326e944F528c243B9Ca5d14fe5C9269a8c922",
5
+ "gnsPairInfosV6_1": "0xEe7442aCcC1C27f2C69423576d3b1D25b563E977",
6
+ "gTokenOpenPnlFeed": "0x8d687276543b92819F2f2B5C3faad4AD27F4440c",
7
+ "gnsNftRewardsV6": "0x3470756E5B490a974Bc25FeEeEb24c11102f5268"
8
+ },
9
+ "42161": {
10
+ "gfarmTradingStorageV5": "0xcFa6ebD475d89dB04cAd5A756fff1cb2BC5bE33c",
11
+ "gnsPairsStorageV6": "0xf67Df2a4339eC1591615d94599081Dd037960d4b",
12
+ "gnsPairInfosV6_1": "0x04a5e3cf21B0080B72fAcDca634349A56982D497",
13
+ "gTokenOpenPnlFeed": "0x990BA9Edd8a9615A23E4c452E63A80e519A4a23D",
14
+ "gnsNftRewardsV6": "0xc2d107e870927E3fb1127E6c1a33De5C863505b8"
15
+ },
16
+ "80001": {
17
+ "gfarmTradingStorageV5": "0x4d2dF485c608aa55A23d8d98dD2B4FA24Ba0f2Cf",
18
+ "gnsPairsStorageV6": "0xF7F324bc1D659f01A9a8d00C40d65568b25b4007",
19
+ "gnsPairInfosV6_1": "0xe780bBf94b0257fEDccF4EAEcBC70722E6F5F574",
20
+ "gTokenOpenPnlFeed": "0xA7C829CB2346E12DC49Fd5ea8002Abaf48E9396C",
21
+ "gnsNftRewardsV6": "0x3982E3de77DAd60373C0c2c539fCb93Bd288D2f5"
22
+ }
23
+ }
@@ -1,6 +1,6 @@
1
- import type { Signer } from "ethers";
2
- import type { Provider } from "@ethersproject/providers";
3
- import { Contracts } from "./types";
4
- export declare const getContractsForChain: (chainId: number, signerOrProvider?: Signer | Provider) => Contracts;
5
- export * from "./utils";
6
- export * from "./addresses";
1
+ import type { Signer } from "ethers";
2
+ import type { Provider } from "@ethersproject/providers";
3
+ import { Contracts } from "./types";
4
+ export declare const getContractsForChain: (chainId: number, signerOrProvider?: Signer | Provider) => Contracts;
5
+ export * from "./utils";
6
+ export * from "./addresses";
@@ -1,32 +1,32 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.getContractsForChain = void 0;
18
- const addresses_1 = require("./addresses");
19
- const factories_1 = require("./types/generated/factories");
20
- const getContractsForChain = (chainId, signerOrProvider) => {
21
- const addresses = (0, addresses_1.getContractAddressesForChain)(chainId);
22
- return {
23
- gfarmTradingStorageV5: factories_1.GFarmTradingStorageV5__factory.connect(addresses.gfarmTradingStorageV5, signerOrProvider),
24
- gnsPairInfosV6_1: factories_1.GNSPairInfosV6_1__factory.connect(addresses.gnsPairInfosV6_1, signerOrProvider),
25
- gnsPairsStorageV6: factories_1.GNSPairsStorageV6__factory.connect(addresses.gnsPairsStorageV6, signerOrProvider),
26
- gTokenOpenPnlFeed: factories_1.GTokenOpenPnlFeed__factory.connect(addresses.gTokenOpenPnlFeed, signerOrProvider),
27
- gnsNftRewardsV6: factories_1.GNSNftRewardsV6__factory.connect(addresses.gnsNftRewardsV6, signerOrProvider),
28
- };
29
- };
30
- exports.getContractsForChain = getContractsForChain;
31
- __exportStar(require("./utils"), exports);
32
- __exportStar(require("./addresses"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.getContractsForChain = void 0;
18
+ const addresses_1 = require("./addresses");
19
+ const factories_1 = require("./types/generated/factories");
20
+ const getContractsForChain = (chainId, signerOrProvider) => {
21
+ const addresses = (0, addresses_1.getContractAddressesForChain)(chainId);
22
+ return {
23
+ gfarmTradingStorageV5: factories_1.GFarmTradingStorageV5__factory.connect(addresses.gfarmTradingStorageV5, signerOrProvider),
24
+ gnsPairInfosV6_1: factories_1.GNSPairInfosV6_1__factory.connect(addresses.gnsPairInfosV6_1, signerOrProvider),
25
+ gnsPairsStorageV6: factories_1.GNSPairsStorageV6__factory.connect(addresses.gnsPairsStorageV6, signerOrProvider),
26
+ gTokenOpenPnlFeed: factories_1.GTokenOpenPnlFeed__factory.connect(addresses.gTokenOpenPnlFeed, signerOrProvider),
27
+ gnsNftRewardsV6: factories_1.GNSNftRewardsV6__factory.connect(addresses.gnsNftRewardsV6, signerOrProvider),
28
+ };
29
+ };
30
+ exports.getContractsForChain = getContractsForChain;
31
+ __exportStar(require("./utils"), exports);
32
+ __exportStar(require("./addresses"), exports);