@superfluid-finance/ethereum-contracts 1.0.0-dev.ebe1896.0 → 1.0.0-dev.ed7f292.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 (126) hide show
  1. package/README.md +5 -5
  2. package/build/contracts/AccessControl.json +1 -1
  3. package/build/contracts/Address.json +1 -1
  4. package/build/contracts/AgreementBase.json +37 -37
  5. package/build/contracts/AgreementLibrary.json +227 -227
  6. package/build/contracts/BaseRelayRecipient.json +203 -203
  7. package/build/contracts/BatchLiquidator.json +592 -592
  8. package/build/contracts/BatchOperation.json +1444 -1444
  9. package/build/contracts/CallUtils.json +317 -317
  10. package/build/contracts/ClosingOnUpdateFlowTestApp.json +2664 -2664
  11. package/build/contracts/ConstantFlowAgreementV1.json +868 -868
  12. package/build/contracts/Context.json +1 -1
  13. package/build/contracts/ContextDefinitions.json +1444 -1444
  14. package/build/contracts/Create2.json +1 -1
  15. package/build/contracts/CustomSuperTokenBase.json +56 -56
  16. package/build/contracts/ERC1820Implementer.json +1 -1
  17. package/build/contracts/ERC20.json +1 -1
  18. package/build/contracts/ERC20WithTokenInfo.json +70 -70
  19. package/build/contracts/ERC777Helper.json +710 -710
  20. package/build/contracts/ERC777RecipientDrainingGas.json +1603 -1603
  21. package/build/contracts/ERC777RecipientReverting.json +1603 -1603
  22. package/build/contracts/EnumerableSet.json +1 -1
  23. package/build/contracts/ExclusiveInflowTestApp.json +2664 -2664
  24. package/build/contracts/FixedSizeData.json +399 -399
  25. package/build/contracts/FlowExchangeTestApp.json +2665 -2665
  26. package/build/contracts/FullUpgradableSuperTokenProxy.json +386 -386
  27. package/build/contracts/IConstantFlowAgreementV1.json +514 -514
  28. package/build/contracts/IERC1820Implementer.json +1 -1
  29. package/build/contracts/IERC1820Registry.json +1 -1
  30. package/build/contracts/IERC20.json +1 -1
  31. package/build/contracts/IERC777.json +1 -1
  32. package/build/contracts/IERC777Recipient.json +1 -1
  33. package/build/contracts/IERC777Sender.json +1 -1
  34. package/build/contracts/IInstantDistributionAgreementV1.json +1120 -1120
  35. package/build/contracts/IMaticBridgedNativeSuperToken.json +206 -206
  36. package/build/contracts/IMaticBridgedNativeSuperTokenCustom.json +206 -206
  37. package/build/contracts/IMultiSigWallet.json +45 -45
  38. package/build/contracts/INativeSuperToken.json +184 -184
  39. package/build/contracts/INativeSuperTokenCustom.json +184 -184
  40. package/build/contracts/IRelayRecipient.json +89 -89
  41. package/build/contracts/IResolver.json +265 -104
  42. package/build/contracts/ISETH.json +472 -472
  43. package/build/contracts/ISETHCustom.json +472 -472
  44. package/build/contracts/ISuperAgreement.json +165 -165
  45. package/build/contracts/ISuperApp.json +560 -560
  46. package/build/contracts/ISuperToken.json +1691 -1691
  47. package/build/contracts/ISuperTokenFactory.json +402 -402
  48. package/build/contracts/ISuperfluid.json +2213 -2213
  49. package/build/contracts/ISuperfluidGovernance.json +451 -432
  50. package/build/contracts/ISuperfluidToken.json +1218 -1218
  51. package/build/contracts/ITOGAv1.json +3455 -3455
  52. package/build/contracts/IWETH.json +1838 -1838
  53. package/build/contracts/Initializable.json +1 -1
  54. package/build/contracts/InstantDistributionAgreementV1.json +726 -726
  55. package/build/contracts/Int96SafeMath.json +531 -531
  56. package/build/contracts/Math.json +1 -1
  57. package/build/contracts/MaticBridgedNativeSuperTokenProxy.json +724 -724
  58. package/build/contracts/MultiFlowApp.json +3179 -3179
  59. package/build/contracts/NativeSuperTokenProxy.json +333 -333
  60. package/build/contracts/NonClosableOutflowTestApp.json +2665 -2665
  61. package/build/contracts/Ownable.json +1 -1
  62. package/build/contracts/Proxy.json +1 -1
  63. package/build/contracts/{TestResolver.json → Resolver.json} +499 -320
  64. package/build/contracts/SETHProxy.json +1843 -1843
  65. package/build/contracts/SETHReceiveLogic.json +1843 -1843
  66. package/build/contracts/SafeCast.json +1 -1
  67. package/build/contracts/SafeERC20.json +1 -1
  68. package/build/contracts/SafeMath.json +1 -1
  69. package/build/contracts/SelfDeletingFlowTestApp.json +2664 -2664
  70. package/build/contracts/SignedSafeMath.json +1 -1
  71. package/build/contracts/SlotsBitmapLibrary.json +38 -38
  72. package/build/contracts/Strings.json +4735 -4735
  73. package/build/contracts/SuperAppBase.json +55 -55
  74. package/build/contracts/SuperAppDefinitions.json +1444 -1444
  75. package/build/contracts/SuperToken.json +4576 -4576
  76. package/build/contracts/SuperTokenFactory.json +1244 -1244
  77. package/build/contracts/SuperTokenFactoryBase.json +1239 -1239
  78. package/build/contracts/SuperTokenFactoryHelper.json +1241 -1241
  79. package/build/contracts/SuperUpgrader.json +863 -863
  80. package/build/contracts/Superfluid.json +8793 -8793
  81. package/build/contracts/SuperfluidGovernanceBase.json +4280 -3894
  82. package/build/contracts/SuperfluidGovernanceConfigs.json +1444 -1444
  83. package/build/contracts/SuperfluidGovernanceII.json +277 -277
  84. package/build/contracts/SuperfluidGovernanceIIProxy.json +256 -256
  85. package/build/contracts/SuperfluidLoader.json +562 -562
  86. package/build/contracts/SuperfluidOwnableGovernance.json +129 -129
  87. package/build/contracts/SuperfluidToken.json +2742 -2742
  88. package/build/contracts/TOGA.json +3463 -3463
  89. package/build/contracts/TestGovernance.json +428 -428
  90. package/build/contracts/TestToken.json +540 -223
  91. package/build/contracts/TokenInfo.json +107 -107
  92. package/build/contracts/UInt128SafeMath.json +183 -183
  93. package/build/contracts/UUPSProxiable.json +390 -390
  94. package/build/contracts/UUPSProxy.json +270 -270
  95. package/build/contracts/UUPSUtils.json +143 -143
  96. package/contracts/gov/SuperfluidGovernanceBase.sol +5 -3
  97. package/contracts/interfaces/superfluid/ISuperfluidGovernance.sol +2 -2
  98. package/contracts/interfaces/{misc → ux}/IResolver.sol +2 -0
  99. package/contracts/test/TestToken.sol +3 -0
  100. package/contracts/{test/TestResolver.sol → ux/Resolver.sol} +11 -2
  101. package/contracts/ux/SuperfluidLoader.sol +1 -1
  102. package/package.json +4 -4
  103. package/scripts/deploy-erc1820.js +53 -55
  104. package/scripts/deploy-framework.js +21 -26
  105. package/scripts/deploy-matic-bridged-native-super-token.js +2 -2
  106. package/scripts/deploy-super-token.js +8 -9
  107. package/scripts/deploy-test-environment.js +13 -12
  108. package/scripts/deploy-test-token.js +10 -10
  109. package/scripts/deploy-unlisted-native-super-token.js +2 -2
  110. package/scripts/deploy-unlisted-super-token.js +1 -1
  111. package/scripts/gov-create-new-app-registration-key.js +1 -1
  112. package/scripts/gov-set-reward-address.js +1 -1
  113. package/scripts/gov-transfer-framework-ownership.js +2 -2
  114. package/scripts/gov-upgrade-super-token-logic.js +53 -38
  115. package/scripts/info-inspect-account.js +1 -1
  116. package/scripts/info-list-addresses.js +1 -1
  117. package/scripts/info-list-apps.js +1 -1
  118. package/scripts/info-print-contract-addresses.js +5 -5
  119. package/scripts/info-scan-deployments.js +3 -3
  120. package/scripts/info-show-protocol.js +22 -12
  121. package/scripts/libs/common.js +6 -6
  122. package/scripts/libs/truffleScriptRunnerFactory.js +5 -2
  123. package/scripts/resolver-list-super-token.js +3 -3
  124. package/scripts/resolver-register-token.js +8 -11
  125. package/scripts/resolver-reset-deployment.js +13 -13
  126. package/test/TestEnvironment.js +13 -20
package/README.md CHANGED
@@ -94,12 +94,12 @@ Clone a project, modify and play!
94
94
  In the example test code, you have seen how to deploy protocol contracts from JS code.
95
95
  In truffle projects, this deploy scripts can also be used on a CLI. E.g. in order to deploy to a local ganache dev chain:
96
96
  ```sh
97
- NEW_TEST_RESOLVER=1 DISABLE_NATIVE_TRUFFLE=true truffle --network ganache exec "node_modules/@superfluid-finance/ethereum-contracts/scripts/deploy-test-environment.js"
97
+ CREATE_NEW_RESOLVER=1 DISABLE_NATIVE_TRUFFLE=true truffle --network ganache exec "node_modules/@superfluid-finance/ethereum-contracts/scripts/deploy-test-environment.js"
98
98
  ```
99
99
 
100
100
  In order to deploy to another network, set the `network` argument accordingly.
101
101
 
102
- `NEW_TEST_RESOLVER=1` forces the script to deploy a new resolver even if there's one already deployed (this is the case on Ethereum testnets). That's useful because otherwise the script would try to use the pre-existing resolver and have failing transactions due to lacking permissions.
102
+ `CREATE_NEW_RESOLVER=1` forces the script to deploy a new resolver even if there's one already deployed (this is the case on Ethereum testnets). That's useful because otherwise the script would try to use the pre-existing resolver and have failing transactions due to lacking permissions.
103
103
 
104
104
  `DISABLE_NATIVE_TRUFFLE=true` tells the script to use the contract binaries bundled with the npm package.
105
105
 
@@ -108,10 +108,10 @@ After successful execution of this command, you should get something like this:
108
108
  ...
109
109
  ======== Super token deployed ========
110
110
  =============== TEST ENVIRONMENT RESOLVER ======================
111
- export TEST_RESOLVER_ADDRESS=0x43098b8d85Fe90eCE6B055e135759B558d2c0224
111
+ export RESOLVER_ADDRESS=0x43098b8d85Fe90eCE6B055e135759B558d2c0224
112
112
  ```
113
113
 
114
- Run the export command to save `TEST_RESOLVER_ADDRESS` to your local environment.
114
+ Run the export command to save `RESOLVER_ADDRESS` to your local environment.
115
115
  This allows tests/scripts running later in the same environment to find and use the contracts just deployed.
116
116
 
117
117
  ## Contributing
@@ -203,7 +203,7 @@ This will deploy the protocol contracts and a Super Token named _TEST_ (which is
203
203
  If you have set the env `TESTENV_SNAPSHOT_VARS` before, the file it's set to should now exist and look something like this:
204
204
  ```sh
205
205
  $ cat testenv.ignore.vars
206
- TEST_RESOLVER_ADDRESS=0xF12b5dd4EAD5F743C6BaA640B0216200e89B60Da
206
+ RESOLVER_ADDRESS=0xF12b5dd4EAD5F743C6BaA640B0216200e89B60Da
207
207
  TESTENV_EVM_SNAPSHOT_ID=0x1
208
208
  ```
209
209
 
@@ -7554,7 +7554,7 @@
7554
7554
  },
7555
7555
  "networks": {},
7556
7556
  "schemaVersion": "3.4.3",
7557
- "updatedAt": "2021-11-26T12:02:17.583Z",
7557
+ "updatedAt": "2021-12-09T16:40:10.020Z",
7558
7558
  "devdoc": {
7559
7559
  "details": "Contract module that allows children to implement role-based access control mechanisms. Roles are referred to by their `bytes32` identifier. These should be exposed in the external API and be unique. The best way to achieve this is by using `public constant` hash digests: ``` bytes32 public constant MY_ROLE = keccak256(\"MY_ROLE\"); ``` Roles can be used to represent a set of permissions. To restrict access to a function call, use {hasRole}: ``` function foo() public { require(hasRole(MY_ROLE, msg.sender)); ... } ``` Roles can be granted and revoked dynamically via the {grantRole} and {revokeRole} functions. Each role has an associated admin role, and only accounts that have a role's admin role can call {grantRole} and {revokeRole}. By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means that only accounts with this role will be able to grant or revoke other roles. More complex role relationships can be created by using {_setRoleAdmin}. WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to grant and revoke this role. Extra precautions should be taken to secure accounts that have been granted it.",
7560
7560
  "events": {
@@ -8088,7 +8088,7 @@
8088
8088
  },
8089
8089
  "networks": {},
8090
8090
  "schemaVersion": "3.4.3",
8091
- "updatedAt": "2021-11-26T12:02:17.611Z",
8091
+ "updatedAt": "2021-12-09T16:40:10.048Z",
8092
8092
  "devdoc": {
8093
8093
  "details": "Collection of functions related to the address type",
8094
8094
  "kind": "dev",
@@ -136,10 +136,10 @@
136
136
  3571
137
137
  ],
138
138
  "ISuperAgreement": [
139
- 11921
139
+ 11917
140
140
  ],
141
141
  "UUPSProxiable": [
142
- 29150
142
+ 29121
143
143
  ]
144
144
  },
145
145
  "id": 3572,
@@ -162,7 +162,7 @@
162
162
  "id": 3518,
163
163
  "nodeType": "ImportDirective",
164
164
  "scope": 3572,
165
- "sourceUnit": 29151,
165
+ "sourceUnit": 29122,
166
166
  "src": "59:67:22",
167
167
  "symbolAliases": [
168
168
  {
@@ -184,7 +184,7 @@
184
184
  "id": 3520,
185
185
  "nodeType": "ImportDirective",
186
186
  "scope": 3572,
187
- "sourceUnit": 11922,
187
+ "sourceUnit": 11918,
188
188
  "src": "127:79:22",
189
189
  "symbolAliases": [
190
190
  {
@@ -208,10 +208,10 @@
208
208
  "id": 3521,
209
209
  "name": "UUPSProxiable",
210
210
  "nodeType": "UserDefinedTypeName",
211
- "referencedDeclaration": 29150,
211
+ "referencedDeclaration": 29121,
212
212
  "src": "248:13:22",
213
213
  "typeDescriptions": {
214
- "typeIdentifier": "t_contract$_UUPSProxiable_$29150",
214
+ "typeIdentifier": "t_contract$_UUPSProxiable_$29121",
215
215
  "typeString": "contract UUPSProxiable"
216
216
  }
217
217
  },
@@ -224,10 +224,10 @@
224
224
  "id": 3523,
225
225
  "name": "ISuperAgreement",
226
226
  "nodeType": "UserDefinedTypeName",
227
- "referencedDeclaration": 11921,
227
+ "referencedDeclaration": 11917,
228
228
  "src": "267:15:22",
229
229
  "typeDescriptions": {
230
- "typeIdentifier": "t_contract$_ISuperAgreement_$11921",
230
+ "typeIdentifier": "t_contract$_ISuperAgreement_$11917",
231
231
  "typeString": "contract ISuperAgreement"
232
232
  }
233
233
  },
@@ -238,16 +238,16 @@
238
238
  ],
239
239
  "contractDependencies": [
240
240
  1234,
241
- 11921,
242
- 29150
241
+ 11917,
242
+ 29121
243
243
  ],
244
244
  "contractKind": "contract",
245
245
  "fullyImplemented": false,
246
246
  "id": 3571,
247
247
  "linearizedBaseContracts": [
248
248
  3571,
249
- 11921,
250
- 29150,
249
+ 11917,
250
+ 29121,
251
251
  1234
252
252
  ],
253
253
  "name": "AgreementBase",
@@ -282,7 +282,7 @@
282
282
  },
283
283
  {
284
284
  "baseFunctions": [
285
- 11898
285
+ 11894
286
286
  ],
287
287
  "body": {
288
288
  "id": 3537,
@@ -399,7 +399,7 @@
399
399
  },
400
400
  {
401
401
  "baseFunctions": [
402
- 29100
402
+ 29071
403
403
  ],
404
404
  "body": {
405
405
  "id": 3550,
@@ -437,10 +437,10 @@
437
437
  "name": "ISuperAgreement",
438
438
  "nodeType": "Identifier",
439
439
  "overloadedDeclarations": [],
440
- "referencedDeclaration": 11921,
440
+ "referencedDeclaration": 11917,
441
441
  "src": "561:15:22",
442
442
  "typeDescriptions": {
443
- "typeIdentifier": "t_type$_t_contract$_ISuperAgreement_$11921_$",
443
+ "typeIdentifier": "t_type$_t_contract$_ISuperAgreement_$11917_$",
444
444
  "typeString": "type(contract ISuperAgreement)"
445
445
  }
446
446
  },
@@ -455,7 +455,7 @@
455
455
  "src": "561:21:22",
456
456
  "tryCall": false,
457
457
  "typeDescriptions": {
458
- "typeIdentifier": "t_contract$_ISuperAgreement_$11921",
458
+ "typeIdentifier": "t_contract$_ISuperAgreement_$11917",
459
459
  "typeString": "contract ISuperAgreement"
460
460
  }
461
461
  },
@@ -466,7 +466,7 @@
466
466
  "lValueRequested": false,
467
467
  "memberName": "agreementType",
468
468
  "nodeType": "MemberAccess",
469
- "referencedDeclaration": 11904,
469
+ "referencedDeclaration": 11900,
470
470
  "src": "561:35:22",
471
471
  "typeDescriptions": {
472
472
  "typeIdentifier": "t_function_external_view$__$returns$_t_bytes32_$",
@@ -555,7 +555,7 @@
555
555
  },
556
556
  {
557
557
  "baseFunctions": [
558
- 29094
558
+ 29065
559
559
  ],
560
560
  "body": {
561
561
  "id": 3569,
@@ -709,7 +709,7 @@
709
709
  "name": "_updateCodeAddress",
710
710
  "nodeType": "Identifier",
711
711
  "overloadedDeclarations": [],
712
- "referencedDeclaration": 29143,
712
+ "referencedDeclaration": 29114,
713
713
  "src": "765:18:22",
714
714
  "typeDescriptions": {
715
715
  "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$__$",
@@ -812,10 +812,10 @@
812
812
  3571
813
813
  ],
814
814
  "ISuperAgreement": [
815
- 11921
815
+ 11917
816
816
  ],
817
817
  "UUPSProxiable": [
818
- 29150
818
+ 29121
819
819
  ]
820
820
  },
821
821
  "license": "AGPLv3"
@@ -835,7 +835,7 @@
835
835
  },
836
836
  {
837
837
  "attributes": {
838
- "SourceUnit": 29151,
838
+ "SourceUnit": 29122,
839
839
  "absolutePath": "project:/contracts/upgradability/UUPSProxiable.sol",
840
840
  "file": "../upgradability/UUPSProxiable.sol",
841
841
  "scope": 3572,
@@ -862,7 +862,7 @@
862
862
  },
863
863
  {
864
864
  "attributes": {
865
- "SourceUnit": 11922,
865
+ "SourceUnit": 11918,
866
866
  "absolutePath": "project:/contracts/interfaces/superfluid/ISuperAgreement.sol",
867
867
  "file": "../interfaces/superfluid/ISuperAgreement.sol",
868
868
  "scope": 3572,
@@ -892,15 +892,15 @@
892
892
  "abstract": true,
893
893
  "contractDependencies": [
894
894
  1234,
895
- 11921,
896
- 29150
895
+ 11917,
896
+ 29121
897
897
  ],
898
898
  "contractKind": "contract",
899
899
  "fullyImplemented": false,
900
900
  "linearizedBaseContracts": [
901
901
  3571,
902
- 11921,
903
- 29150,
902
+ 11917,
903
+ 29121,
904
904
  1234
905
905
  ],
906
906
  "name": "AgreementBase",
@@ -913,7 +913,7 @@
913
913
  {
914
914
  "attributes": {
915
915
  "name": "UUPSProxiable",
916
- "referencedDeclaration": 29150,
916
+ "referencedDeclaration": 29121,
917
917
  "type": "contract UUPSProxiable"
918
918
  },
919
919
  "id": 3521,
@@ -931,7 +931,7 @@
931
931
  {
932
932
  "attributes": {
933
933
  "name": "ISuperAgreement",
934
- "referencedDeclaration": 11921,
934
+ "referencedDeclaration": 11917,
935
935
  "type": "contract ISuperAgreement"
936
936
  },
937
937
  "id": 3523,
@@ -973,7 +973,7 @@
973
973
  {
974
974
  "attributes": {
975
975
  "baseFunctions": [
976
- 11898
976
+ 11894
977
977
  ],
978
978
  "functionSelector": "8129fc1c",
979
979
  "implemented": true,
@@ -1117,7 +1117,7 @@
1117
1117
  {
1118
1118
  "attributes": {
1119
1119
  "baseFunctions": [
1120
- 29100
1120
+ 29071
1121
1121
  ],
1122
1122
  "functionSelector": "52d1902d",
1123
1123
  "implemented": true,
@@ -1222,7 +1222,7 @@
1222
1222
  "isPure": false,
1223
1223
  "lValueRequested": false,
1224
1224
  "member_name": "agreementType",
1225
- "referencedDeclaration": 11904,
1225
+ "referencedDeclaration": 11900,
1226
1226
  "type": "function () view external returns (bytes32)"
1227
1227
  },
1228
1228
  "children": [
@@ -1252,7 +1252,7 @@
1252
1252
  "overloadedDeclarations": [
1253
1253
  null
1254
1254
  ],
1255
- "referencedDeclaration": 11921,
1255
+ "referencedDeclaration": 11917,
1256
1256
  "type": "type(contract ISuperAgreement)",
1257
1257
  "value": "ISuperAgreement"
1258
1258
  },
@@ -1306,7 +1306,7 @@
1306
1306
  {
1307
1307
  "attributes": {
1308
1308
  "baseFunctions": [
1309
- 29094
1309
+ 29065
1310
1310
  ],
1311
1311
  "functionSelector": "46951954",
1312
1312
  "implemented": true,
@@ -1536,7 +1536,7 @@
1536
1536
  "overloadedDeclarations": [
1537
1537
  null
1538
1538
  ],
1539
- "referencedDeclaration": 29143,
1539
+ "referencedDeclaration": 29114,
1540
1540
  "type": "function (address)",
1541
1541
  "value": "_updateCodeAddress"
1542
1542
  },
@@ -1593,7 +1593,7 @@
1593
1593
  },
1594
1594
  "networks": {},
1595
1595
  "schemaVersion": "3.4.3",
1596
- "updatedAt": "2021-11-26T12:02:17.625Z",
1596
+ "updatedAt": "2021-12-09T16:40:10.063Z",
1597
1597
  "devdoc": {
1598
1598
  "kind": "dev",
1599
1599
  "methods": {