@exodus/ethereum-lib 2.3.1 → 2.3.2

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": "2.3.1",
3
+ "version": "2.3.2",
4
4
  "description": "Ethereum Library",
5
5
  "main": "src/index.js",
6
6
  "author": "Exodus Movement, Inc.",
@@ -25,5 +25,5 @@
25
25
  "devDependencies": {
26
26
  "@exodus/models": "^8.5.1"
27
27
  },
28
- "gitHead": "92d4717b906fd92d37c90d8ba41f3c314cd65534"
28
+ "gitHead": "52593609ee44ae7f3113482ee84c68646e7bf6ed"
29
29
  }
package/src/abi/index.js CHANGED
@@ -2,6 +2,7 @@ import ant from './ant'
2
2
  import cdai from './cdai'
3
3
  import dai from './dai'
4
4
  import gnt from './gnt'
5
+ import loomv2Swap from './loomv2-swap'
5
6
  import repv2 from './repv2'
6
7
  import scdMcdMigration from './scd-mcd-migration'
7
8
 
@@ -10,6 +11,7 @@ export default {
10
11
  cdai,
11
12
  dai,
12
13
  gnt,
14
+ loomv2Swap,
13
15
  repv2,
14
16
  scdMcdMigration,
15
17
  }
@@ -0,0 +1,176 @@
1
+ // https://github.com/loomnetwork/loom-token/blob/main/contracts/TokenSwap.sol
2
+
3
+ export default [
4
+ {
5
+ inputs: [
6
+ {
7
+ internalType: 'address',
8
+ name: '_oldToken',
9
+ type: 'address',
10
+ },
11
+ ],
12
+ stateMutability: 'nonpayable',
13
+ type: 'constructor',
14
+ },
15
+ {
16
+ anonymous: false,
17
+ inputs: [
18
+ {
19
+ indexed: true,
20
+ internalType: 'address',
21
+ name: 'previousOwner',
22
+ type: 'address',
23
+ },
24
+ {
25
+ indexed: true,
26
+ internalType: 'address',
27
+ name: 'newOwner',
28
+ type: 'address',
29
+ },
30
+ ],
31
+ name: 'OwnershipTransferred',
32
+ type: 'event',
33
+ },
34
+ {
35
+ inputs: [],
36
+ name: 'newToken',
37
+ outputs: [
38
+ {
39
+ internalType: 'contract IERC20',
40
+ name: '',
41
+ type: 'address',
42
+ },
43
+ ],
44
+ stateMutability: 'view',
45
+ type: 'function',
46
+ },
47
+ {
48
+ inputs: [],
49
+ name: 'oldToken',
50
+ outputs: [
51
+ {
52
+ internalType: 'contract IERC20',
53
+ name: '',
54
+ type: 'address',
55
+ },
56
+ ],
57
+ stateMutability: 'view',
58
+ type: 'function',
59
+ },
60
+ {
61
+ inputs: [],
62
+ name: 'owner',
63
+ outputs: [
64
+ {
65
+ internalType: 'address',
66
+ name: '',
67
+ type: 'address',
68
+ },
69
+ ],
70
+ stateMutability: 'view',
71
+ type: 'function',
72
+ },
73
+ {
74
+ inputs: [],
75
+ name: 'pause',
76
+ outputs: [],
77
+ stateMutability: 'nonpayable',
78
+ type: 'function',
79
+ },
80
+ {
81
+ inputs: [],
82
+ name: 'paused',
83
+ outputs: [
84
+ {
85
+ internalType: 'bool',
86
+ name: '',
87
+ type: 'bool',
88
+ },
89
+ ],
90
+ stateMutability: 'view',
91
+ type: 'function',
92
+ },
93
+ {
94
+ inputs: [],
95
+ name: 'renounceOwnership',
96
+ outputs: [],
97
+ stateMutability: 'nonpayable',
98
+ type: 'function',
99
+ },
100
+ {
101
+ inputs: [
102
+ {
103
+ internalType: 'address',
104
+ name: '_newToken',
105
+ type: 'address',
106
+ },
107
+ ],
108
+ name: 'setNewLoomToken',
109
+ outputs: [],
110
+ stateMutability: 'nonpayable',
111
+ type: 'function',
112
+ },
113
+ {
114
+ inputs: [],
115
+ name: 'swap',
116
+ outputs: [],
117
+ stateMutability: 'nonpayable',
118
+ type: 'function',
119
+ },
120
+ {
121
+ inputs: [
122
+ {
123
+ internalType: 'address',
124
+ name: '_recipient',
125
+ type: 'address',
126
+ },
127
+ {
128
+ internalType: 'uint256',
129
+ name: '_amount',
130
+ type: 'uint256',
131
+ },
132
+ ],
133
+ name: 'swapFor',
134
+ outputs: [],
135
+ stateMutability: 'nonpayable',
136
+ type: 'function',
137
+ },
138
+ {
139
+ inputs: [
140
+ {
141
+ internalType: 'address',
142
+ name: 'newOwner',
143
+ type: 'address',
144
+ },
145
+ ],
146
+ name: 'transferOwnership',
147
+ outputs: [],
148
+ stateMutability: 'nonpayable',
149
+ type: 'function',
150
+ },
151
+ {
152
+ inputs: [],
153
+ name: 'unpause',
154
+ outputs: [],
155
+ stateMutability: 'nonpayable',
156
+ type: 'function',
157
+ },
158
+ {
159
+ inputs: [
160
+ {
161
+ internalType: 'address',
162
+ name: '_recipient',
163
+ type: 'address',
164
+ },
165
+ {
166
+ internalType: 'uint256',
167
+ name: '_amount',
168
+ type: 'uint256',
169
+ },
170
+ ],
171
+ name: 'withdrawTo',
172
+ outputs: [],
173
+ stateMutability: 'nonpayable',
174
+ type: 'function',
175
+ },
176
+ ]
@@ -13,6 +13,8 @@ export default function createContract(address, assetName) {
13
13
  return new SolidityContract(ABI.ant, address)
14
14
  case 'golem':
15
15
  return new SolidityContract(ABI.gnt, address)
16
+ case 'loomv2Swap':
17
+ return new SolidityContract(ABI.loomv2Swap, address)
16
18
  default:
17
19
  return SolidityContract.erc20(address)
18
20
  }