@exodus/ethereum-lib 3.1.0 → 3.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/ethereum-lib",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "description": "Ethereum Library",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -41,5 +41,5 @@
41
41
  "ms": "^2.1.1",
42
42
  "reselect": "~3.0.1"
43
43
  },
44
- "gitHead": "6df51df0f2625839988bd554c83e86660ba488c8"
44
+ "gitHead": "31d3f43f30cdaf25e7bae2a0e4f7671a55d82faf"
45
45
  }
package/src/abi/index.js CHANGED
@@ -11,6 +11,7 @@ import repv2 from './repv2'
11
11
  import scdMcdMigration from './scd-mcd-migration'
12
12
  import maticValidatorShare from './matic-validator-share'
13
13
  import maticStakingManager from './matic-staking-manager'
14
+ import matic from './matic'
14
15
  import fantomSfc from './fantom-sfc'
15
16
  import ensRegistry from './ens-registry'
16
17
  import ensResolver from './ens-resolver'
@@ -30,6 +31,7 @@ export default {
30
31
  scdMcdMigration,
31
32
  maticValidatorShare,
32
33
  maticStakingManager,
34
+ matic,
33
35
  fantomSfc,
34
36
  ensRegistry,
35
37
  ensResolver,
@@ -0,0 +1,410 @@
1
+ // MATIC ERC20 (Polygon) ABI https://etherscan.io/token/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0#code
2
+
3
+ export default [
4
+ {
5
+ constant: true,
6
+ inputs: [],
7
+ name: 'name',
8
+ outputs: [
9
+ {
10
+ name: '',
11
+ type: 'string',
12
+ },
13
+ ],
14
+ payable: false,
15
+ stateMutability: 'view',
16
+ type: 'function',
17
+ },
18
+ {
19
+ constant: false,
20
+ inputs: [
21
+ {
22
+ name: 'spender',
23
+ type: 'address',
24
+ },
25
+ {
26
+ name: 'value',
27
+ type: 'uint256',
28
+ },
29
+ ],
30
+ name: 'approve',
31
+ outputs: [
32
+ {
33
+ name: '',
34
+ type: 'bool',
35
+ },
36
+ ],
37
+ payable: false,
38
+ stateMutability: 'nonpayable',
39
+ type: 'function',
40
+ },
41
+ {
42
+ constant: true,
43
+ inputs: [],
44
+ name: 'totalSupply',
45
+ outputs: [
46
+ {
47
+ name: '',
48
+ type: 'uint256',
49
+ },
50
+ ],
51
+ payable: false,
52
+ stateMutability: 'view',
53
+ type: 'function',
54
+ },
55
+ {
56
+ constant: false,
57
+ inputs: [
58
+ {
59
+ name: 'from',
60
+ type: 'address',
61
+ },
62
+ {
63
+ name: 'to',
64
+ type: 'address',
65
+ },
66
+ {
67
+ name: 'value',
68
+ type: 'uint256',
69
+ },
70
+ ],
71
+ name: 'transferFrom',
72
+ outputs: [
73
+ {
74
+ name: '',
75
+ type: 'bool',
76
+ },
77
+ ],
78
+ payable: false,
79
+ stateMutability: 'nonpayable',
80
+ type: 'function',
81
+ },
82
+ {
83
+ constant: true,
84
+ inputs: [],
85
+ name: 'decimals',
86
+ outputs: [
87
+ {
88
+ name: '',
89
+ type: 'uint8',
90
+ },
91
+ ],
92
+ payable: false,
93
+ stateMutability: 'view',
94
+ type: 'function',
95
+ },
96
+ {
97
+ constant: false,
98
+ inputs: [
99
+ {
100
+ name: 'spender',
101
+ type: 'address',
102
+ },
103
+ {
104
+ name: 'addedValue',
105
+ type: 'uint256',
106
+ },
107
+ ],
108
+ name: 'increaseAllowance',
109
+ outputs: [
110
+ {
111
+ name: 'success',
112
+ type: 'bool',
113
+ },
114
+ ],
115
+ payable: false,
116
+ stateMutability: 'nonpayable',
117
+ type: 'function',
118
+ },
119
+ {
120
+ constant: false,
121
+ inputs: [],
122
+ name: 'unpause',
123
+ outputs: [],
124
+ payable: false,
125
+ stateMutability: 'nonpayable',
126
+ type: 'function',
127
+ },
128
+ {
129
+ constant: true,
130
+ inputs: [
131
+ {
132
+ name: 'account',
133
+ type: 'address',
134
+ },
135
+ ],
136
+ name: 'isPauser',
137
+ outputs: [
138
+ {
139
+ name: '',
140
+ type: 'bool',
141
+ },
142
+ ],
143
+ payable: false,
144
+ stateMutability: 'view',
145
+ type: 'function',
146
+ },
147
+ {
148
+ constant: true,
149
+ inputs: [],
150
+ name: 'paused',
151
+ outputs: [
152
+ {
153
+ name: '',
154
+ type: 'bool',
155
+ },
156
+ ],
157
+ payable: false,
158
+ stateMutability: 'view',
159
+ type: 'function',
160
+ },
161
+ {
162
+ constant: false,
163
+ inputs: [],
164
+ name: 'renouncePauser',
165
+ outputs: [],
166
+ payable: false,
167
+ stateMutability: 'nonpayable',
168
+ type: 'function',
169
+ },
170
+ {
171
+ constant: true,
172
+ inputs: [
173
+ {
174
+ name: 'owner',
175
+ type: 'address',
176
+ },
177
+ ],
178
+ name: 'balanceOf',
179
+ outputs: [
180
+ {
181
+ name: '',
182
+ type: 'uint256',
183
+ },
184
+ ],
185
+ payable: false,
186
+ stateMutability: 'view',
187
+ type: 'function',
188
+ },
189
+ {
190
+ constant: false,
191
+ inputs: [
192
+ {
193
+ name: 'account',
194
+ type: 'address',
195
+ },
196
+ ],
197
+ name: 'addPauser',
198
+ outputs: [],
199
+ payable: false,
200
+ stateMutability: 'nonpayable',
201
+ type: 'function',
202
+ },
203
+ {
204
+ constant: false,
205
+ inputs: [],
206
+ name: 'pause',
207
+ outputs: [],
208
+ payable: false,
209
+ stateMutability: 'nonpayable',
210
+ type: 'function',
211
+ },
212
+ {
213
+ constant: true,
214
+ inputs: [],
215
+ name: 'symbol',
216
+ outputs: [
217
+ {
218
+ name: '',
219
+ type: 'string',
220
+ },
221
+ ],
222
+ payable: false,
223
+ stateMutability: 'view',
224
+ type: 'function',
225
+ },
226
+ {
227
+ constant: false,
228
+ inputs: [
229
+ {
230
+ name: 'spender',
231
+ type: 'address',
232
+ },
233
+ {
234
+ name: 'subtractedValue',
235
+ type: 'uint256',
236
+ },
237
+ ],
238
+ name: 'decreaseAllowance',
239
+ outputs: [
240
+ {
241
+ name: 'success',
242
+ type: 'bool',
243
+ },
244
+ ],
245
+ payable: false,
246
+ stateMutability: 'nonpayable',
247
+ type: 'function',
248
+ },
249
+ {
250
+ constant: false,
251
+ inputs: [
252
+ {
253
+ name: 'to',
254
+ type: 'address',
255
+ },
256
+ {
257
+ name: 'value',
258
+ type: 'uint256',
259
+ },
260
+ ],
261
+ name: 'transfer',
262
+ outputs: [
263
+ {
264
+ name: '',
265
+ type: 'bool',
266
+ },
267
+ ],
268
+ payable: false,
269
+ stateMutability: 'nonpayable',
270
+ type: 'function',
271
+ },
272
+ {
273
+ constant: true,
274
+ inputs: [
275
+ {
276
+ name: 'owner',
277
+ type: 'address',
278
+ },
279
+ {
280
+ name: 'spender',
281
+ type: 'address',
282
+ },
283
+ ],
284
+ name: 'allowance',
285
+ outputs: [
286
+ {
287
+ name: '',
288
+ type: 'uint256',
289
+ },
290
+ ],
291
+ payable: false,
292
+ stateMutability: 'view',
293
+ type: 'function',
294
+ },
295
+ {
296
+ inputs: [
297
+ {
298
+ name: 'name',
299
+ type: 'string',
300
+ },
301
+ {
302
+ name: 'symbol',
303
+ type: 'string',
304
+ },
305
+ {
306
+ name: 'decimals',
307
+ type: 'uint8',
308
+ },
309
+ {
310
+ name: 'totalSupply',
311
+ type: 'uint256',
312
+ },
313
+ ],
314
+ payable: false,
315
+ stateMutability: 'nonpayable',
316
+ type: 'constructor',
317
+ },
318
+ {
319
+ anonymous: false,
320
+ inputs: [
321
+ {
322
+ indexed: false,
323
+ name: 'account',
324
+ type: 'address',
325
+ },
326
+ ],
327
+ name: 'Paused',
328
+ type: 'event',
329
+ },
330
+ {
331
+ anonymous: false,
332
+ inputs: [
333
+ {
334
+ indexed: false,
335
+ name: 'account',
336
+ type: 'address',
337
+ },
338
+ ],
339
+ name: 'Unpaused',
340
+ type: 'event',
341
+ },
342
+ {
343
+ anonymous: false,
344
+ inputs: [
345
+ {
346
+ indexed: true,
347
+ name: 'account',
348
+ type: 'address',
349
+ },
350
+ ],
351
+ name: 'PauserAdded',
352
+ type: 'event',
353
+ },
354
+ {
355
+ anonymous: false,
356
+ inputs: [
357
+ {
358
+ indexed: true,
359
+ name: 'account',
360
+ type: 'address',
361
+ },
362
+ ],
363
+ name: 'PauserRemoved',
364
+ type: 'event',
365
+ },
366
+ {
367
+ anonymous: false,
368
+ inputs: [
369
+ {
370
+ indexed: true,
371
+ name: 'from',
372
+ type: 'address',
373
+ },
374
+ {
375
+ indexed: true,
376
+ name: 'to',
377
+ type: 'address',
378
+ },
379
+ {
380
+ indexed: false,
381
+ name: 'value',
382
+ type: 'uint256',
383
+ },
384
+ ],
385
+ name: 'Transfer',
386
+ type: 'event',
387
+ },
388
+ {
389
+ anonymous: false,
390
+ inputs: [
391
+ {
392
+ indexed: true,
393
+ name: 'owner',
394
+ type: 'address',
395
+ },
396
+ {
397
+ indexed: true,
398
+ name: 'spender',
399
+ type: 'address',
400
+ },
401
+ {
402
+ indexed: false,
403
+ name: 'value',
404
+ type: 'uint256',
405
+ },
406
+ ],
407
+ name: 'Approval',
408
+ type: 'event',
409
+ },
410
+ ]
@@ -22,6 +22,8 @@ export default function createContract(address, contractName) {
22
22
  return new SolidityContract(ABI.maticValidatorShare, address, true)
23
23
  case 'maticStakingManager':
24
24
  return new SolidityContract(ABI.maticStakingManager, address, true)
25
+ case 'polygon':
26
+ return new SolidityContract(ABI.matic, address, true)
25
27
  case 'fantomSfc':
26
28
  return new SolidityContract(ABI.fantomSfc, address, true)
27
29
  case 'ensResolver':