@superfluid-finance/ethereum-contracts 1.2.3-dev.f94fdbb.0 → 1.3.1-dev.7df8a6a.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 (171) hide show
  1. package/build/contracts/AccessControl.json +3 -3
  2. package/build/contracts/AccessControlEnumerable.json +3 -3
  3. package/build/contracts/Address.json +5 -5
  4. package/build/contracts/AgreementBase.json +13 -13
  5. package/build/contracts/AgreementLibrary.json +7 -7
  6. package/build/contracts/BaseRelayRecipient.json +5 -5
  7. package/build/contracts/BatchLiquidator.json +179 -179
  8. package/build/contracts/BatchOperation.json +5 -5
  9. package/build/contracts/CFAv1Library.json +5 -5
  10. package/build/contracts/CallUtils.json +7 -7
  11. package/build/contracts/ClosingOnUpdateFlowTestApp.json +2107 -1917
  12. package/build/contracts/ConstantFlowAgreementV1.json +8 -8
  13. package/build/contracts/Context.json +3 -3
  14. package/build/contracts/ContextDefinitions.json +5 -5
  15. package/build/contracts/Create2.json +5 -5
  16. package/build/contracts/CustomSuperTokenBase.json +3 -3
  17. package/build/contracts/ERC165.json +3 -3
  18. package/build/contracts/ERC1820Implementer.json +5 -5
  19. package/build/contracts/ERC1820RegistryCompiled.json +7 -7
  20. package/build/contracts/ERC20.json +5 -5
  21. package/build/contracts/ERC20Burnable.json +3 -3
  22. package/build/contracts/ERC20Pausable.json +3 -3
  23. package/build/contracts/ERC20PresetMinterPauser.json +5 -5
  24. package/build/contracts/ERC20WithTokenInfo.json +3 -3
  25. package/build/contracts/ERC777Helper.json +7 -7
  26. package/build/contracts/ERC777RecipientDrainingGas.json +839 -839
  27. package/build/contracts/ERC777RecipientReverting.json +839 -839
  28. package/build/contracts/EnumerableSet.json +5 -5
  29. package/build/contracts/EventsEmitter.json +47 -47
  30. package/build/contracts/ExclusiveInflowTestApp.json +2107 -1917
  31. package/build/contracts/FixedSizeData.json +213 -213
  32. package/build/contracts/FlowExchangeTestApp.json +2107 -1917
  33. package/build/contracts/FlowOperatorDefinitions.json +5 -5
  34. package/build/contracts/FullUpgradableSuperTokenProxy.json +226 -312
  35. package/build/contracts/IAccessControl.json +3 -3
  36. package/build/contracts/IAccessControlEnumerable.json +3 -3
  37. package/build/contracts/IConstantFlowAgreementV1.json +451 -444
  38. package/build/contracts/IDAv1Library.json +5 -5
  39. package/build/contracts/IERC165.json +3 -3
  40. package/build/contracts/IERC1820Implementer.json +3 -3
  41. package/build/contracts/IERC1820Registry.json +3 -3
  42. package/build/contracts/IERC20.json +3 -3
  43. package/build/contracts/IERC20Metadata.json +3 -3
  44. package/build/contracts/IERC777.json +3 -3
  45. package/build/contracts/IERC777Recipient.json +3 -3
  46. package/build/contracts/IERC777Sender.json +3 -3
  47. package/build/contracts/IInstantDistributionAgreementV1.json +570 -559
  48. package/build/contracts/IMaticBridgedNativeSuperToken.json +71 -32
  49. package/build/contracts/IMaticBridgedNativeSuperTokenCustom.json +3 -3
  50. package/build/contracts/IMultiSigWallet.json +3 -3
  51. package/build/contracts/IPureSuperToken.json +71 -32
  52. package/build/contracts/IPureSuperTokenCustom.json +3 -3
  53. package/build/contracts/IRelayRecipient.json +3 -3
  54. package/build/contracts/IResolver.json +3 -3
  55. package/build/contracts/ISETH.json +71 -32
  56. package/build/contracts/ISETHCustom.json +3 -3
  57. package/build/contracts/ISuperAgreement.json +3 -3
  58. package/build/contracts/ISuperApp.json +179 -173
  59. package/build/contracts/ISuperToken.json +522 -483
  60. package/build/contracts/ISuperTokenFactory.json +3 -3
  61. package/build/contracts/ISuperfluid.json +633 -628
  62. package/build/contracts/ISuperfluidGovernance.json +134 -133
  63. package/build/contracts/ISuperfluidToken.json +403 -394
  64. package/build/contracts/ITOGAv1.json +1211 -1211
  65. package/build/contracts/ITOGAv2.json +1211 -1211
  66. package/build/contracts/Initializable.json +3 -3
  67. package/build/contracts/InstantDistributionAgreementV1.json +10 -10
  68. package/build/contracts/MaticBridgedNativeSuperTokenProxy.json +194 -194
  69. package/build/contracts/NonClosableOutflowTestApp.json +2107 -1917
  70. package/build/contracts/Ownable.json +3 -3
  71. package/build/contracts/Pausable.json +3 -3
  72. package/build/contracts/Proxy.json +3 -3
  73. package/build/contracts/PureSuperToken.json +91 -91
  74. package/build/contracts/Resolver.json +96 -96
  75. package/build/contracts/SETHProxy.json +199 -199
  76. package/build/contracts/SafeCast.json +5 -5
  77. package/build/contracts/SafeERC20.json +5 -5
  78. package/build/contracts/SafeMath.json +5 -5
  79. package/build/contracts/SelfDeletingFlowTestApp.json +2107 -1917
  80. package/build/contracts/SlotsBitmapLibrary.json +7 -7
  81. package/build/contracts/Strings.json +5 -5
  82. package/build/contracts/SuperAppBase.json +3 -3
  83. package/build/contracts/SuperAppDefinitions.json +5 -5
  84. package/build/contracts/SuperToken.json +2262 -2262
  85. package/build/contracts/SuperTokenFactory.json +582 -582
  86. package/build/contracts/SuperTokenFactoryBase.json +576 -576
  87. package/build/contracts/SuperTokenFactoryHelper.json +578 -578
  88. package/build/contracts/SuperUpgrader.json +687 -687
  89. package/build/contracts/Superfluid.json +6648 -6678
  90. package/build/contracts/SuperfluidFrameworkDeployer.json +526 -526
  91. package/build/contracts/SuperfluidGovernanceBase.json +13 -13
  92. package/build/contracts/SuperfluidGovernanceConfigs.json +5 -5
  93. package/build/contracts/SuperfluidGovernanceII.json +21 -21
  94. package/build/contracts/SuperfluidGovernanceIIProxy.json +20 -20
  95. package/build/contracts/SuperfluidLoader.json +147 -147
  96. package/build/contracts/SuperfluidToken.json +1269 -1269
  97. package/build/contracts/TOGA.json +1221 -1221
  98. package/build/contracts/TestGovernance.json +315 -315
  99. package/build/contracts/TestToken.json +475 -561
  100. package/build/contracts/TokenCustodian.json +220 -220
  101. package/build/contracts/TokenInfo.json +3 -3
  102. package/build/contracts/UUPSProxiable.json +136 -136
  103. package/build/contracts/UUPSProxy.json +87 -87
  104. package/build/contracts/UUPSUtils.json +43 -43
  105. package/build/contracts-sizes.txt +6 -6
  106. package/contracts/agreements/AgreementBase.sol +1 -1
  107. package/contracts/agreements/AgreementLibrary.sol +1 -1
  108. package/contracts/agreements/ConstantFlowAgreementV1.sol +1 -1
  109. package/contracts/agreements/InstantDistributionAgreementV1.sol +1 -1
  110. package/contracts/gov/SuperfluidGovernanceBase.sol +1 -1
  111. package/contracts/gov/SuperfluidGovernanceII.sol +1 -1
  112. package/contracts/interfaces/agreements/IConstantFlowAgreementV1.sol +7 -10
  113. package/contracts/interfaces/agreements/IInstantDistributionAgreementV1.sol +11 -18
  114. package/contracts/interfaces/superfluid/ISuperApp.sol +7 -9
  115. package/contracts/interfaces/superfluid/ISuperToken.sol +36 -44
  116. package/contracts/interfaces/superfluid/ISuperfluid.sol +17 -21
  117. package/contracts/interfaces/superfluid/ISuperfluidGovernance.sol +1 -1
  118. package/contracts/interfaces/superfluid/ISuperfluidToken.sol +13 -14
  119. package/contracts/libs/BaseRelayRecipient.sol +1 -1
  120. package/contracts/libs/CallUtils.sol +1 -1
  121. package/contracts/libs/ERC1820RegistryCompiled.sol +1 -1
  122. package/contracts/libs/ERC777Helper.sol +1 -1
  123. package/contracts/libs/EventsEmitter.sol +2 -2
  124. package/contracts/libs/FixedSizeData.sol +2 -2
  125. package/contracts/libs/SlotsBitmapLibrary.sol +1 -1
  126. package/contracts/mocks/AgreementMock.sol +1 -1
  127. package/contracts/mocks/CFAAppMocks.sol +6 -6
  128. package/contracts/mocks/CFALibraryMock.sol +2 -2
  129. package/contracts/mocks/CallUtilsMock.sol +1 -1
  130. package/contracts/mocks/CallUtilsTester.sol +1 -1
  131. package/contracts/mocks/CustomSuperTokenMock.sol +1 -1
  132. package/contracts/mocks/ERC777SenderRecipientMock.sol +1 -1
  133. package/contracts/mocks/FakeSuperfluidMock.sol +1 -1
  134. package/contracts/mocks/ForwarderMock.sol +1 -1
  135. package/contracts/mocks/IDASuperAppTester.sol +2 -2
  136. package/contracts/mocks/IDAv1LibraryMock.sol +3 -3
  137. package/contracts/mocks/MockSmartWallet.sol +1 -1
  138. package/contracts/mocks/MultiFlowTesterApp.sol +2 -2
  139. package/contracts/mocks/SuperAppMocks.sol +15 -12
  140. package/contracts/mocks/SuperTokenFactoryMock.sol +1 -1
  141. package/contracts/mocks/SuperTokenMock.sol +1 -1
  142. package/contracts/mocks/SuperfluidDestructorMock.sol +1 -1
  143. package/contracts/mocks/SuperfluidGovernanceIIMock.sol +1 -1
  144. package/contracts/mocks/SuperfluidMock.sol +2 -2
  145. package/contracts/mocks/UUPSProxiableMock.sol +1 -1
  146. package/contracts/superfluid/FullUpgradableSuperTokenProxy.sol +2 -2
  147. package/contracts/superfluid/SuperToken.sol +1 -1
  148. package/contracts/superfluid/SuperTokenFactory.sol +1 -1
  149. package/contracts/superfluid/Superfluid.sol +4 -4
  150. package/contracts/superfluid/SuperfluidToken.sol +1 -1
  151. package/contracts/tokens/MaticBridgedNativeSuperToken.sol +1 -1
  152. package/contracts/tokens/PureSuperToken.sol +1 -1
  153. package/contracts/tokens/SETH.sol +1 -1
  154. package/contracts/upgradability/UUPSProxiable.sol +1 -1
  155. package/contracts/upgradability/UUPSProxy.sol +1 -1
  156. package/contracts/upgradability/UUPSUtils.sol +1 -1
  157. package/contracts/utils/BatchLiquidator.sol +1 -1
  158. package/contracts/utils/Resolver.sol +1 -1
  159. package/contracts/utils/SuperUpgrader.sol +6 -6
  160. package/contracts/utils/SuperfluidLoader.sol +1 -1
  161. package/contracts/utils/TOGA.sol +1 -1
  162. package/contracts/utils/TestGovernance.sol +2 -2
  163. package/contracts/utils/TestToken.sol +2 -2
  164. package/contracts/utils/TokenCustodian.sol +1 -1
  165. package/package.json +5 -3
  166. package/scripts/deploy-framework.js +5 -5
  167. package/scripts/deploy-super-token.js +13 -4
  168. package/scripts/gov-create-new-app-registration-key.js +2 -1
  169. package/scripts/gov-create-new-factory-registration.js +1 -1
  170. package/scripts/libs/getConfig.js +21 -3
  171. package/scripts/resolver-list-super-token.js +1 -0
@@ -47,9 +47,9 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
47
47
  * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
48
48
  * called.
49
49
  *
50
- * NOTE: SuperToken always uses 18 decimals.
50
+ * @custom:note SuperToken always uses 18 decimals.
51
51
  *
52
- * Note: This information is only used for _display_ purposes: it in
52
+ * This information is only used for _display_ purposes: it in
53
53
  * no way affects any of the arithmetic of the contract, including
54
54
  * {IERC20-balanceOf} and {IERC20-transfer}.
55
55
  */
@@ -78,7 +78,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
78
78
  *
79
79
  * @return Returns Success a boolean value indicating whether the operation succeeded.
80
80
  *
81
- * Emits a {Transfer} event.
81
+ * @custom:emits a {Transfer} event.
82
82
  */
83
83
  function transfer(address recipient, uint256 amount) external override(IERC20) returns (bool);
84
84
 
@@ -87,7 +87,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
87
87
  * allowed to spend on behalf of `owner` through {transferFrom}. This is
88
88
  * zero by default.
89
89
  *
90
- * This value changes when {approve} or {transferFrom} are called.
90
+ * @notice This value changes when {approve} or {transferFrom} are called.
91
91
  */
92
92
  function allowance(address owner, address spender) external override(IERC20) view returns (uint256);
93
93
 
@@ -96,14 +96,14 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
96
96
  *
97
97
  * @return Returns Success a boolean value indicating whether the operation succeeded.
98
98
  *
99
- * IMPORTANT: Beware that changing an allowance with this method brings the risk
99
+ * @custom:note Beware that changing an allowance with this method brings the risk
100
100
  * that someone may use both the old and the new allowance by unfortunate
101
101
  * transaction ordering. One possible solution to mitigate this race
102
102
  * condition is to first reduce the spender's allowance to 0 and set the
103
103
  * desired value afterwards:
104
104
  * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
105
105
  *
106
- * Emits an {Approval} event.
106
+ * @custom:emits an {Approval} event.
107
107
  */
108
108
  function approve(address spender, uint256 amount) external override(IERC20) returns (bool);
109
109
 
@@ -114,7 +114,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
114
114
  *
115
115
  * @return Returns Success a boolean value indicating whether the operation succeeded.
116
116
  *
117
- * Emits a {Transfer} event.
117
+ * @custom:emits a {Transfer} event.
118
118
  */
119
119
  function transferFrom(address sender, address recipient, uint256 amount) external override(IERC20) returns (bool);
120
120
 
@@ -124,10 +124,9 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
124
124
  * This is an alternative to {approve} that can be used as a mitigation for
125
125
  * problems described in {IERC20-approve}.
126
126
  *
127
- * Emits an {Approval} event indicating the updated allowance.
128
- *
129
- * Requirements:
127
+ * @custom:emits an {Approval} event indicating the updated allowance.
130
128
  *
129
+ * @custom:requirements
131
130
  * - `spender` cannot be the zero address.
132
131
  */
133
132
  function increaseAllowance(address spender, uint256 addedValue) external returns (bool);
@@ -138,10 +137,9 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
138
137
  * This is an alternative to {approve} that can be used as a mitigation for
139
138
  * problems described in {IERC20-approve}.
140
139
  *
141
- * Emits an {Approval} event indicating the updated allowance.
142
- *
143
- * Requirements:
140
+ * @custom:emits an {Approval} event indicating the updated allowance.
144
141
  *
142
+ * @custom:requirements
145
143
  * - `spender` cannot be the zero address.
146
144
  * - `spender` must have allowance for the caller of at least
147
145
  * `subtractedValue`.
@@ -157,7 +155,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
157
155
  * means all token operations (creation, movement and destruction) must have
158
156
  * amounts that are a multiple of this number.
159
157
  *
160
- * For super token contracts, this value is 1 always
158
+ * @custom:note For super token contracts, this value is always 1
161
159
  */
162
160
  function granularity() external view override(IERC777) returns (uint256);
163
161
 
@@ -168,10 +166,9 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
168
166
  * the corresponding functions will be called with `data` and empty
169
167
  * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.
170
168
  *
171
- * Emits a {Sent} event.
172
- *
173
- * Requirements
169
+ * @custom:emits a {Sent} event.
174
170
  *
171
+ * @custom:requirements
175
172
  * - the caller must have at least `amount` tokens.
176
173
  * - `recipient` cannot be the zero address.
177
174
  * - if `recipient` is a contract, it must implement the {IERC777Recipient}
@@ -186,10 +183,9 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
186
183
  * If a send hook is registered for the caller, the corresponding function
187
184
  * will be called with `data` and empty `operatorData`. See {IERC777Sender}.
188
185
  *
189
- * Emits a {Burned} event.
190
- *
191
- * Requirements
186
+ * @custom:emits a {Burned} event.
192
187
  *
188
+ * @custom:requirements
193
189
  * - the caller must have at least `amount` tokens.
194
190
  */
195
191
  function burn(uint256 amount, bytes calldata data) external override(IERC777);
@@ -208,10 +204,9 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
208
204
  *
209
205
  * See {isOperatorFor}.
210
206
  *
211
- * Emits an {AuthorizedOperator} event.
212
- *
213
- * Requirements
207
+ * @custom:emits an {AuthorizedOperator} event.
214
208
  *
209
+ * @custom:requirements
215
210
  * - `operator` cannot be calling address.
216
211
  */
217
212
  function authorizeOperator(address operator) external override(IERC777);
@@ -221,10 +216,9 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
221
216
  *
222
217
  * See {isOperatorFor} and {defaultOperators}.
223
218
  *
224
- * Emits a {RevokedOperator} event.
225
- *
226
- * Requirements
219
+ * @custom:emits a {RevokedOperator} event.
227
220
  *
221
+ * @custom:requirements
228
222
  * - `operator` cannot be calling address.
229
223
  */
230
224
  function revokeOperator(address operator) external override(IERC777);
@@ -247,10 +241,9 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
247
241
  * the corresponding functions will be called with `data` and
248
242
  * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.
249
243
  *
250
- * Emits a {Sent} event.
251
- *
252
- * Requirements
244
+ * @custom:emits a {Sent} event.
253
245
  *
246
+ * @custom:requirements
254
247
  * - `sender` cannot be the zero address.
255
248
  * - `sender` must have at least `amount` tokens.
256
249
  * - the caller must be an operator for `sender`.
@@ -273,10 +266,9 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
273
266
  * If a send hook is registered for `account`, the corresponding function
274
267
  * will be called with `data` and `operatorData`. See {IERC777Sender}.
275
268
  *
276
- * Emits a {Burned} event.
277
- *
278
- * Requirements
269
+ * @custom:emits a {Burned} event.
279
270
  *
271
+ * @custom:requirements
280
272
  * - `account` cannot be the zero address.
281
273
  * - `account` must have at least `amount` tokens.
282
274
  * - the caller must be an operator for `account`.
@@ -295,7 +287,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
295
287
  /**
296
288
  * @dev Mint new tokens for the account
297
289
  *
298
- * Modifiers:
290
+ * @custom:modifiers
299
291
  * - onlySelf
300
292
  */
301
293
  function selfMint(
@@ -307,7 +299,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
307
299
  /**
308
300
  * @dev Burn existing tokens for the account
309
301
  *
310
- * Modifiers:
302
+ * @custom:modifiers
311
303
  * - onlySelf
312
304
  */
313
305
  function selfBurn(
@@ -321,7 +313,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
321
313
  * If `spender` isn't the same as `sender`, checks if `spender` has allowance to
322
314
  * spend tokens of `sender`.
323
315
  *
324
- * Modifiers:
316
+ * @custom:modifiers
325
317
  * - onlySelf
326
318
  */
327
319
  function selfTransferFrom(
@@ -335,7 +327,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
335
327
  * @dev Give `spender`, `amount` allowance to spend the tokens of
336
328
  * `account`.
337
329
  *
338
- * Modifiers:
330
+ * @custom:modifiers
339
331
  * - onlySelf
340
332
  */
341
333
  function selfApproveFor(
@@ -367,8 +359,8 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
367
359
  * @dev Upgrade ERC20 to SuperToken.
368
360
  * @param amount Number of tokens to be upgraded (in 18 decimals)
369
361
  *
370
- * NOTE: It will use ´transferFrom´ to get tokens. Before calling this
371
- * function you should ´approve´ this contract
362
+ * @custom:note It will use `transferFrom` to get tokens. Before calling this
363
+ * function you should `approve` this contract
372
364
  */
373
365
  function upgrade(uint256 amount) external;
374
366
 
@@ -378,8 +370,8 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
378
370
  * @param amount Number of tokens to be upgraded (in 18 decimals)
379
371
  * @param data User data for the TokensRecipient callback
380
372
  *
381
- * NOTE: It will use ´transferFrom´ to get tokens. Before calling this
382
- * function you should ´approve´ this contract
373
+ * @custom:note It will use `transferFrom` to get tokens. Before calling this
374
+ * function you should `approve` this contract
383
375
  */
384
376
  function upgradeTo(address to, uint256 amount, bytes calldata data) external;
385
377
 
@@ -420,7 +412,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
420
412
  * @param spender The spender of account owner's funds.
421
413
  * @param amount Number of tokens to be approved.
422
414
  *
423
- * Modifiers:
415
+ * @custom:modifiers
424
416
  * - onlyHost
425
417
  */
426
418
  function operationApprove(
@@ -436,7 +428,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
436
428
  * @param recipient The recipient of thefunds.
437
429
  * @param amount Number of tokens to be transferred.
438
430
  *
439
- * Modifiers:
431
+ * @custom:modifiers
440
432
  * - onlyHost
441
433
  */
442
434
  function operationTransferFrom(
@@ -451,7 +443,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
451
443
  * @param account The account to be changed.
452
444
  * @param amount Number of tokens to be upgraded (in 18 decimals)
453
445
  *
454
- * Modifiers:
446
+ * @custom:modifiers
455
447
  * - onlyHost
456
448
  */
457
449
  function operationUpgrade(address account, uint256 amount) external;
@@ -461,7 +453,7 @@ interface ISuperToken is ISuperfluidToken, TokenInfo, IERC20, IERC777 {
461
453
  * @param account The account to be changed.
462
454
  * @param amount Number of tokens to be downgraded (in 18 decimals)
463
455
  *
464
- * Modifiers:
456
+ * @custom:modifiers
465
457
  * - onlyHost
466
458
  */
467
459
  function operationDowngrade(address account, uint256 amount) external;
@@ -21,8 +21,7 @@ import { IERC777 } from "@openzeppelin/contracts/token/ERC777/IERC777.sol";
21
21
  /**
22
22
  * @title Host interface
23
23
  * @author Superfluid
24
- * NOTE:
25
- * This is the central contract of the system where super agreement, super app
24
+ * @notice This is the central contract of the system where super agreement, super app
26
25
  * and super token features are connected.
27
26
  *
28
27
  * The Superfluid host contract is also the entry point for the protocol users,
@@ -70,8 +69,8 @@ interface ISuperfluid {
70
69
  * @dev Register a new agreement class to the system
71
70
  * @param agreementClassLogic Initial agreement class code
72
71
  *
73
- * Modifiers:
74
- * - onlyGovernance
72
+ * @custom:modifiers
73
+ * - onlyGovernance
75
74
  */
76
75
  function registerAgreementClass(ISuperAgreement agreementClassLogic) external;
77
76
  /**
@@ -86,7 +85,7 @@ interface ISuperfluid {
86
85
  * @dev Update code of an agreement class
87
86
  * @param agreementClassLogic New code for the agreement class
88
87
  *
89
- * Modifiers:
88
+ * @custom:modifiers
90
89
  * - onlyGovernance
91
90
  */
92
91
  function updateAgreementClass(ISuperAgreement agreementClassLogic) external;
@@ -199,21 +198,18 @@ interface ISuperfluid {
199
198
 
200
199
  /**
201
200
  * @dev Message sender declares itself as a super app.
202
- * @param configWord The super app manifest configuration, flags are defined in
203
- * `SuperAppDefinitions`
204
- * @param registrationKey The registration key issued by the governance, needed to
205
- * register on a mainnet.
206
- * See https://github.com/superfluid-finance/protocol-monorepo/wiki/Super-App-White-listing-Guide
201
+ * @param configWord The super app manifest configuration, flags are defined in `SuperAppDefinitions`
202
+ * @param registrationKey The registration key issued by the governance, needed to register on a mainnet.
203
+ * @notice See https://github.com/superfluid-finance/protocol-monorepo/wiki/Super-App-White-listing-Guide
207
204
  * On testnets or in dev environment, a placeholder (e.g. empty string) can be used.
208
- * @notice While the message sender must be the super app itself, the transaction sender (tx.origin)
205
+ * While the message sender must be the super app itself, the transaction sender (tx.origin)
209
206
  * must be the deployer account the registration key was issued for.
210
207
  */
211
208
  function registerAppWithKey(uint256 configWord, string calldata registrationKey) external;
212
209
 
213
210
  /**
214
211
  * @dev Message sender (must be a contract) declares app as a super app
215
- * @param configWord The super app manifest configuration, flags are defined in
216
- * `SuperAppDefinitions`
212
+ * @param configWord The super app manifest configuration, flags are defined in `SuperAppDefinitions`
217
213
  * @notice On mainnet deployments, only factory contracts pre-authorized by governance can use this.
218
214
  * See https://github.com/superfluid-finance/protocol-monorepo/wiki/Super-App-White-listing-Guide
219
215
  */
@@ -303,7 +299,7 @@ interface ISuperfluid {
303
299
  * @param callData The call data sending to the super app.
304
300
  * @param isTermination Is it a termination callback?
305
301
  * @param ctx Current ctx, it will be validated.
306
- * @return newCtx
302
+ * @return newCtx The current context of the transaction.
307
303
  */
308
304
  function callAppAfterCallback(
309
305
  ISuperApp app,
@@ -322,7 +318,7 @@ interface ISuperfluid {
322
318
  * @param app The super app.
323
319
  * @param appAllowanceGranted App allowance granted so far.
324
320
  * @param appAllowanceUsed App allowance used so far.
325
- * @return newCtx
321
+ * @return newCtx The current context of the transaction.
326
322
  */
327
323
  function appCallbackPush(
328
324
  bytes calldata ctx,
@@ -340,9 +336,9 @@ interface ISuperfluid {
340
336
  * @dev (For agreements) Pop from the current app callback stack
341
337
  * @param ctx The ctx that was pushed before the callback stack.
342
338
  * @param appAllowanceUsedDelta App allowance used by the app.
343
- * @return newCtx
339
+ * @return newCtx The current context of the transaction.
344
340
  *
345
- * [SECURITY] NOTE:
341
+ * @custom:security
346
342
  * - Here we cannot do assertValidCtx(ctx), since we do not really save the stack in memory.
347
343
  * - Hence there is still implicit trust that the agreement handles the callback push/pop pair correctly.
348
344
  */
@@ -359,7 +355,7 @@ interface ISuperfluid {
359
355
  * @param ctx The current ctx, it will be validated.
360
356
  * @param appAllowanceWantedMore See app allowance for more details.
361
357
  * @param appAllowanceUsedDelta See app allowance for more details.
362
- * @return newCtx
358
+ * @return newCtx The current context of the transaction.
363
359
  */
364
360
  function ctxUseAllowance(
365
361
  bytes calldata ctx,
@@ -375,7 +371,7 @@ interface ISuperfluid {
375
371
  * @dev (For agreements) Jail the app.
376
372
  * @param app The super app.
377
373
  * @param reason Jail reason code.
378
- * @return newCtx
374
+ * @return newCtx The current context of the transaction.
379
375
  */
380
376
  function jailApp(
381
377
  bytes calldata ctx,
@@ -427,7 +423,7 @@ interface ISuperfluid {
427
423
  * @dev Main use case is calling app action in a batch call via the host
428
424
  * @param callData The contextual call data
429
425
  *
430
- * NOTE: See "Contextless Call Proxies" above for more about contextual call data.
426
+ * @custom:note See "Contextless Call Proxies" above for more about contextual call data.
431
427
  */
432
428
  function callAppAction(
433
429
  ISuperApp app,
@@ -453,7 +449,7 @@ interface ISuperfluid {
453
449
  /**
454
450
  * @dev Context Struct
455
451
  *
456
- * NOTE on backward compatibility:
452
+ * @custom:note on backward compatibility:
457
453
  * - Non-dynamic fields are padded to 32bytes and packed
458
454
  * - Dynamic fields are referenced through a 32bytes offset to their "parents" field (or root)
459
455
  * - The order of the fields hence should not be rearranged in order to be backward compatible:
@@ -30,7 +30,7 @@ interface ISuperfluidGovernance {
30
30
  /**
31
31
  * @dev Update logics of the contracts
32
32
  *
33
- * NOTE:
33
+ * @custom:note
34
34
  * - Because they might have inter-dependencies, it is good to have one single function to update them all
35
35
  */
36
36
  function updateContracts(
@@ -22,7 +22,7 @@ interface ISuperfluidToken {
22
22
  /**
23
23
  * @dev Encoded liquidation type data mainly used for handling stack to deep errors
24
24
  *
25
- * Note:
25
+ * @custom:note
26
26
  * - version: 1
27
27
  * - liquidationType key:
28
28
  * - 0 = reward account receives reward (PIC period)
@@ -105,7 +105,7 @@ interface ISuperfluidToken {
105
105
  * @dev An account is insolvent when the sum of deposits for a token can't cover the negative availableBalance
106
106
  * @param account The account to check
107
107
  * @param timestamp The time we'd like to check if the account is solvent (should use future)
108
- * @return isSolvent
108
+ * @return isSolvent True if the account is solvent, false otherwise
109
109
  */
110
110
  function isAccountSolvent(
111
111
  address account,
@@ -118,7 +118,7 @@ interface ISuperfluidToken {
118
118
  * @notice Check if account is solvent now
119
119
  * @dev An account is insolvent when the sum of deposits for a token can't cover the negative availableBalance
120
120
  * @param account The account to check
121
- * @return isSolvent
121
+ * @return isSolvent True if the account is solvent, false otherwise
122
122
  */
123
123
  function isAccountSolventNow(
124
124
  address account
@@ -222,7 +222,7 @@ interface ISuperfluidToken {
222
222
  * @dev Update agreement state slot
223
223
  * @param account Account to be updated
224
224
  *
225
- * NOTE
225
+ * @custom:note
226
226
  * - To clear the storage out, provide zero-ed array of intended length
227
227
  */
228
228
  function updateAgreementStateSlot(
@@ -265,7 +265,7 @@ interface ISuperfluidToken {
265
265
  * @param account Account to query.
266
266
  * @param delta Amount of balance delta to be settled
267
267
  *
268
- * Modifiers:
268
+ * @custom:modifiers
269
269
  * - onlyAgreement
270
270
  */
271
271
  function settleBalance(
@@ -284,6 +284,7 @@ interface ISuperfluidToken {
284
284
  * @param rewardAmount The amount the rewarded account will receive
285
285
  * @param targetAccountBalanceDelta The delta amount the target account balance should change by
286
286
  *
287
+ * @custom:note
287
288
  * - If a bailout is required (bailoutAmount > 0)
288
289
  * - the actual reward (single deposit) goes to the executor,
289
290
  * - while the reward account becomes the bailout account
@@ -293,7 +294,7 @@ interface ISuperfluidToken {
293
294
  * - the targetAccount will pay the rewardAmount
294
295
  * - the liquidator (reward account in PIC period) will receive the rewardAmount
295
296
  *
296
- * Modifiers:
297
+ * @custom:modifiers
297
298
  * - onlyAgreement
298
299
  */
299
300
  function makeLiquidationPayoutsV2
@@ -317,7 +318,7 @@ interface ISuperfluidToken {
317
318
  * @param targetAccountBalanceDelta The amount the sender account balance should change by
318
319
  * @param liquidationTypeData The encoded liquidation type data including the version (how to decode)
319
320
  *
320
- * NOTE:
321
+ * @custom:note
321
322
  * Reward account rule:
322
323
  * - if the agreement is liquidated during the PIC period
323
324
  * - the rewardAmountReceiver will get the rewardAmount (remaining deposit), regardless of the liquidatorAccount
@@ -368,9 +369,7 @@ interface ISuperfluidToken {
368
369
  * @param rewardAccount Account that collect the reward
369
370
  * @param rewardAmount Amount of liquidation reward
370
371
  *
371
- * NOTE:
372
- *
373
- * [DEPRECATED] Use AgreementLiquidatedV2 instead
372
+ * @custom:deprecated Use AgreementLiquidatedV2 instead
374
373
  */
375
374
  event AgreementLiquidated(
376
375
  address indexed agreementClass,
@@ -385,9 +384,7 @@ interface ISuperfluidToken {
385
384
  * @param bailoutAccount Account that bailout the penalty account
386
385
  * @param bailoutAmount Amount of account bailout
387
386
  *
388
- * NOTE:
389
- *
390
- * [DEPRECATED] Use AgreementLiquidatedV2 instead
387
+ * @custom:deprecated Use AgreementLiquidatedV2 instead
391
388
  */
392
389
  event Bailout(
393
390
  address indexed bailoutAccount,
@@ -404,7 +401,9 @@ interface ISuperfluidToken {
404
401
  * @param rewardAmount Amount of liquidation reward
405
402
  * @param bailoutAmount Amount of liquidation bailouot
406
403
  *
407
- * NOTE:
404
+ * @custom:deprecated Use AgreementLiquidatedV2 instead
405
+ *
406
+ * @custom:note
408
407
  * Reward account rule:
409
408
  * - if bailout is equal to 0, then
410
409
  * - the bondAccount will get the rewardAmount,
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  import "../interfaces/utils/IRelayRecipient.sol";
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  /**
5
5
  * @title Call utilities library that is absent from the OpenZeppelin
@@ -1,7 +1,7 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
2
  // solhint-disable const-name-snakecase
3
3
  // solhint-disable max-line-length
4
- pragma solidity 0.8.13;
4
+ pragma solidity 0.8.14;
5
5
 
6
6
  /// @dev This is meant to be used by test framework to get the raw bytecode without compiling the origin contract
7
7
  library ERC1820RegistryCompiled {
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  import { IERC1820Registry } from "@openzeppelin/contracts/utils/introspection/IERC1820Registry.sol";
5
5
 
@@ -1,11 +1,11 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  /**
5
5
  * @title Events Emitter Library
6
6
  * @author Superfluid
7
7
  * @dev A library used for emitting missing and unaccessable events.
8
- *
8
+ *
9
9
  */
10
10
  library EventsEmitter {
11
11
  event Transfer(address indexed from, address indexed to, uint256 value);
@@ -1,10 +1,10 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  /**
5
5
  * @title Utilities for fixed size data in storage
6
6
  * @author Superfluid
7
- *
7
+ *
8
8
  * When using solidity dynamic array, first word is used to store the length
9
9
  * of the array. For use cases that the length doesn't change, it is better
10
10
  * to use a fixed size data premitive.
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  import {ISuperfluidToken} from "../interfaces/superfluid/ISuperfluidToken.sol";
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol";
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  import {
5
5
  ISuperfluid,
@@ -36,7 +36,7 @@ contract ExclusiveInflowTestApp is SuperAppBase {
36
36
  // | SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP
37
37
  ;
38
38
 
39
- _host.registerApp(configWord);
39
+ _host.registerAppWithKey(configWord, "");
40
40
  }
41
41
 
42
42
  function afterAgreementCreated(
@@ -121,7 +121,7 @@ contract NonClosableOutflowTestApp is SuperAppBase {
121
121
  // | SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP
122
122
  ;
123
123
 
124
- _host.registerApp(configWord);
124
+ _host.registerAppWithKey(configWord, "");
125
125
  }
126
126
 
127
127
  function setupOutflow(
@@ -210,7 +210,7 @@ contract SelfDeletingFlowTestApp is SuperAppBase {
210
210
  | SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP
211
211
  ;
212
212
 
213
- _host.registerApp(configWord);
213
+ _host.registerAppWithKey(configWord, "");
214
214
  }
215
215
 
216
216
  function afterAgreementCreated(
@@ -267,7 +267,7 @@ contract ClosingOnUpdateFlowTestApp is SuperAppBase {
267
267
  | SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP
268
268
  ;
269
269
 
270
- _host.registerApp(configWord);
270
+ _host.registerAppWithKey(configWord, "");
271
271
  }
272
272
 
273
273
  function afterAgreementUpdated(
@@ -326,7 +326,7 @@ contract FlowExchangeTestApp is SuperAppBase {
326
326
  | SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP
327
327
  ;
328
328
 
329
- _host.registerApp(configWord);
329
+ _host.registerAppWithKey(configWord, "");
330
330
  }
331
331
 
332
332
  function afterAgreementCreated(
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  import {ISuperfluid, ISuperfluidToken, ISuperToken} from "../interfaces/superfluid/ISuperfluid.sol";
5
5
 
@@ -161,7 +161,7 @@ contract CFALibrarySuperAppMock is SuperAppBase {
161
161
  SuperAppDefinitions.BEFORE_AGREEMENT_TERMINATED_NOOP |
162
162
  SuperAppDefinitions.AFTER_AGREEMENT_TERMINATED_NOOP;
163
163
 
164
- host.registerApp(configWord);
164
+ host.registerAppWithKey(configWord, "");
165
165
  }
166
166
 
167
167
  function createFlow(ISuperToken token) external {
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  import { CallUtils } from "../libs/CallUtils.sol";
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  import { CallUtils } from "../libs/CallUtils.sol";
5
5
 
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  import {
5
5
  CustomSuperTokenBase,
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.13;
2
+ pragma solidity 0.8.14;
3
3
 
4
4
  import "@openzeppelin/contracts/utils/Context.sol";
5
5
  import "@openzeppelin/contracts/token/ERC20/IERC20.sol";