@superfluid-finance/ethereum-contracts 1.2.2-dev.c9bc19b.0 → 1.2.2-dev.ec379f7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/contracts/AccessControl.json +1 -1
- package/build/contracts/AccessControlEnumerable.json +1 -1
- package/build/contracts/Address.json +1 -1
- package/build/contracts/AgreementBase.json +18 -18
- package/build/contracts/AgreementLibrary.json +450 -243
- package/build/contracts/BaseRelayRecipient.json +112 -112
- package/build/contracts/BatchLiquidator.json +178 -178
- package/build/contracts/BatchOperation.json +1138 -1138
- package/build/contracts/CFAv1Library.json +2531 -2531
- package/build/contracts/CallUtils.json +478 -478
- package/build/contracts/ClosingOnUpdateFlowTestApp.json +1521 -1521
- package/build/contracts/ConstantFlowAgreementV1.json +19314 -18334
- package/build/contracts/Context.json +1 -1
- package/build/contracts/ContextDefinitions.json +1138 -1138
- package/build/contracts/Create2.json +1 -1
- package/build/contracts/CustomSuperTokenBase.json +31 -31
- package/build/contracts/ERC165.json +1 -1
- package/build/contracts/ERC1820Implementer.json +1 -1
- package/build/contracts/ERC20.json +1 -1
- package/build/contracts/ERC20Burnable.json +1 -1
- package/build/contracts/ERC20Pausable.json +1 -1
- package/build/contracts/ERC20PresetMinterPauser.json +1 -1
- package/build/contracts/ERC20WithTokenInfo.json +36 -36
- package/build/contracts/ERC721.json +1 -1
- package/build/contracts/ERC777Helper.json +660 -660
- package/build/contracts/ERC777RecipientDrainingGas.json +855 -855
- package/build/contracts/ERC777RecipientReverting.json +855 -855
- package/build/contracts/EnumerableSet.json +1 -1
- package/build/contracts/ExclusiveInflowTestApp.json +1521 -1521
- package/build/contracts/FixedSizeData.json +405 -405
- package/build/contracts/FlowExchangeTestApp.json +1522 -1522
- package/build/contracts/FlowOperatorDefinitions.json +1138 -1138
- package/build/contracts/FullUpgradableSuperTokenProxy.json +113 -113
- package/build/contracts/IAccessControl.json +1 -1
- package/build/contracts/IAccessControlEnumerable.json +1 -1
- package/build/contracts/IConstantFlowAgreementV1.json +1036 -1036
- package/build/contracts/IDAv1Library.json +4183 -4183
- package/build/contracts/IERC165.json +1 -1
- package/build/contracts/IERC1820Implementer.json +1 -1
- package/build/contracts/IERC1820Registry.json +1 -1
- package/build/contracts/IERC20.json +1 -1
- package/build/contracts/IERC20Metadata.json +1 -1
- package/build/contracts/IERC721.json +1 -1
- package/build/contracts/IERC721Metadata.json +1 -1
- package/build/contracts/IERC721Receiver.json +1 -1
- package/build/contracts/IERC777.json +1 -1
- package/build/contracts/IERC777Recipient.json +1 -1
- package/build/contracts/IERC777Sender.json +1 -1
- package/build/contracts/IInstantDistributionAgreementV1.json +1182 -1182
- package/build/contracts/IMaticBridgedNativeSuperToken.json +110 -110
- package/build/contracts/IMaticBridgedNativeSuperTokenCustom.json +110 -110
- package/build/contracts/IMultiSigWallet.json +45 -45
- package/build/contracts/IPureSuperToken.json +69 -69
- package/build/contracts/IPureSuperTokenCustom.json +69 -69
- package/build/contracts/IRelayRecipient.json +49 -49
- package/build/contracts/IResolver.json +73 -73
- package/build/contracts/ISETH.json +79 -79
- package/build/contracts/ISETHCustom.json +79 -79
- package/build/contracts/ISuperAgreement.json +88 -88
- package/build/contracts/ISuperApp.json +351 -351
- package/build/contracts/ISuperToken.json +1008 -1008
- package/build/contracts/ISuperTokenFactory.json +280 -280
- package/build/contracts/ISuperfluid.json +1466 -1466
- package/build/contracts/ISuperfluidGovernance.json +404 -404
- package/build/contracts/ISuperfluidToken.json +774 -774
- package/build/contracts/ITOGAv1.json +1431 -1431
- package/build/contracts/ITOGAv2.json +1431 -1431
- package/build/contracts/Initializable.json +1 -1
- package/build/contracts/InstantDistributionAgreementV1.json +9343 -9343
- package/build/contracts/Int96SafeMath.json +504 -504
- package/build/contracts/MaticBridgedNativeSuperTokenProxy.json +228 -228
- package/build/contracts/NonClosableOutflowTestApp.json +1522 -1522
- package/build/contracts/Ownable.json +1 -1
- package/build/contracts/Pausable.json +1 -1
- package/build/contracts/Proxy.json +1 -1
- package/build/contracts/PureSuperToken.json +106 -106
- package/build/contracts/Resolver.json +98 -98
- package/build/contracts/SETHProxy.json +224 -224
- package/build/contracts/SafeCast.json +1 -1
- package/build/contracts/SafeERC20.json +1 -1
- package/build/contracts/SafeMath.json +1 -1
- package/build/contracts/SelfDeletingFlowTestApp.json +1521 -1521
- package/build/contracts/SlotsBitmapLibrary.json +794 -794
- package/build/contracts/Strings.json +1 -1
- package/build/contracts/SuperAppBase.json +394 -394
- package/build/contracts/SuperAppDefinitions.json +1138 -1138
- package/build/contracts/SuperToken.json +2351 -2351
- package/build/contracts/SuperTokenFactory.json +731 -731
- package/build/contracts/SuperTokenFactoryBase.json +721 -721
- package/build/contracts/SuperTokenFactoryHelper.json +724 -724
- package/build/contracts/SuperUpgrader.json +437 -437
- package/build/contracts/Superfluid.json +9812 -10169
- package/build/contracts/SuperfluidFrameworkDeployer.json +535 -535
- package/build/contracts/SuperfluidGovernanceBase.json +3471 -3789
- package/build/contracts/SuperfluidGovernanceConfigs.json +1138 -1138
- package/build/contracts/SuperfluidGovernanceII.json +2097 -2347
- package/build/contracts/SuperfluidGovernanceIIProxy.json +214 -214
- package/build/contracts/SuperfluidLoader.json +207 -207
- package/build/contracts/SuperfluidToken.json +1345 -1345
- package/build/contracts/TOGA.json +1448 -1448
- package/build/contracts/TestGovernance.json +2195 -2445
- package/build/contracts/TestToken.json +94 -94
- package/build/contracts/TokenCustodian.json +214 -214
- package/build/contracts/TokenInfo.json +58 -58
- package/build/contracts/UInt128SafeMath.json +97 -97
- package/build/contracts/UUPSProxiable.json +132 -132
- package/build/contracts/UUPSProxy.json +81 -81
- package/build/contracts/UUPSUtils.json +37 -37
- package/build/contracts-sizes.txt +3 -4
- package/contracts/agreements/AgreementLibrary.sol +1 -0
- package/contracts/agreements/ConstantFlowAgreementV1.sol +71 -35
- package/contracts/agreements/InstantDistributionAgreementV1.sol +3 -2
- package/contracts/gov/SuperfluidGovernanceBase.sol +9 -26
- package/contracts/{agreements → libs}/SlotsBitmapLibrary.sol +1 -3
- package/contracts/mocks/SuperfluidMock.sol +2 -2
- package/contracts/superfluid/Superfluid.sol +5 -10
- package/package.json +2 -1
- package/scripts/gov-create-new-app-registration-key.js +26 -3
|
@@ -6,6 +6,8 @@ const {
|
|
|
6
6
|
sendGovernanceAction,
|
|
7
7
|
} = require("./libs/common");
|
|
8
8
|
|
|
9
|
+
const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
10
|
+
|
|
9
11
|
/**
|
|
10
12
|
* @dev Create a new super app registration key.
|
|
11
13
|
* @param {Array} argv Overriding command line arguments
|
|
@@ -14,7 +16,13 @@ const {
|
|
|
14
16
|
* @param {Address} options.from Address to deploy contracts from
|
|
15
17
|
* @param {boolean} options.protocolReleaseVersion Specify the protocol release version to be used
|
|
16
18
|
*
|
|
17
|
-
*
|
|
19
|
+
* Note: the key itself doesn't have much meaning, it could be "stolen" from a broadcast tx anyway.
|
|
20
|
+
* But since it's bound to a deployer address, that doesn't really matter.
|
|
21
|
+
*
|
|
22
|
+
* Usage: npx truffle exec scripts/create-new-app-registration-key.js : {DEPLOYER} {REGISTRATION_KEY} [EXPIRATION_TS]
|
|
23
|
+
* EXPIRATION_TS is a Unix timestamp in seconds for when the key should expire.
|
|
24
|
+
* If not set, we default to 90 days in the future.
|
|
25
|
+
* Hint: you may use https://www.unixtimestamp.com/ to calculate a timestamp
|
|
18
26
|
*/
|
|
19
27
|
module.exports = eval(`(${S.toString()})({
|
|
20
28
|
doNotPrintColonArgs: true
|
|
@@ -22,9 +30,20 @@ module.exports = eval(`(${S.toString()})({
|
|
|
22
30
|
console.log("======== Creating new app registration key ========");
|
|
23
31
|
let {protocolReleaseVersion} = options;
|
|
24
32
|
|
|
25
|
-
if (args.length
|
|
33
|
+
if (args.length > 3 || args.length < 2) {
|
|
26
34
|
throw new Error("Wrong number of arguments");
|
|
27
35
|
}
|
|
36
|
+
|
|
37
|
+
let expirationTs = Math.floor(Date.now() / 1000) + 3600 * 24 * 90; // 90 days from now
|
|
38
|
+
if (args.length === 3) {
|
|
39
|
+
const expTsStr = args.pop();
|
|
40
|
+
const parsedExpTs = parseInt(expTsStr);
|
|
41
|
+
if (parsedExpTs.toString() !== expTsStr) {
|
|
42
|
+
throw new Error("EXPIRATON_TS not an integer");
|
|
43
|
+
}
|
|
44
|
+
expirationTs = parsedExpTs;
|
|
45
|
+
console.log("Expiration timestamp", expirationTs);
|
|
46
|
+
}
|
|
28
47
|
const registrationkey = args.pop();
|
|
29
48
|
const deployer = args.pop();
|
|
30
49
|
console.log("Deployer", deployer);
|
|
@@ -54,8 +73,12 @@ module.exports = eval(`(${S.toString()})({
|
|
|
54
73
|
)
|
|
55
74
|
);
|
|
56
75
|
console.log("App key", appKey);
|
|
76
|
+
console.log("Expiration date", new Date(expirationTs * 1000)); // print human readable
|
|
57
77
|
|
|
78
|
+
// Note that we are NOT using gov.whiteListNewApp here, because it doesn't support setting
|
|
79
|
+
// an expiration date and will eventually be deprecated.
|
|
80
|
+
// Instead we use the lower level setConfig directly.
|
|
58
81
|
await sendGovernanceAction(sf, (gov) =>
|
|
59
|
-
gov.
|
|
82
|
+
gov.setConfig(sf.host.address, ZERO_ADDRESS, appKey, expirationTs)
|
|
60
83
|
);
|
|
61
84
|
});
|