@d8x/perpetuals-sdk 1.1.3 → 1.1.5

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 (38) hide show
  1. package/dist/cjs/abi/WeETH.json +310 -0
  2. package/dist/cjs/config/defaultConfig.json +12 -0
  3. package/dist/cjs/config/priceFeedConfig.json +13 -4
  4. package/dist/cjs/config/symbolList.json +6 -5
  5. package/dist/cjs/contracts/WeETH.d.ts +503 -0
  6. package/dist/cjs/contracts/WeETH.js +3 -0
  7. package/dist/cjs/contracts/WeETH.js.map +1 -0
  8. package/dist/cjs/contracts/factories/WeETH__factory.d.ts +545 -0
  9. package/dist/cjs/contracts/factories/WeETH__factory.js +721 -0
  10. package/dist/cjs/contracts/factories/WeETH__factory.js.map +1 -0
  11. package/dist/cjs/priceFeeds.d.ts +2 -0
  12. package/dist/cjs/priceFeeds.js +31 -6
  13. package/dist/cjs/priceFeeds.js.map +1 -1
  14. package/dist/cjs/version.d.ts +1 -1
  15. package/dist/cjs/version.js +1 -1
  16. package/dist/esm/abi/WeETH.json +310 -0
  17. package/dist/esm/config/defaultConfig.json +12 -0
  18. package/dist/esm/config/priceFeedConfig.json +13 -4
  19. package/dist/esm/config/symbolList.json +6 -5
  20. package/dist/esm/contracts/WeETH.d.ts +503 -0
  21. package/dist/esm/contracts/WeETH.js +2 -0
  22. package/dist/esm/contracts/WeETH.js.map +1 -0
  23. package/dist/esm/contracts/factories/WeETH__factory.d.ts +545 -0
  24. package/dist/esm/contracts/factories/WeETH__factory.js +717 -0
  25. package/dist/esm/contracts/factories/WeETH__factory.js.map +1 -0
  26. package/dist/esm/priceFeeds.d.ts +2 -0
  27. package/dist/esm/priceFeeds.js +32 -7
  28. package/dist/esm/priceFeeds.js.map +1 -1
  29. package/dist/esm/version.d.ts +1 -1
  30. package/dist/esm/version.js +1 -1
  31. package/package.json +1 -1
  32. package/src/config/defaultConfig.json +12 -0
  33. package/src/config/priceFeedConfig.json +13 -4
  34. package/src/config/symbolList.json +6 -5
  35. package/src/contracts/WeETH.ts +1104 -0
  36. package/src/contracts/factories/WeETH__factory.ts +721 -0
  37. package/src/priceFeeds.ts +31 -7
  38. package/src/version.ts +1 -1
@@ -0,0 +1,310 @@
1
+ [
2
+ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" },
3
+ {
4
+ "anonymous": false,
5
+ "inputs": [
6
+ { "indexed": false, "internalType": "address", "name": "previousAdmin", "type": "address" },
7
+ { "indexed": false, "internalType": "address", "name": "newAdmin", "type": "address" }
8
+ ],
9
+ "name": "AdminChanged",
10
+ "type": "event"
11
+ },
12
+ {
13
+ "anonymous": false,
14
+ "inputs": [
15
+ { "indexed": true, "internalType": "address", "name": "owner", "type": "address" },
16
+ { "indexed": true, "internalType": "address", "name": "spender", "type": "address" },
17
+ { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }
18
+ ],
19
+ "name": "Approval",
20
+ "type": "event"
21
+ },
22
+ {
23
+ "anonymous": false,
24
+ "inputs": [{ "indexed": true, "internalType": "address", "name": "beacon", "type": "address" }],
25
+ "name": "BeaconUpgraded",
26
+ "type": "event"
27
+ },
28
+ {
29
+ "anonymous": false,
30
+ "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }],
31
+ "name": "Initialized",
32
+ "type": "event"
33
+ },
34
+ {
35
+ "anonymous": false,
36
+ "inputs": [
37
+ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" },
38
+ { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }
39
+ ],
40
+ "name": "OwnershipTransferred",
41
+ "type": "event"
42
+ },
43
+ {
44
+ "anonymous": false,
45
+ "inputs": [
46
+ { "indexed": true, "internalType": "address", "name": "from", "type": "address" },
47
+ { "indexed": true, "internalType": "address", "name": "to", "type": "address" },
48
+ { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }
49
+ ],
50
+ "name": "Transfer",
51
+ "type": "event"
52
+ },
53
+ {
54
+ "anonymous": false,
55
+ "inputs": [{ "indexed": true, "internalType": "address", "name": "implementation", "type": "address" }],
56
+ "name": "Upgraded",
57
+ "type": "event"
58
+ },
59
+ {
60
+ "inputs": [],
61
+ "name": "DOMAIN_SEPARATOR",
62
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
63
+ "stateMutability": "view",
64
+ "type": "function"
65
+ },
66
+ {
67
+ "inputs": [
68
+ { "internalType": "address", "name": "owner", "type": "address" },
69
+ { "internalType": "address", "name": "spender", "type": "address" }
70
+ ],
71
+ "name": "allowance",
72
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
73
+ "stateMutability": "view",
74
+ "type": "function"
75
+ },
76
+ {
77
+ "inputs": [
78
+ { "internalType": "address", "name": "spender", "type": "address" },
79
+ { "internalType": "uint256", "name": "amount", "type": "uint256" }
80
+ ],
81
+ "name": "approve",
82
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
83
+ "stateMutability": "nonpayable",
84
+ "type": "function"
85
+ },
86
+ {
87
+ "inputs": [{ "internalType": "address", "name": "account", "type": "address" }],
88
+ "name": "balanceOf",
89
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
90
+ "stateMutability": "view",
91
+ "type": "function"
92
+ },
93
+ {
94
+ "inputs": [],
95
+ "name": "decimals",
96
+ "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }],
97
+ "stateMutability": "view",
98
+ "type": "function"
99
+ },
100
+ {
101
+ "inputs": [
102
+ { "internalType": "address", "name": "spender", "type": "address" },
103
+ { "internalType": "uint256", "name": "subtractedValue", "type": "uint256" }
104
+ ],
105
+ "name": "decreaseAllowance",
106
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
107
+ "stateMutability": "nonpayable",
108
+ "type": "function"
109
+ },
110
+ {
111
+ "inputs": [],
112
+ "name": "eETH",
113
+ "outputs": [{ "internalType": "contract IeETH", "name": "", "type": "address" }],
114
+ "stateMutability": "view",
115
+ "type": "function"
116
+ },
117
+ {
118
+ "inputs": [{ "internalType": "uint256", "name": "_weETHAmount", "type": "uint256" }],
119
+ "name": "getEETHByWeETH",
120
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
121
+ "stateMutability": "view",
122
+ "type": "function"
123
+ },
124
+ {
125
+ "inputs": [],
126
+ "name": "getImplementation",
127
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
128
+ "stateMutability": "view",
129
+ "type": "function"
130
+ },
131
+ {
132
+ "inputs": [],
133
+ "name": "getRate",
134
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
135
+ "stateMutability": "view",
136
+ "type": "function"
137
+ },
138
+ {
139
+ "inputs": [{ "internalType": "uint256", "name": "_eETHAmount", "type": "uint256" }],
140
+ "name": "getWeETHByeETH",
141
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
142
+ "stateMutability": "view",
143
+ "type": "function"
144
+ },
145
+ {
146
+ "inputs": [
147
+ { "internalType": "address", "name": "spender", "type": "address" },
148
+ { "internalType": "uint256", "name": "addedValue", "type": "uint256" }
149
+ ],
150
+ "name": "increaseAllowance",
151
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
152
+ "stateMutability": "nonpayable",
153
+ "type": "function"
154
+ },
155
+ {
156
+ "inputs": [
157
+ { "internalType": "address", "name": "_liquidityPool", "type": "address" },
158
+ { "internalType": "address", "name": "_eETH", "type": "address" }
159
+ ],
160
+ "name": "initialize",
161
+ "outputs": [],
162
+ "stateMutability": "nonpayable",
163
+ "type": "function"
164
+ },
165
+ {
166
+ "inputs": [],
167
+ "name": "liquidityPool",
168
+ "outputs": [{ "internalType": "contract ILiquidityPool", "name": "", "type": "address" }],
169
+ "stateMutability": "view",
170
+ "type": "function"
171
+ },
172
+ {
173
+ "inputs": [],
174
+ "name": "name",
175
+ "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
176
+ "stateMutability": "view",
177
+ "type": "function"
178
+ },
179
+ {
180
+ "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }],
181
+ "name": "nonces",
182
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
183
+ "stateMutability": "view",
184
+ "type": "function"
185
+ },
186
+ {
187
+ "inputs": [],
188
+ "name": "owner",
189
+ "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
190
+ "stateMutability": "view",
191
+ "type": "function"
192
+ },
193
+ {
194
+ "inputs": [
195
+ { "internalType": "address", "name": "owner", "type": "address" },
196
+ { "internalType": "address", "name": "spender", "type": "address" },
197
+ { "internalType": "uint256", "name": "value", "type": "uint256" },
198
+ { "internalType": "uint256", "name": "deadline", "type": "uint256" },
199
+ { "internalType": "uint8", "name": "v", "type": "uint8" },
200
+ { "internalType": "bytes32", "name": "r", "type": "bytes32" },
201
+ { "internalType": "bytes32", "name": "s", "type": "bytes32" }
202
+ ],
203
+ "name": "permit",
204
+ "outputs": [],
205
+ "stateMutability": "nonpayable",
206
+ "type": "function"
207
+ },
208
+ {
209
+ "inputs": [],
210
+ "name": "proxiableUUID",
211
+ "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
212
+ "stateMutability": "view",
213
+ "type": "function"
214
+ },
215
+ { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" },
216
+ {
217
+ "inputs": [],
218
+ "name": "symbol",
219
+ "outputs": [{ "internalType": "string", "name": "", "type": "string" }],
220
+ "stateMutability": "view",
221
+ "type": "function"
222
+ },
223
+ {
224
+ "inputs": [],
225
+ "name": "totalSupply",
226
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
227
+ "stateMutability": "view",
228
+ "type": "function"
229
+ },
230
+ {
231
+ "inputs": [
232
+ { "internalType": "address", "name": "to", "type": "address" },
233
+ { "internalType": "uint256", "name": "amount", "type": "uint256" }
234
+ ],
235
+ "name": "transfer",
236
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
237
+ "stateMutability": "nonpayable",
238
+ "type": "function"
239
+ },
240
+ {
241
+ "inputs": [
242
+ { "internalType": "address", "name": "from", "type": "address" },
243
+ { "internalType": "address", "name": "to", "type": "address" },
244
+ { "internalType": "uint256", "name": "amount", "type": "uint256" }
245
+ ],
246
+ "name": "transferFrom",
247
+ "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }],
248
+ "stateMutability": "nonpayable",
249
+ "type": "function"
250
+ },
251
+ {
252
+ "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
253
+ "name": "transferOwnership",
254
+ "outputs": [],
255
+ "stateMutability": "nonpayable",
256
+ "type": "function"
257
+ },
258
+ {
259
+ "inputs": [{ "internalType": "uint256", "name": "_weETHAmount", "type": "uint256" }],
260
+ "name": "unwrap",
261
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
262
+ "stateMutability": "nonpayable",
263
+ "type": "function"
264
+ },
265
+ {
266
+ "inputs": [{ "internalType": "address", "name": "newImplementation", "type": "address" }],
267
+ "name": "upgradeTo",
268
+ "outputs": [],
269
+ "stateMutability": "nonpayable",
270
+ "type": "function"
271
+ },
272
+ {
273
+ "inputs": [
274
+ { "internalType": "address", "name": "newImplementation", "type": "address" },
275
+ { "internalType": "bytes", "name": "data", "type": "bytes" }
276
+ ],
277
+ "name": "upgradeToAndCall",
278
+ "outputs": [],
279
+ "stateMutability": "payable",
280
+ "type": "function"
281
+ },
282
+ {
283
+ "inputs": [{ "internalType": "uint256", "name": "_eETHAmount", "type": "uint256" }],
284
+ "name": "wrap",
285
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
286
+ "stateMutability": "nonpayable",
287
+ "type": "function"
288
+ },
289
+ {
290
+ "inputs": [
291
+ { "internalType": "uint256", "name": "_eETHAmount", "type": "uint256" },
292
+ {
293
+ "components": [
294
+ { "internalType": "uint256", "name": "value", "type": "uint256" },
295
+ { "internalType": "uint256", "name": "deadline", "type": "uint256" },
296
+ { "internalType": "uint8", "name": "v", "type": "uint8" },
297
+ { "internalType": "bytes32", "name": "r", "type": "bytes32" },
298
+ { "internalType": "bytes32", "name": "s", "type": "bytes32" }
299
+ ],
300
+ "internalType": "struct ILiquidityPool.PermitInput",
301
+ "name": "_permit",
302
+ "type": "tuple"
303
+ }
304
+ ],
305
+ "name": "wrapWithPermit",
306
+ "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
307
+ "stateMutability": "nonpayable",
308
+ "type": "function"
309
+ }
310
+ ]
@@ -119,5 +119,17 @@
119
119
  "limitOrderBookFactoryABILocation": "./abi/LimitOrderBookFactory.json",
120
120
  "limitOrderBookABILocation": "./abi/LimitOrderBook.json",
121
121
  "multicall": "0x9d1dB8253105b007DDDE65Ce262f701814B91125"
122
+ },
123
+ {
124
+ "name": "arbitrum",
125
+ "chainId": 42161,
126
+ "version": 1,
127
+ "proxyAddr": "0x8f8BccE4c180B699F81499005281fA89440D1e95",
128
+ "nodeURL": "https://arb1.arbitrum.io/rpc",
129
+ "priceFeedConfigNetwork": "mainnet",
130
+ "shareTokenABILocation": "./abi/ShareToken.json",
131
+ "proxyABILocation": "./abi/IPerpetualManager.json",
132
+ "limitOrderBookFactoryABILocation": "./abi/LimitOrderBookFactory.json",
133
+ "limitOrderBookABILocation": "./abi/LimitOrderBook.json"
122
134
  }
123
135
  ]
@@ -135,25 +135,34 @@
135
135
  "origin": "Metal.XAU/USD"
136
136
  },
137
137
  {
138
- "symbol": "stETH-USD",
138
+ "symbol": "STETH-USD",
139
139
  "id": "0x846ae1bdb6300b817cee5fdee2a6da192775030db5615b94a465f53bd40850b5",
140
140
  "type": "pyth",
141
141
  "origin": "Crypto.STETH/USD"
142
142
  },
143
143
  {
144
- "symbol": "wstETH-USD",
144
+ "symbol": "WSTETH-USD",
145
145
  "id": "0x6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784",
146
146
  "type": "pyth",
147
147
  "origin": "Crypto.WSTETH/USD"
148
148
  },
149
149
  {
150
- "symbol": "agEUR-USD",
150
+ "symbol": "EURA-USD",
151
151
  "id": "0x3b670a7aa22cf0dc3b76b42dc2e26a85bac35eafc5a5ae2defd6d98201b1b997",
152
152
  "type": "pyth",
153
153
  "origin": "Crypto.AGEUR/USD"
154
+ },
155
+ {
156
+ "symbol": "WEETH-USD",
157
+ "id": "weETH",
158
+ "type": "redstone",
159
+ "origin": "weETH"
154
160
  }
155
161
  ],
156
- "endpoints": [{ "type": "pyth", "endpoints": ["https://hermes.pyth.network/api"] }]
162
+ "endpoints": [
163
+ { "type": "pyth", "endpoints": ["https://hermes.pyth.network/api"] },
164
+ { "type": "redstone", "endpoints": ["https://api.redstone.finance"] }
165
+ ]
157
166
  },
158
167
  {
159
168
  "network": "odin",
@@ -10,9 +10,10 @@
10
10
  "CHF": "CHF",
11
11
  "EUR": "EUR",
12
12
  "JPY": "JPY",
13
- "stTH": "stETH",
14
- "wstT": "wstETH",
15
- "stER": "stEUR",
16
- "agER": "agEUR",
17
- "LUSD": "LUSD"
13
+ "stTH": "STETH",
14
+ "wstT": "WSTETH",
15
+ "stER": "STEUR",
16
+ "EURA": "EURA",
17
+ "LUSD": "LUSD",
18
+ "wETH": "WEETH"
18
19
  }