@superfluid-finance/ethereum-contracts 1.3.2-dev.32db5c3.0 → 1.3.2-dev.5081272.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 (111) hide show
  1. package/build/contracts/AccessControl.json +1 -1
  2. package/build/contracts/AccessControlEnumerable.json +1 -1
  3. package/build/contracts/Address.json +1 -1
  4. package/build/contracts/AgreementBase.json +9 -9
  5. package/build/contracts/AgreementLibrary.json +1 -1
  6. package/build/contracts/BaseRelayRecipient.json +112 -112
  7. package/build/contracts/BatchLiquidator.json +1043 -1043
  8. package/build/contracts/BatchOperation.json +1 -1
  9. package/build/contracts/CFAv1Forwarder.json +2042 -2042
  10. package/build/contracts/CFAv1Library.json +1 -1
  11. package/build/contracts/CallUtils.json +478 -478
  12. package/build/contracts/ClosingOnUpdateFlowTestApp.json +3618 -3618
  13. package/build/contracts/ConstantFlowAgreementV1.json +5187 -5187
  14. package/build/contracts/Context.json +1 -1
  15. package/build/contracts/ContextDefinitions.json +1 -1
  16. package/build/contracts/Create2.json +1 -1
  17. package/build/contracts/CustomSuperTokenBase.json +1 -1
  18. package/build/contracts/ERC165.json +1 -1
  19. package/build/contracts/ERC1820Implementer.json +79 -79
  20. package/build/contracts/ERC1820RegistryCompiled.json +43 -43
  21. package/build/contracts/ERC20.json +1008 -1008
  22. package/build/contracts/ERC20Burnable.json +1 -1
  23. package/build/contracts/ERC20Pausable.json +1 -1
  24. package/build/contracts/ERC20PresetMinterPauser.json +1816 -1816
  25. package/build/contracts/ERC20WithTokenInfo.json +6 -6
  26. package/build/contracts/ERC777Helper.json +660 -660
  27. package/build/contracts/ERC777RecipientDrainingGas.json +1871 -1871
  28. package/build/contracts/ERC777RecipientReverting.json +1893 -1893
  29. package/build/contracts/EnumerableSet.json +1 -1
  30. package/build/contracts/EventsEmitter.json +82 -82
  31. package/build/contracts/ExclusiveInflowTestApp.json +3646 -3646
  32. package/build/contracts/FixedSizeData.json +405 -405
  33. package/build/contracts/FlowExchangeTestApp.json +3756 -3756
  34. package/build/contracts/FlowOperatorDefinitions.json +1 -1
  35. package/build/contracts/FullUpgradableSuperTokenProxy.json +303 -303
  36. package/build/contracts/IAccessControl.json +1 -1
  37. package/build/contracts/IAccessControlEnumerable.json +1 -1
  38. package/build/contracts/IConstantFlowAgreementV1.json +1 -1
  39. package/build/contracts/IDAv1Library.json +1 -1
  40. package/build/contracts/IERC165.json +1 -1
  41. package/build/contracts/IERC1820Implementer.json +1 -1
  42. package/build/contracts/IERC1820Registry.json +1 -1
  43. package/build/contracts/IERC20.json +1 -1
  44. package/build/contracts/IERC20Metadata.json +1 -1
  45. package/build/contracts/IERC20Permit.json +1 -1
  46. package/build/contracts/IERC777.json +1 -1
  47. package/build/contracts/IERC777Recipient.json +1 -1
  48. package/build/contracts/IERC777Sender.json +1 -1
  49. package/build/contracts/IInstantDistributionAgreementV1.json +1 -1
  50. package/build/contracts/IMultiSigWallet.json +45 -45
  51. package/build/contracts/IPureSuperToken.json +63 -63
  52. package/build/contracts/IPureSuperTokenCustom.json +63 -63
  53. package/build/contracts/IRelayRecipient.json +49 -49
  54. package/build/contracts/IResolver.json +73 -73
  55. package/build/contracts/ISETH.json +73 -73
  56. package/build/contracts/ISETHCustom.json +73 -73
  57. package/build/contracts/ISuperAgreement.json +1 -1
  58. package/build/contracts/ISuperApp.json +1 -1
  59. package/build/contracts/ISuperToken.json +12 -12
  60. package/build/contracts/ISuperTokenFactory.json +1 -1
  61. package/build/contracts/ISuperfluid.json +4 -4
  62. package/build/contracts/ISuperfluidGovernance.json +1 -1
  63. package/build/contracts/ISuperfluidToken.json +1 -1
  64. package/build/contracts/ITOGAv1.json +2143 -2143
  65. package/build/contracts/ITOGAv2.json +2143 -2143
  66. package/build/contracts/Initializable.json +1 -1
  67. package/build/contracts/InstantDistributionAgreementV1.json +5442 -5442
  68. package/build/contracts/NonClosableOutflowTestApp.json +3521 -3521
  69. package/build/contracts/Ownable.json +1 -1
  70. package/build/contracts/Pausable.json +1 -1
  71. package/build/contracts/Proxy.json +1 -1
  72. package/build/contracts/PureSuperToken.json +697 -697
  73. package/build/contracts/Resolver.json +1066 -1066
  74. package/build/contracts/SETHProxy.json +666 -666
  75. package/build/contracts/SafeCast.json +1 -1
  76. package/build/contracts/SafeERC20.json +1 -1
  77. package/build/contracts/SafeMath.json +1 -1
  78. package/build/contracts/SelfDeletingFlowTestApp.json +3618 -3618
  79. package/build/contracts/SlotsBitmapLibrary.json +1754 -1754
  80. package/build/contracts/StreamRedirector.json +2989 -2989
  81. package/build/contracts/Strings.json +1 -1
  82. package/build/contracts/SuperAppBase.json +1 -1
  83. package/build/contracts/SuperAppDefinitions.json +1 -1
  84. package/build/contracts/SuperToken.json +9139 -9139
  85. package/build/contracts/SuperTokenFactory.json +2114 -2114
  86. package/build/contracts/SuperTokenFactoryBase.json +1012 -1012
  87. package/build/contracts/SuperTokenFactoryHelper.json +1116 -1116
  88. package/build/contracts/SuperUpgrader.json +2492 -2492
  89. package/build/contracts/Superfluid.json +12888 -12888
  90. package/build/contracts/SuperfluidFrameworkDeployer.json +2420 -2420
  91. package/build/contracts/SuperfluidGovernanceBase.json +20 -20
  92. package/build/contracts/SuperfluidGovernanceConfigs.json +1 -1
  93. package/build/contracts/SuperfluidGovernanceII.json +2613 -2613
  94. package/build/contracts/SuperfluidGovernanceIIProxy.json +224 -224
  95. package/build/contracts/SuperfluidLoader.json +767 -767
  96. package/build/contracts/SuperfluidToken.json +2331 -2331
  97. package/build/contracts/TOGA.json +4118 -4118
  98. package/build/contracts/TestGovernance.json +2886 -2886
  99. package/build/contracts/TestToken.json +1254 -1254
  100. package/build/contracts/TokenCustodian.json +903 -903
  101. package/build/contracts/TokenInfo.json +58 -58
  102. package/build/contracts/UUPSProxiable.json +247 -247
  103. package/build/contracts/UUPSProxy.json +257 -257
  104. package/build/contracts/UUPSUtils.json +85 -85
  105. package/package.json +2 -2
  106. package/build/contracts/IMaticBridgedNativeSuperToken.json +0 -2413
  107. package/build/contracts/IMaticBridgedNativeSuperTokenCustom.json +0 -508
  108. package/build/contracts/MaticBridgedNativeSuperTokenProxy.json +0 -5567
  109. package/contracts/interfaces/tokens/IMaticBridgedNativeSuperToken.sol +0 -29
  110. package/contracts/tokens/MaticBridgedNativeSuperToken.sol +0 -46
  111. package/scripts/deploy-matic-bridged-native-super-token.js +0 -75
@@ -1,29 +0,0 @@
1
- // SPDX-License-Identifier: AGPLv3
2
- pragma solidity >= 0.8.0;
3
-
4
- import { ISuperToken } from "../superfluid/ISuperToken.sol";
5
-
6
- /**
7
- * @title Matic Bridged Native SuperToken Custom interface
8
- * @author Superfluid
9
- * @dev Functionality specific for Matic Bridged Native Super Tokens
10
- */
11
- interface IMaticBridgedNativeSuperTokenCustom {
12
- /// @dev triggers minting of tokens to the given user, called by the child chain manager
13
- function deposit(address user, bytes calldata depositData) external;
14
-
15
- /// @dev triggers burning of tokens on the child chain and unlocking on L1
16
- function withdraw(uint256 amount) external;
17
-
18
- /// @dev governance can change the child chain manager
19
- function updateChildChainManager(address newChildChainManager) external;
20
-
21
- /// @dev emitted when the child chain manager changes
22
- event ChildChainManagerChanged(address newAddress);
23
- }
24
-
25
- /**
26
- * @dev Matic Bridged Native SuperToken full interface
27
- * @author Superfluid
28
- */
29
- interface IMaticBridgedNativeSuperToken is IMaticBridgedNativeSuperTokenCustom, ISuperToken {}
@@ -1,46 +0,0 @@
1
- // SPDX-License-Identifier: AGPLv3
2
- pragma solidity 0.8.14;
3
-
4
- import {
5
- ISuperToken,
6
- CustomSuperTokenBase
7
- }
8
- from "../interfaces/superfluid/CustomSuperTokenBase.sol";
9
- import { IMaticBridgedNativeSuperTokenCustom } from "../interfaces/tokens/IMaticBridgedNativeSuperToken.sol";
10
- import { UUPSProxy } from "../upgradability/UUPSProxy.sol";
11
-
12
- import { ISuperfluid } from "../interfaces/superfluid/ISuperfluid.sol";
13
-
14
-
15
- /**
16
- * @title Matic bridged native super token proxy contract
17
- * @author Superfluid
18
- * @dev Native SuperToken with interfaces for the Matic POS bridge to mint and burn.
19
- * @dev See https://docs.polygon.technology/docs/develop/ethereum-matic/pos/mapping-assets/
20
- */
21
- contract MaticBridgedNativeSuperTokenProxy is IMaticBridgedNativeSuperTokenCustom, CustomSuperTokenBase, UUPSProxy {
22
- address public childChainManager;
23
-
24
- constructor(address childChainManager_) {
25
- childChainManager = childChainManager_;
26
- }
27
-
28
- function deposit(address user, bytes calldata depositData) external override {
29
- require(msg.sender == childChainManager, "MBNSuperToken: no permission to deposit");
30
- uint256 amount = abi.decode(depositData, (uint256));
31
- ISuperToken(address(this)).selfMint(user, amount, new bytes(0));
32
- }
33
-
34
- function withdraw(uint256 amount) external override {
35
- ISuperToken(address(this)).selfBurn(msg.sender, amount, new bytes(0));
36
- }
37
-
38
- function updateChildChainManager(address newChildChainManager) external override {
39
- address host = ISuperToken(address(this)).getHost();
40
- address gov = address(ISuperfluid(host).getGovernance());
41
- require(msg.sender == gov, "MBNSuperToken: only governance allowed");
42
-
43
- childChainManager = newChildChainManager;
44
- emit ChildChainManagerChanged(newChildChainManager);
45
- }
46
- }
@@ -1,75 +0,0 @@
1
- const SuperfluidSDK = require("@superfluid-finance/js-sdk");
2
-
3
- const {
4
- getScriptRunnerFactory: S,
5
- extractWeb3Options,
6
- builtTruffleContractLoader,
7
- ZERO_ADDRESS,
8
- } = require("./libs/common");
9
-
10
- /**
11
- * @dev Deploy unlisted native super token to the network.
12
- * @param {Array} argv Overriding command line arguments
13
- * @param {boolean} options.isTruffle Whether the script is used within native truffle framework
14
- * @param {Web3} options.web3 Injected web3 instance
15
- * @param {Address} options.from Address to deploy contracts from
16
- * @param {boolean} options.protocolReleaseVersion Specify the protocol release version to be used
17
- *
18
- * Usage: npx truffle exec scripts/deploy-matic-bridged-native-super-token.js : {NAME} {SYMBOL} {CHILD_CHAIN_MANAGER}
19
- * CHILD_CHAIN_MANAGER is the bridge contract account calling the deposit function which mints tokens
20
- */
21
- module.exports = eval(`(${S.toString()})()`)(async function (
22
- args,
23
- options = {}
24
- ) {
25
- console.log("== Deploying unlisted Matic bridged native super token ==");
26
- let {protocolReleaseVersion} = options;
27
-
28
- if (args.length !== 3) {
29
- throw new Error("Wrong number of arguments");
30
- }
31
- const childChainManager = args.pop();
32
- const superTokenSymbol = args.pop();
33
- const superTokenName = args.pop();
34
- console.log("Super token name", superTokenName);
35
- console.log("Super token symbol", superTokenSymbol);
36
-
37
- if (!web3.utils.isAddress(childChainManager)) {
38
- throw new Error(`not a valid address: ${childChainManager}`);
39
- }
40
- console.log("Child chain manager", childChainManager);
41
-
42
- const sf = new SuperfluidSDK.Framework({
43
- ...extractWeb3Options(options),
44
- version: protocolReleaseVersion,
45
- additionalContracts: [
46
- "MaticBridgedNativeSuperTokenProxy",
47
- "IMaticBridgedNativeSuperToken",
48
- ],
49
- contractLoader: builtTruffleContractLoader,
50
- });
51
- await sf.initialize();
52
-
53
- const {MaticBridgedNativeSuperTokenProxy, IMaticBridgedNativeSuperToken} =
54
- sf.contracts;
55
-
56
- const superTokenFactory = await sf.contracts.ISuperTokenFactory.at(
57
- await sf.host.getSuperTokenFactory.call()
58
- );
59
-
60
- console.log("Deploying MaticBridgedNativeSuperTokenProxy...");
61
- const proxy = await MaticBridgedNativeSuperTokenProxy.new(
62
- childChainManager
63
- );
64
-
65
- const token = await IMaticBridgedNativeSuperToken.at(proxy.address);
66
-
67
- console.log("Invoking initializeCustomSuperToken...");
68
- await superTokenFactory.initializeCustomSuperToken(token.address);
69
-
70
- console.log("Invoking initialize...");
71
- await token.initialize(ZERO_ADDRESS, 18, superTokenName, superTokenSymbol);
72
-
73
- console.log(`Matic Bridged Native SuperToken deployed at ${token.address}`);
74
- return token.address;
75
- });