@superfluid-finance/ethereum-contracts 1.4.4-dev.bb1ba68.0 → 1.4.4-dev.c2b2de3.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.
Files changed (146) hide show
  1. package/artifacts/contracts/utils/TOGA.sol/ITOGAv3.json +194 -0
  2. package/artifacts/contracts/utils/TOGA.sol/TOGA.json +2 -33
  3. package/build/contracts/AccessControl.json +1 -1
  4. package/build/contracts/AccessControlEnumerable.json +1 -1
  5. package/build/contracts/Address.json +1 -1
  6. package/build/contracts/AgreementBase.json +1 -1
  7. package/build/contracts/AgreementLibrary.json +1 -1
  8. package/build/contracts/BaseRelayRecipient.json +1 -1
  9. package/build/contracts/BatchLiquidator.json +723 -723
  10. package/build/contracts/BatchOperation.json +1 -1
  11. package/build/contracts/CFAv1Forwarder.json +2050 -2050
  12. package/build/contracts/CFAv1Library.json +1 -1
  13. package/build/contracts/CallUtils.json +1 -1
  14. package/build/contracts/ClosingOnUpdateFlowTestApp.json +1566 -1566
  15. package/build/contracts/ConstantFlowAgreementV1.json +4582 -4582
  16. package/build/contracts/Context.json +1 -1
  17. package/build/contracts/ContextDefinitions.json +1 -1
  18. package/build/contracts/CustomSuperTokenBase.json +1 -1
  19. package/build/contracts/ERC165.json +1 -1
  20. package/build/contracts/ERC1820Implementer.json +79 -79
  21. package/build/contracts/ERC1820RegistryCompiled.json +1 -1
  22. package/build/contracts/ERC20.json +1289 -1289
  23. package/build/contracts/ERC20WithTokenInfo.json +1 -1
  24. package/build/contracts/ERC777Helper.json +1 -1
  25. package/build/contracts/ERC777RecipientDrainingGas.json +350 -350
  26. package/build/contracts/ERC777RecipientReverting.json +373 -373
  27. package/build/contracts/EnumerableSet.json +1 -1
  28. package/build/contracts/EventsEmitter.json +1 -1
  29. package/build/contracts/ExclusiveInflowTestApp.json +1594 -1594
  30. package/build/contracts/FixedSizeData.json +1 -1
  31. package/build/contracts/FlowExchangeTestApp.json +1704 -1704
  32. package/build/contracts/FlowOperatorDefinitions.json +1 -1
  33. package/build/contracts/FullUpgradableSuperTokenProxy.json +74 -74
  34. package/build/contracts/IAccessControl.json +1 -1
  35. package/build/contracts/IAccessControlEnumerable.json +1 -1
  36. package/build/contracts/IConstantFlowAgreementHook.json +1 -1
  37. package/build/contracts/IConstantFlowAgreementV1.json +1 -1
  38. package/build/contracts/IDAv1Library.json +1 -1
  39. package/build/contracts/IERC165.json +1 -1
  40. package/build/contracts/IERC1820Implementer.json +1 -1
  41. package/build/contracts/IERC1820Registry.json +1 -1
  42. package/build/contracts/IERC20.json +1 -1
  43. package/build/contracts/IERC20Metadata.json +1 -1
  44. package/build/contracts/IERC20Permit.json +1 -1
  45. package/build/contracts/IERC777.json +1 -1
  46. package/build/contracts/IERC777Recipient.json +1 -1
  47. package/build/contracts/IERC777Sender.json +1 -1
  48. package/build/contracts/IInstantDistributionAgreementV1.json +1 -1
  49. package/build/contracts/IMultiSigWallet.json +1 -1
  50. package/build/contracts/IPureSuperToken.json +1 -1
  51. package/build/contracts/IPureSuperTokenCustom.json +1 -1
  52. package/build/contracts/IRelayRecipient.json +1 -1
  53. package/build/contracts/IResolver.json +1 -1
  54. package/build/contracts/ISETH.json +1 -1
  55. package/build/contracts/ISETHCustom.json +1 -1
  56. package/build/contracts/ISuperAgreement.json +1 -1
  57. package/build/contracts/ISuperApp.json +1 -1
  58. package/build/contracts/ISuperToken.json +1 -1
  59. package/build/contracts/ISuperTokenFactory.json +1 -1
  60. package/build/contracts/ISuperfluid.json +1 -1
  61. package/build/contracts/ISuperfluidGovernance.json +1 -1
  62. package/build/contracts/ISuperfluidToken.json +1 -1
  63. package/build/contracts/ITOGAv1.json +2099 -2898
  64. package/build/contracts/ITOGAv2.json +2098 -2897
  65. package/build/contracts/ITOGAv3.json +10990 -0
  66. package/build/contracts/Initializable.json +1 -1
  67. package/build/contracts/InstantDistributionAgreementV1.json +5077 -5077
  68. package/build/contracts/NonClosableOutflowTestApp.json +1469 -1469
  69. package/build/contracts/Ownable.json +1 -1
  70. package/build/contracts/Proxy.json +1 -1
  71. package/build/contracts/PureSuperToken.json +534 -534
  72. package/build/contracts/Resolver.json +885 -885
  73. package/build/contracts/SETHProxy.json +293 -293
  74. package/build/contracts/SafeCast.json +1 -1
  75. package/build/contracts/SafeERC20.json +1 -1
  76. package/build/contracts/SafeMath.json +1 -1
  77. package/build/contracts/SelfDeletingFlowTestApp.json +1566 -1566
  78. package/build/contracts/SlotsBitmapLibrary.json +971 -971
  79. package/build/contracts/StreamRedirector.json +1956 -1956
  80. package/build/contracts/Strings.json +1 -1
  81. package/build/contracts/SuperAppBase.json +1 -1
  82. package/build/contracts/SuperAppDefinitions.json +1 -1
  83. package/build/contracts/SuperToken.json +4575 -4575
  84. package/build/contracts/SuperTokenFactory.json +1753 -1753
  85. package/build/contracts/SuperTokenFactoryBase.json +1 -1
  86. package/build/contracts/SuperTokenFactoryHelper.json +104 -104
  87. package/build/contracts/SuperUpgrader.json +1718 -1718
  88. package/build/contracts/Superfluid.json +4566 -4566
  89. package/build/contracts/SuperfluidFrameworkDeployer.json +2400 -2400
  90. package/build/contracts/SuperfluidGovernanceBase.json +1 -1
  91. package/build/contracts/SuperfluidGovernanceConfigs.json +1 -1
  92. package/build/contracts/SuperfluidGovernanceII.json +2438 -2438
  93. package/build/contracts/SuperfluidGovernanceIIProxy.json +211 -211
  94. package/build/contracts/SuperfluidLoader.json +500 -500
  95. package/build/contracts/SuperfluidToken.json +1 -1
  96. package/build/contracts/TOGA.json +4255 -6226
  97. package/build/contracts/TestGovernance.json +2494 -2494
  98. package/build/contracts/TestResolver.json +964 -964
  99. package/build/contracts/TestToken.json +1478 -1478
  100. package/build/contracts/TokenInfo.json +1 -1
  101. package/build/contracts/UUPSProxiable.json +1 -1
  102. package/build/contracts/UUPSProxy.json +116 -116
  103. package/build/contracts/UUPSUtils.json +1 -1
  104. package/build/typechain/contracts/utils/TOGA.sol/ITOGAv3.d.ts +158 -0
  105. package/build/typechain/contracts/utils/TOGA.sol/ITOGAv3.d.ts.map +1 -0
  106. package/build/typechain/contracts/utils/{TokenCustodian.js → TOGA.sol/ITOGAv3.js} +1 -1
  107. package/build/typechain/contracts/utils/TOGA.sol/ITOGAv3.js.map +1 -0
  108. package/build/typechain/contracts/utils/TOGA.sol/TOGA.d.ts +1 -25
  109. package/build/typechain/contracts/utils/TOGA.sol/TOGA.d.ts.map +1 -1
  110. package/build/typechain/contracts/utils/TOGA.sol/index.d.ts +1 -0
  111. package/build/typechain/contracts/utils/TOGA.sol/index.d.ts.map +1 -1
  112. package/build/typechain/contracts/utils/index.d.ts +0 -1
  113. package/build/typechain/contracts/utils/index.d.ts.map +1 -1
  114. package/build/typechain/factories/contracts/utils/TOGA.sol/ITOGAv3__factory.d.ts +36 -0
  115. package/build/typechain/factories/contracts/utils/TOGA.sol/ITOGAv3__factory.d.ts.map +1 -0
  116. package/build/typechain/factories/contracts/utils/TOGA.sol/ITOGAv3__factory.js +203 -0
  117. package/build/typechain/factories/contracts/utils/TOGA.sol/ITOGAv3__factory.js.map +1 -0
  118. package/build/typechain/factories/contracts/utils/TOGA.sol/TOGA__factory.d.ts +3 -3
  119. package/build/typechain/factories/contracts/utils/TOGA.sol/TOGA__factory.d.ts.map +1 -1
  120. package/build/typechain/factories/contracts/utils/TOGA.sol/TOGA__factory.js +5 -36
  121. package/build/typechain/factories/contracts/utils/TOGA.sol/TOGA__factory.js.map +1 -1
  122. package/build/typechain/factories/contracts/utils/TOGA.sol/index.d.ts +1 -0
  123. package/build/typechain/factories/contracts/utils/TOGA.sol/index.d.ts.map +1 -1
  124. package/build/typechain/factories/contracts/utils/TOGA.sol/index.js +3 -1
  125. package/build/typechain/factories/contracts/utils/TOGA.sol/index.js.map +1 -1
  126. package/build/typechain/factories/contracts/utils/index.d.ts +0 -1
  127. package/build/typechain/factories/contracts/utils/index.d.ts.map +1 -1
  128. package/build/typechain/factories/contracts/utils/index.js +1 -3
  129. package/build/typechain/factories/contracts/utils/index.js.map +1 -1
  130. package/build/typechain/index.d.ts +2 -2
  131. package/build/typechain/index.d.ts.map +1 -1
  132. package/build/typechain/index.js +3 -3
  133. package/build/typechain/index.js.map +1 -1
  134. package/contracts/utils/TOGA.sol +16 -28
  135. package/package.json +2 -2
  136. package/scripts/deploy-aux-contracts.js +1 -5
  137. package/artifacts/contracts/utils/TokenCustodian.sol/TokenCustodian.json +0 -146
  138. package/build/contracts/TokenCustodian.json +0 -5052
  139. package/build/typechain/contracts/utils/TokenCustodian.d.ts +0 -114
  140. package/build/typechain/contracts/utils/TokenCustodian.d.ts.map +0 -1
  141. package/build/typechain/contracts/utils/TokenCustodian.js.map +0 -1
  142. package/build/typechain/factories/contracts/utils/TokenCustodian__factory.d.ts +0 -56
  143. package/build/typechain/factories/contracts/utils/TokenCustodian__factory.d.ts.map +0 -1
  144. package/build/typechain/factories/contracts/utils/TokenCustodian__factory.js +0 -178
  145. package/build/typechain/factories/contracts/utils/TokenCustodian__factory.js.map +0 -1
  146. package/contracts/utils/TokenCustodian.sol +0 -55
@@ -30,22 +30,22 @@
30
30
  {
31
31
  "ast": {
32
32
  "nodeType": "YulBlock",
33
- "src": "0:760:104",
33
+ "src": "0:760:103",
34
34
  "statements": [
35
35
  {
36
36
  "nodeType": "YulBlock",
37
- "src": "6:3:104",
37
+ "src": "6:3:103",
38
38
  "statements": []
39
39
  },
40
40
  {
41
41
  "body": {
42
42
  "nodeType": "YulBlock",
43
- "src": "105:216:104",
43
+ "src": "105:216:103",
44
44
  "statements": [
45
45
  {
46
46
  "body": {
47
47
  "nodeType": "YulBlock",
48
- "src": "151:16:104",
48
+ "src": "151:16:103",
49
49
  "statements": [
50
50
  {
51
51
  "expression": {
@@ -53,14 +53,14 @@
53
53
  {
54
54
  "kind": "number",
55
55
  "nodeType": "YulLiteral",
56
- "src": "160:1:104",
56
+ "src": "160:1:103",
57
57
  "type": "",
58
58
  "value": "0"
59
59
  },
60
60
  {
61
61
  "kind": "number",
62
62
  "nodeType": "YulLiteral",
63
- "src": "163:1:104",
63
+ "src": "163:1:103",
64
64
  "type": "",
65
65
  "value": "0"
66
66
  }
@@ -68,13 +68,13 @@
68
68
  "functionName": {
69
69
  "name": "revert",
70
70
  "nodeType": "YulIdentifier",
71
- "src": "153:6:104"
71
+ "src": "153:6:103"
72
72
  },
73
73
  "nodeType": "YulFunctionCall",
74
- "src": "153:12:104"
74
+ "src": "153:12:103"
75
75
  },
76
76
  "nodeType": "YulExpressionStatement",
77
- "src": "153:12:104"
77
+ "src": "153:12:103"
78
78
  }
79
79
  ]
80
80
  },
@@ -85,26 +85,26 @@
85
85
  {
86
86
  "name": "dataEnd",
87
87
  "nodeType": "YulIdentifier",
88
- "src": "126:7:104"
88
+ "src": "126:7:103"
89
89
  },
90
90
  {
91
91
  "name": "headStart",
92
92
  "nodeType": "YulIdentifier",
93
- "src": "135:9:104"
93
+ "src": "135:9:103"
94
94
  }
95
95
  ],
96
96
  "functionName": {
97
97
  "name": "sub",
98
98
  "nodeType": "YulIdentifier",
99
- "src": "122:3:104"
99
+ "src": "122:3:103"
100
100
  },
101
101
  "nodeType": "YulFunctionCall",
102
- "src": "122:23:104"
102
+ "src": "122:23:103"
103
103
  },
104
104
  {
105
105
  "kind": "number",
106
106
  "nodeType": "YulLiteral",
107
- "src": "147:2:104",
107
+ "src": "147:2:103",
108
108
  "type": "",
109
109
  "value": "32"
110
110
  }
@@ -112,38 +112,38 @@
112
112
  "functionName": {
113
113
  "name": "slt",
114
114
  "nodeType": "YulIdentifier",
115
- "src": "118:3:104"
115
+ "src": "118:3:103"
116
116
  },
117
117
  "nodeType": "YulFunctionCall",
118
- "src": "118:32:104"
118
+ "src": "118:32:103"
119
119
  },
120
120
  "nodeType": "YulIf",
121
- "src": "115:52:104"
121
+ "src": "115:52:103"
122
122
  },
123
123
  {
124
124
  "nodeType": "YulVariableDeclaration",
125
- "src": "176:36:104",
125
+ "src": "176:36:103",
126
126
  "value": {
127
127
  "arguments": [
128
128
  {
129
129
  "name": "headStart",
130
130
  "nodeType": "YulIdentifier",
131
- "src": "202:9:104"
131
+ "src": "202:9:103"
132
132
  }
133
133
  ],
134
134
  "functionName": {
135
135
  "name": "calldataload",
136
136
  "nodeType": "YulIdentifier",
137
- "src": "189:12:104"
137
+ "src": "189:12:103"
138
138
  },
139
139
  "nodeType": "YulFunctionCall",
140
- "src": "189:23:104"
140
+ "src": "189:23:103"
141
141
  },
142
142
  "variables": [
143
143
  {
144
144
  "name": "value",
145
145
  "nodeType": "YulTypedName",
146
- "src": "180:5:104",
146
+ "src": "180:5:103",
147
147
  "type": ""
148
148
  }
149
149
  ]
@@ -151,7 +151,7 @@
151
151
  {
152
152
  "body": {
153
153
  "nodeType": "YulBlock",
154
- "src": "275:16:104",
154
+ "src": "275:16:103",
155
155
  "statements": [
156
156
  {
157
157
  "expression": {
@@ -159,14 +159,14 @@
159
159
  {
160
160
  "kind": "number",
161
161
  "nodeType": "YulLiteral",
162
- "src": "284:1:104",
162
+ "src": "284:1:103",
163
163
  "type": "",
164
164
  "value": "0"
165
165
  },
166
166
  {
167
167
  "kind": "number",
168
168
  "nodeType": "YulLiteral",
169
- "src": "287:1:104",
169
+ "src": "287:1:103",
170
170
  "type": "",
171
171
  "value": "0"
172
172
  }
@@ -174,13 +174,13 @@
174
174
  "functionName": {
175
175
  "name": "revert",
176
176
  "nodeType": "YulIdentifier",
177
- "src": "277:6:104"
177
+ "src": "277:6:103"
178
178
  },
179
179
  "nodeType": "YulFunctionCall",
180
- "src": "277:12:104"
180
+ "src": "277:12:103"
181
181
  },
182
182
  "nodeType": "YulExpressionStatement",
183
- "src": "277:12:104"
183
+ "src": "277:12:103"
184
184
  }
185
185
  ]
186
186
  },
@@ -191,14 +191,14 @@
191
191
  {
192
192
  "name": "value",
193
193
  "nodeType": "YulIdentifier",
194
- "src": "234:5:104"
194
+ "src": "234:5:103"
195
195
  },
196
196
  {
197
197
  "arguments": [
198
198
  {
199
199
  "name": "value",
200
200
  "nodeType": "YulIdentifier",
201
- "src": "245:5:104"
201
+ "src": "245:5:103"
202
202
  },
203
203
  {
204
204
  "arguments": [
@@ -207,14 +207,14 @@
207
207
  {
208
208
  "kind": "number",
209
209
  "nodeType": "YulLiteral",
210
- "src": "260:3:104",
210
+ "src": "260:3:103",
211
211
  "type": "",
212
212
  "value": "160"
213
213
  },
214
214
  {
215
215
  "kind": "number",
216
216
  "nodeType": "YulLiteral",
217
- "src": "265:1:104",
217
+ "src": "265:1:103",
218
218
  "type": "",
219
219
  "value": "1"
220
220
  }
@@ -222,15 +222,15 @@
222
222
  "functionName": {
223
223
  "name": "shl",
224
224
  "nodeType": "YulIdentifier",
225
- "src": "256:3:104"
225
+ "src": "256:3:103"
226
226
  },
227
227
  "nodeType": "YulFunctionCall",
228
- "src": "256:11:104"
228
+ "src": "256:11:103"
229
229
  },
230
230
  {
231
231
  "kind": "number",
232
232
  "nodeType": "YulLiteral",
233
- "src": "269:1:104",
233
+ "src": "269:1:103",
234
234
  "type": "",
235
235
  "value": "1"
236
236
  }
@@ -238,54 +238,54 @@
238
238
  "functionName": {
239
239
  "name": "sub",
240
240
  "nodeType": "YulIdentifier",
241
- "src": "252:3:104"
241
+ "src": "252:3:103"
242
242
  },
243
243
  "nodeType": "YulFunctionCall",
244
- "src": "252:19:104"
244
+ "src": "252:19:103"
245
245
  }
246
246
  ],
247
247
  "functionName": {
248
248
  "name": "and",
249
249
  "nodeType": "YulIdentifier",
250
- "src": "241:3:104"
250
+ "src": "241:3:103"
251
251
  },
252
252
  "nodeType": "YulFunctionCall",
253
- "src": "241:31:104"
253
+ "src": "241:31:103"
254
254
  }
255
255
  ],
256
256
  "functionName": {
257
257
  "name": "eq",
258
258
  "nodeType": "YulIdentifier",
259
- "src": "231:2:104"
259
+ "src": "231:2:103"
260
260
  },
261
261
  "nodeType": "YulFunctionCall",
262
- "src": "231:42:104"
262
+ "src": "231:42:103"
263
263
  }
264
264
  ],
265
265
  "functionName": {
266
266
  "name": "iszero",
267
267
  "nodeType": "YulIdentifier",
268
- "src": "224:6:104"
268
+ "src": "224:6:103"
269
269
  },
270
270
  "nodeType": "YulFunctionCall",
271
- "src": "224:50:104"
271
+ "src": "224:50:103"
272
272
  },
273
273
  "nodeType": "YulIf",
274
- "src": "221:70:104"
274
+ "src": "221:70:103"
275
275
  },
276
276
  {
277
277
  "nodeType": "YulAssignment",
278
- "src": "300:15:104",
278
+ "src": "300:15:103",
279
279
  "value": {
280
280
  "name": "value",
281
281
  "nodeType": "YulIdentifier",
282
- "src": "310:5:104"
282
+ "src": "310:5:103"
283
283
  },
284
284
  "variableNames": [
285
285
  {
286
286
  "name": "value0",
287
287
  "nodeType": "YulIdentifier",
288
- "src": "300:6:104"
288
+ "src": "300:6:103"
289
289
  }
290
290
  ]
291
291
  }
@@ -297,13 +297,13 @@
297
297
  {
298
298
  "name": "headStart",
299
299
  "nodeType": "YulTypedName",
300
- "src": "71:9:104",
300
+ "src": "71:9:103",
301
301
  "type": ""
302
302
  },
303
303
  {
304
304
  "name": "dataEnd",
305
305
  "nodeType": "YulTypedName",
306
- "src": "82:7:104",
306
+ "src": "82:7:103",
307
307
  "type": ""
308
308
  }
309
309
  ],
@@ -311,31 +311,31 @@
311
311
  {
312
312
  "name": "value0",
313
313
  "nodeType": "YulTypedName",
314
- "src": "94:6:104",
314
+ "src": "94:6:103",
315
315
  "type": ""
316
316
  }
317
317
  ],
318
- "src": "14:307:104"
318
+ "src": "14:307:103"
319
319
  },
320
320
  {
321
321
  "body": {
322
322
  "nodeType": "YulBlock",
323
- "src": "427:102:104",
323
+ "src": "427:102:103",
324
324
  "statements": [
325
325
  {
326
326
  "nodeType": "YulAssignment",
327
- "src": "437:26:104",
327
+ "src": "437:26:103",
328
328
  "value": {
329
329
  "arguments": [
330
330
  {
331
331
  "name": "headStart",
332
332
  "nodeType": "YulIdentifier",
333
- "src": "449:9:104"
333
+ "src": "449:9:103"
334
334
  },
335
335
  {
336
336
  "kind": "number",
337
337
  "nodeType": "YulLiteral",
338
- "src": "460:2:104",
338
+ "src": "460:2:103",
339
339
  "type": "",
340
340
  "value": "32"
341
341
  }
@@ -343,16 +343,16 @@
343
343
  "functionName": {
344
344
  "name": "add",
345
345
  "nodeType": "YulIdentifier",
346
- "src": "445:3:104"
346
+ "src": "445:3:103"
347
347
  },
348
348
  "nodeType": "YulFunctionCall",
349
- "src": "445:18:104"
349
+ "src": "445:18:103"
350
350
  },
351
351
  "variableNames": [
352
352
  {
353
353
  "name": "tail",
354
354
  "nodeType": "YulIdentifier",
355
- "src": "437:4:104"
355
+ "src": "437:4:103"
356
356
  }
357
357
  ]
358
358
  },
@@ -362,14 +362,14 @@
362
362
  {
363
363
  "name": "headStart",
364
364
  "nodeType": "YulIdentifier",
365
- "src": "479:9:104"
365
+ "src": "479:9:103"
366
366
  },
367
367
  {
368
368
  "arguments": [
369
369
  {
370
370
  "name": "value0",
371
371
  "nodeType": "YulIdentifier",
372
- "src": "494:6:104"
372
+ "src": "494:6:103"
373
373
  },
374
374
  {
375
375
  "arguments": [
@@ -378,14 +378,14 @@
378
378
  {
379
379
  "kind": "number",
380
380
  "nodeType": "YulLiteral",
381
- "src": "510:3:104",
381
+ "src": "510:3:103",
382
382
  "type": "",
383
383
  "value": "160"
384
384
  },
385
385
  {
386
386
  "kind": "number",
387
387
  "nodeType": "YulLiteral",
388
- "src": "515:1:104",
388
+ "src": "515:1:103",
389
389
  "type": "",
390
390
  "value": "1"
391
391
  }
@@ -393,15 +393,15 @@
393
393
  "functionName": {
394
394
  "name": "shl",
395
395
  "nodeType": "YulIdentifier",
396
- "src": "506:3:104"
396
+ "src": "506:3:103"
397
397
  },
398
398
  "nodeType": "YulFunctionCall",
399
- "src": "506:11:104"
399
+ "src": "506:11:103"
400
400
  },
401
401
  {
402
402
  "kind": "number",
403
403
  "nodeType": "YulLiteral",
404
- "src": "519:1:104",
404
+ "src": "519:1:103",
405
405
  "type": "",
406
406
  "value": "1"
407
407
  }
@@ -409,31 +409,31 @@
409
409
  "functionName": {
410
410
  "name": "sub",
411
411
  "nodeType": "YulIdentifier",
412
- "src": "502:3:104"
412
+ "src": "502:3:103"
413
413
  },
414
414
  "nodeType": "YulFunctionCall",
415
- "src": "502:19:104"
415
+ "src": "502:19:103"
416
416
  }
417
417
  ],
418
418
  "functionName": {
419
419
  "name": "and",
420
420
  "nodeType": "YulIdentifier",
421
- "src": "490:3:104"
421
+ "src": "490:3:103"
422
422
  },
423
423
  "nodeType": "YulFunctionCall",
424
- "src": "490:32:104"
424
+ "src": "490:32:103"
425
425
  }
426
426
  ],
427
427
  "functionName": {
428
428
  "name": "mstore",
429
429
  "nodeType": "YulIdentifier",
430
- "src": "472:6:104"
430
+ "src": "472:6:103"
431
431
  },
432
432
  "nodeType": "YulFunctionCall",
433
- "src": "472:51:104"
433
+ "src": "472:51:103"
434
434
  },
435
435
  "nodeType": "YulExpressionStatement",
436
- "src": "472:51:104"
436
+ "src": "472:51:103"
437
437
  }
438
438
  ]
439
439
  },
@@ -443,13 +443,13 @@
443
443
  {
444
444
  "name": "headStart",
445
445
  "nodeType": "YulTypedName",
446
- "src": "396:9:104",
446
+ "src": "396:9:103",
447
447
  "type": ""
448
448
  },
449
449
  {
450
450
  "name": "value0",
451
451
  "nodeType": "YulTypedName",
452
- "src": "407:6:104",
452
+ "src": "407:6:103",
453
453
  "type": ""
454
454
  }
455
455
  ],
@@ -457,31 +457,31 @@
457
457
  {
458
458
  "name": "tail",
459
459
  "nodeType": "YulTypedName",
460
- "src": "418:4:104",
460
+ "src": "418:4:103",
461
461
  "type": ""
462
462
  }
463
463
  ],
464
- "src": "326:203:104"
464
+ "src": "326:203:103"
465
465
  },
466
466
  {
467
467
  "body": {
468
468
  "nodeType": "YulBlock",
469
- "src": "656:102:104",
469
+ "src": "656:102:103",
470
470
  "statements": [
471
471
  {
472
472
  "nodeType": "YulAssignment",
473
- "src": "666:26:104",
473
+ "src": "666:26:103",
474
474
  "value": {
475
475
  "arguments": [
476
476
  {
477
477
  "name": "headStart",
478
478
  "nodeType": "YulIdentifier",
479
- "src": "678:9:104"
479
+ "src": "678:9:103"
480
480
  },
481
481
  {
482
482
  "kind": "number",
483
483
  "nodeType": "YulLiteral",
484
- "src": "689:2:104",
484
+ "src": "689:2:103",
485
485
  "type": "",
486
486
  "value": "32"
487
487
  }
@@ -489,16 +489,16 @@
489
489
  "functionName": {
490
490
  "name": "add",
491
491
  "nodeType": "YulIdentifier",
492
- "src": "674:3:104"
492
+ "src": "674:3:103"
493
493
  },
494
494
  "nodeType": "YulFunctionCall",
495
- "src": "674:18:104"
495
+ "src": "674:18:103"
496
496
  },
497
497
  "variableNames": [
498
498
  {
499
499
  "name": "tail",
500
500
  "nodeType": "YulIdentifier",
501
- "src": "666:4:104"
501
+ "src": "666:4:103"
502
502
  }
503
503
  ]
504
504
  },
@@ -508,14 +508,14 @@
508
508
  {
509
509
  "name": "headStart",
510
510
  "nodeType": "YulIdentifier",
511
- "src": "708:9:104"
511
+ "src": "708:9:103"
512
512
  },
513
513
  {
514
514
  "arguments": [
515
515
  {
516
516
  "name": "value0",
517
517
  "nodeType": "YulIdentifier",
518
- "src": "723:6:104"
518
+ "src": "723:6:103"
519
519
  },
520
520
  {
521
521
  "arguments": [
@@ -524,14 +524,14 @@
524
524
  {
525
525
  "kind": "number",
526
526
  "nodeType": "YulLiteral",
527
- "src": "739:3:104",
527
+ "src": "739:3:103",
528
528
  "type": "",
529
529
  "value": "160"
530
530
  },
531
531
  {
532
532
  "kind": "number",
533
533
  "nodeType": "YulLiteral",
534
- "src": "744:1:104",
534
+ "src": "744:1:103",
535
535
  "type": "",
536
536
  "value": "1"
537
537
  }
@@ -539,15 +539,15 @@
539
539
  "functionName": {
540
540
  "name": "shl",
541
541
  "nodeType": "YulIdentifier",
542
- "src": "735:3:104"
542
+ "src": "735:3:103"
543
543
  },
544
544
  "nodeType": "YulFunctionCall",
545
- "src": "735:11:104"
545
+ "src": "735:11:103"
546
546
  },
547
547
  {
548
548
  "kind": "number",
549
549
  "nodeType": "YulLiteral",
550
- "src": "748:1:104",
550
+ "src": "748:1:103",
551
551
  "type": "",
552
552
  "value": "1"
553
553
  }
@@ -555,31 +555,31 @@
555
555
  "functionName": {
556
556
  "name": "sub",
557
557
  "nodeType": "YulIdentifier",
558
- "src": "731:3:104"
558
+ "src": "731:3:103"
559
559
  },
560
560
  "nodeType": "YulFunctionCall",
561
- "src": "731:19:104"
561
+ "src": "731:19:103"
562
562
  }
563
563
  ],
564
564
  "functionName": {
565
565
  "name": "and",
566
566
  "nodeType": "YulIdentifier",
567
- "src": "719:3:104"
567
+ "src": "719:3:103"
568
568
  },
569
569
  "nodeType": "YulFunctionCall",
570
- "src": "719:32:104"
570
+ "src": "719:32:103"
571
571
  }
572
572
  ],
573
573
  "functionName": {
574
574
  "name": "mstore",
575
575
  "nodeType": "YulIdentifier",
576
- "src": "701:6:104"
576
+ "src": "701:6:103"
577
577
  },
578
578
  "nodeType": "YulFunctionCall",
579
- "src": "701:51:104"
579
+ "src": "701:51:103"
580
580
  },
581
581
  "nodeType": "YulExpressionStatement",
582
- "src": "701:51:104"
582
+ "src": "701:51:103"
583
583
  }
584
584
  ]
585
585
  },
@@ -589,13 +589,13 @@
589
589
  {
590
590
  "name": "headStart",
591
591
  "nodeType": "YulTypedName",
592
- "src": "625:9:104",
592
+ "src": "625:9:103",
593
593
  "type": ""
594
594
  },
595
595
  {
596
596
  "name": "value0",
597
597
  "nodeType": "YulTypedName",
598
- "src": "636:6:104",
598
+ "src": "636:6:103",
599
599
  "type": ""
600
600
  }
601
601
  ],
@@ -603,22 +603,22 @@
603
603
  {
604
604
  "name": "tail",
605
605
  "nodeType": "YulTypedName",
606
- "src": "647:4:104",
606
+ "src": "647:4:103",
607
607
  "type": ""
608
608
  }
609
609
  ],
610
- "src": "534:224:104"
610
+ "src": "534:224:103"
611
611
  }
612
612
  ]
613
613
  },
614
614
  "contents": "{\n { }\n function abi_decode_tuple_t_contract$_ISuperfluid_$20186(headStart, dataEnd) -> value0\n {\n if slt(sub(dataEnd, headStart), 32) { revert(0, 0) }\n let value := calldataload(headStart)\n if iszero(eq(value, and(value, sub(shl(160, 1), 1)))) { revert(0, 0) }\n value0 := value\n }\n function abi_encode_tuple_t_address__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n function abi_encode_tuple_t_contract$_ISuperfluid_$20186__to_t_address__fromStack_reversed(headStart, value0) -> tail\n {\n tail := add(headStart, 32)\n mstore(headStart, and(value0, sub(shl(160, 1), 1)))\n }\n}",
615
- "id": 104,
615
+ "id": 103,
616
616
  "language": "Yul",
617
617
  "name": "#utility.yul"
618
618
  }
619
619
  ],
620
620
  "sourceMap": "10660:181:85:-:0;;;;;;;;;;;;;;;;;;;",
621
- "deployedSourceMap": "10660:181:85:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10699:140;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;490:32:104;;;472:51;;460:2;445:18;10699:140:85;;;;;;;;10767:13;10826:4;10811:20;;;;;:::i;:::-;-1:-1:-1;;;;;490:32:104;;;472:51;;460:2;445:18;10811:20:85;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10796:36:85;10699:140;-1:-1:-1;;10699:140:85:o;-1:-1:-1:-;;;;;;;;:::o;14:307:104:-;94:6;147:2;135:9;126:7;122:23;118:32;115:52;;;163:1;160;153:12;115:52;189:23;;-1:-1:-1;;;;;241:31:104;;231:42;;221:70;;287:1;284;277:12;221:70;310:5;14:307;-1:-1:-1;;;14:307:104:o",
621
+ "deployedSourceMap": "10660:181:85:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10699:140;;;;;;:::i;:::-;;:::i;:::-;;;-1:-1:-1;;;;;490:32:103;;;472:51;;460:2;445:18;10699:140:85;;;;;;;;10767:13;10826:4;10811:20;;;;;:::i;:::-;-1:-1:-1;;;;;490:32:103;;;472:51;;460:2;445:18;10811:20:85;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;10796:36:85;10699:140;-1:-1:-1;;10699:140:85:o;-1:-1:-1:-;;;;;;;;:::o;14:307:103:-;94:6;147:2;135:9;126:7;122:23;118:32;115:52;;;163:1;160;153:12;115:52;189:23;;-1:-1:-1;;;;;241:31:103;;231:42;;221:70;;287:1;284;277:12;221:70;310:5;14:307;-1:-1:-1;;;14:307:103:o",
622
622
  "source": "// SPDX-License-Identifier: AGPLv3\npragma solidity 0.8.16;\n\nimport {\n ISuperTokenFactory,\n ISuperToken,\n IERC20,\n ERC20WithTokenInfo\n} from \"../interfaces/superfluid/ISuperTokenFactory.sol\";\n\nimport { ISuperfluid } from \"../interfaces/superfluid/ISuperfluid.sol\";\nimport { Ownable } from \"@openzeppelin/contracts/access/Ownable.sol\";\n\nimport { UUPSProxy } from \"../upgradability/UUPSProxy.sol\";\nimport { UUPSProxiable } from \"../upgradability/UUPSProxiable.sol\";\n\nimport { SuperToken } from \"../superfluid/SuperToken.sol\";\n\nimport { FullUpgradableSuperTokenProxy } from \"./FullUpgradableSuperTokenProxy.sol\";\n\nabstract contract SuperTokenFactoryBase is\n UUPSProxiable,\n ISuperTokenFactory\n{\n struct InitializeData {\n address underlyingToken;\n address superToken;\n }\n\n /* WARNING: NEVER RE-ORDER VARIABLES! Including the base contracts.\n Always double-check that new\n variables are added APPEND-ONLY. Re-ordering variables can\n permanently BREAK the deployed proxy contract. */\n\n ISuperfluid immutable internal _host;\n\n ISuperToken internal _superTokenLogic;\n\n /// @notice A mapping from underlying token addresses to canonical wrapper super token addresses\n /// @dev Reasoning: (1) provide backwards compatibility for existing listed wrapper super tokens\n /// @dev (2) prevent address retrieval issues if we ever choose to modify the bytecode of the UUPSProxy contract\n /// @dev NOTE: address(0) key points to the NativeAssetSuperToken on the network.\n mapping(address => address) internal _canonicalWrapperSuperTokens;\n \n /// NOTE: Whenever modifying the storage layout here it is important to update the validateStorageLayout\n /// function in its respective mock contract to ensure that it doesn't break anything or lead to unexpected\n /// behaviors/layout when upgrading\n\n error SUPER_TOKEN_FACTORY_ONLY_GOVERNANCE_OWNER();\n\n constructor(\n ISuperfluid host\n ) {\n _host = host;\n }\n\n /// @inheritdoc ISuperTokenFactory\n function getHost()\n external view\n override(ISuperTokenFactory)\n returns(address host)\n {\n return address(_host);\n }\n\n /**************************************************************************\n * UUPSProxiable\n **************************************************************************/\n /// @inheritdoc ISuperTokenFactory\n function initialize()\n external override\n initializer // OpenZeppelin Initializable\n {\n _updateSuperTokenLogic();\n }\n\n function proxiableUUID() public pure override returns (bytes32) {\n return keccak256(\"org.superfluid-finance.contracts.SuperTokenFactory.implementation\");\n }\n\n function updateCode(address newAddress) external override {\n if (msg.sender != address(_host)) {\n revert SUPER_TOKEN_FACTORY_ONLY_HOST();\n }\n _updateCodeAddress(newAddress);\n _updateSuperTokenLogic();\n }\n\n function _updateSuperTokenLogic() private {\n // use external call to trigger the new code to update the super token logic contract\n _superTokenLogic = SuperToken(this.createSuperTokenLogic(_host));\n UUPSProxiable(address(_superTokenLogic)).castrate();\n emit SuperTokenLogicCreated(_superTokenLogic);\n }\n\n /**************************************************************************\n * ISuperTokenFactory\n **************************************************************************/\n /// @inheritdoc ISuperTokenFactory\n function getSuperTokenLogic()\n external view override\n returns (ISuperToken)\n {\n return _superTokenLogic;\n }\n\n function createSuperTokenLogic(ISuperfluid host) external virtual returns (address logic);\n\n /// @inheritdoc ISuperTokenFactory\n function createCanonicalERC20Wrapper(ERC20WithTokenInfo _underlyingToken)\n external\n returns (ISuperToken)\n {\n // we use this to check if we have initialized the _canonicalWrapperSuperTokens mapping\n // @note we must set this during initialization\n if (_canonicalWrapperSuperTokens[address(0)] == address(0)) {\n revert SUPER_TOKEN_FACTORY_UNINITIALIZED();\n }\n\n address underlyingTokenAddress = address(_underlyingToken);\n address canonicalSuperTokenAddress = _canonicalWrapperSuperTokens[\n underlyingTokenAddress\n ];\n\n // if the canonical super token address exists, revert with custom error\n if (canonicalSuperTokenAddress != address(0)) {\n revert SUPER_TOKEN_FACTORY_ALREADY_EXISTS();\n }\n\n // use create2 to deterministically create the proxy contract for the wrapper super token\n bytes32 salt = keccak256(abi.encode(underlyingTokenAddress));\n UUPSProxy proxy = new UUPSProxy{ salt: salt }();\n\n // NOTE: address(proxy) is equivalent to address(superToken)\n _canonicalWrapperSuperTokens[underlyingTokenAddress] = address(\n proxy\n );\n\n // set the implementation/logic contract address for the newly deployed proxy\n proxy.initializeProxy(address(_superTokenLogic));\n\n // cast it as the same type as the logic contract\n ISuperToken superToken = ISuperToken(address(proxy));\n\n // get underlying token info\n uint8 underlyingDecimals = _underlyingToken.decimals();\n string memory underlyingName = _underlyingToken.name();\n string memory underlyingSymbol = _underlyingToken.symbol();\n // initialize the contract (proxy constructor)\n superToken.initialize(\n _underlyingToken,\n underlyingDecimals,\n string.concat(\"Super \", underlyingName),\n string.concat(underlyingSymbol, \"x\")\n );\n\n emit SuperTokenCreated(superToken);\n\n return superToken;\n }\n\n /// @inheritdoc ISuperTokenFactory\n function createERC20Wrapper(\n IERC20 underlyingToken,\n uint8 underlyingDecimals,\n Upgradability upgradability,\n string calldata name,\n string calldata symbol\n )\n public override\n returns (ISuperToken superToken)\n {\n if (address(underlyingToken) == address(0)) {\n revert SUPER_TOKEN_FACTORY_ZERO_ADDRESS();\n }\n\n if (upgradability == Upgradability.NON_UPGRADABLE) {\n superToken = ISuperToken(this.createSuperTokenLogic(_host));\n } else if (upgradability == Upgradability.SEMI_UPGRADABLE) {\n UUPSProxy proxy = new UUPSProxy();\n // initialize the wrapper\n proxy.initializeProxy(address(_superTokenLogic));\n superToken = ISuperToken(address(proxy));\n } else /* if (type == Upgradability.FULL_UPGRADABLE) */ {\n FullUpgradableSuperTokenProxy proxy = new FullUpgradableSuperTokenProxy();\n proxy.initialize();\n superToken = ISuperToken(address(proxy));\n }\n\n // initialize the token\n superToken.initialize(\n underlyingToken,\n underlyingDecimals,\n name,\n symbol\n );\n\n emit SuperTokenCreated(superToken);\n }\n\n /// @inheritdoc ISuperTokenFactory\n function createERC20Wrapper(\n ERC20WithTokenInfo underlyingToken,\n Upgradability upgradability,\n string calldata name,\n string calldata symbol\n )\n external override\n returns (ISuperToken superToken)\n {\n return createERC20Wrapper(\n underlyingToken,\n underlyingToken.decimals(),\n upgradability,\n name,\n symbol\n );\n }\n\n /// @inheritdoc ISuperTokenFactory\n function initializeCustomSuperToken(\n address customSuperTokenProxy\n )\n external override\n {\n // odd solidity stuff..\n // NOTE payable necessary because UUPSProxy has a payable fallback function\n address payable a = payable(address(uint160(customSuperTokenProxy)));\n UUPSProxy(a).initializeProxy(address(_superTokenLogic));\n\n emit CustomSuperTokenCreated(ISuperToken(customSuperTokenProxy));\n }\n\n /// @inheritdoc ISuperTokenFactory\n function computeCanonicalERC20WrapperAddress(address _underlyingToken)\n external\n view\n returns (address superTokenAddress, bool isDeployed)\n {\n address existingAddress = _canonicalWrapperSuperTokens[\n _underlyingToken\n ];\n\n if (existingAddress != address(0)) {\n superTokenAddress = existingAddress;\n isDeployed = true;\n } else {\n bytes memory bytecode = type(UUPSProxy).creationCode;\n superTokenAddress = address(\n uint160(\n uint256(\n keccak256(\n abi.encodePacked(\n bytes1(0xff),\n address(this),\n keccak256(abi.encode(_underlyingToken)),\n keccak256(bytecode)\n )\n )\n )\n )\n );\n isDeployed = false;\n }\n }\n\n /// @inheritdoc ISuperTokenFactory\n function getCanonicalERC20Wrapper(address _underlyingTokenAddress)\n external\n view\n returns (address superTokenAddress)\n {\n superTokenAddress = _canonicalWrapperSuperTokens[\n _underlyingTokenAddress\n ];\n }\n\n /// @notice Initializes list of canonical wrapper super tokens.\n /// @dev Note that this should also be kind of a throwaway function which will be executed only once.\n /// @param _data an array of canonical wrappper super tokens to be set\n function initializeCanonicalWrapperSuperTokens(\n InitializeData[] calldata _data\n ) external virtual {\n Ownable gov = Ownable(address(_host.getGovernance()));\n if (msg.sender != gov.owner()) revert SUPER_TOKEN_FACTORY_ONLY_GOVERNANCE_OWNER();\n\n // once the list has been set, it cannot be reset\n // @note this means that we must set the 0 address (Native Asset Super Token) when we call this the first time\n if (_canonicalWrapperSuperTokens[address(0)] != address(0)) {\n revert SUPER_TOKEN_FACTORY_ALREADY_EXISTS();\n }\n\n // initialize mapping\n for (uint256 i = 0; i < _data.length; i++) {\n _canonicalWrapperSuperTokens[_data[i].underlyingToken] = _data[i]\n .superToken;\n }\n }\n}\n\n// splitting this off because the contract is getting bigger\ncontract SuperTokenFactoryHelper {\n function create(ISuperfluid host)\n external\n returns (address logic)\n {\n return address(new SuperToken(host));\n }\n}\n\ncontract SuperTokenFactory is SuperTokenFactoryBase\n{\n /* WARNING: NEVER RE-ORDER VARIABLES! Including the base contracts.\n Always double-check that new\n variables are added APPEND-ONLY. Re-ordering variables can\n permanently BREAK the deployed proxy contract. */\n\n SuperTokenFactoryHelper immutable private _helper;\n\n constructor(\n ISuperfluid host,\n SuperTokenFactoryHelper helper\n )\n SuperTokenFactoryBase(host)\n // solhint-disable-next-line no-empty-blocks\n {\n _helper = helper;\n }\n\n function createSuperTokenLogic(ISuperfluid host)\n external override\n returns (address logic)\n {\n return _helper.create(host);\n }\n}\n",
623
623
  "sourcePath": "/home/runner/work/protocol-monorepo/protocol-monorepo/packages/ethereum-contracts/contracts/superfluid/SuperTokenFactory.sol",
624
624
  "ast": {
@@ -9653,7 +9653,7 @@
9653
9653
  },
9654
9654
  "networks": {},
9655
9655
  "schemaVersion": "3.4.9",
9656
- "updatedAt": "2022-11-02T09:41:57.574Z",
9656
+ "updatedAt": "2022-11-16T13:27:50.665Z",
9657
9657
  "devdoc": {
9658
9658
  "kind": "dev",
9659
9659
  "methods": {},