@superfluid-finance/ethereum-contracts 1.2.3-dev.3df6de8.0 → 1.2.3-dev.4eebafa.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 (118) 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 +10 -10
  5. package/build/contracts/AgreementLibrary.json +4 -4
  6. package/build/contracts/BaseRelayRecipient.json +1 -1
  7. package/build/contracts/BatchLiquidator.json +1385 -1242
  8. package/build/contracts/BatchOperation.json +1 -1
  9. package/build/contracts/CFAv1Library.json +3437 -3625
  10. package/build/contracts/CallUtils.json +1 -1
  11. package/build/contracts/ClosingOnUpdateFlowTestApp.json +4440 -4451
  12. package/build/contracts/ConstantFlowAgreementV1.json +5204 -5204
  13. package/build/contracts/Context.json +1 -1
  14. package/build/contracts/ContextDefinitions.json +1 -1
  15. package/build/contracts/Create2.json +1 -1
  16. package/build/contracts/CustomSuperTokenBase.json +2 -2
  17. package/build/contracts/ERC165.json +1 -1
  18. package/build/contracts/ERC1820Implementer.json +79 -79
  19. package/build/contracts/ERC1820RegistryCompiled.json +1 -1
  20. package/build/contracts/ERC20.json +1008 -1008
  21. package/build/contracts/ERC20Burnable.json +1 -1
  22. package/build/contracts/ERC20Pausable.json +1 -1
  23. package/build/contracts/ERC20PresetMinterPauser.json +1816 -1816
  24. package/build/contracts/ERC20WithTokenInfo.json +1 -1
  25. package/build/contracts/ERC777Helper.json +1 -1
  26. package/build/contracts/ERC777RecipientDrainingGas.json +1874 -1874
  27. package/build/contracts/ERC777RecipientReverting.json +1896 -1896
  28. package/build/contracts/EnumerableSet.json +1 -1
  29. package/build/contracts/EventsEmitter.json +414 -0
  30. package/build/contracts/ExclusiveInflowTestApp.json +4468 -4479
  31. package/build/contracts/FixedSizeData.json +405 -405
  32. package/build/contracts/FlowExchangeTestApp.json +4578 -4589
  33. package/build/contracts/FlowOperatorDefinitions.json +1 -1
  34. package/build/contracts/FullUpgradableSuperTokenProxy.json +319 -319
  35. package/build/contracts/IAccessControl.json +1 -1
  36. package/build/contracts/IAccessControlEnumerable.json +1 -1
  37. package/build/contracts/IConstantFlowAgreementV1.json +2 -2
  38. package/build/contracts/IDAv1Library.json +3227 -3403
  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/IERC777.json +1 -1
  45. package/build/contracts/IERC777Recipient.json +1 -1
  46. package/build/contracts/IERC777Sender.json +1 -1
  47. package/build/contracts/IInstantDistributionAgreementV1.json +2 -2
  48. package/build/contracts/IMaticBridgedNativeSuperToken.json +6 -6
  49. package/build/contracts/IMaticBridgedNativeSuperTokenCustom.json +2 -2
  50. package/build/contracts/IMultiSigWallet.json +1 -1
  51. package/build/contracts/IPureSuperToken.json +6 -6
  52. package/build/contracts/IPureSuperTokenCustom.json +2 -2
  53. package/build/contracts/IRelayRecipient.json +1 -1
  54. package/build/contracts/IResolver.json +1 -1
  55. package/build/contracts/ISETH.json +6 -6
  56. package/build/contracts/ISETHCustom.json +2 -2
  57. package/build/contracts/ISuperAgreement.json +2 -2
  58. package/build/contracts/ISuperApp.json +2 -2
  59. package/build/contracts/ISuperToken.json +6 -6
  60. package/build/contracts/ISuperTokenFactory.json +2 -2
  61. package/build/contracts/ISuperfluid.json +2 -2
  62. package/build/contracts/ISuperfluidGovernance.json +2 -2
  63. package/build/contracts/ISuperfluidToken.json +122 -122
  64. package/build/contracts/ITOGAv1.json +2689 -2739
  65. package/build/contracts/ITOGAv2.json +2689 -2739
  66. package/build/contracts/Initializable.json +1 -1
  67. package/build/contracts/InstantDistributionAgreementV1.json +5387 -5387
  68. package/build/contracts/MaticBridgedNativeSuperTokenProxy.json +971 -971
  69. package/build/contracts/NonClosableOutflowTestApp.json +4343 -4354
  70. package/build/contracts/Ownable.json +1 -1
  71. package/build/contracts/Pausable.json +1 -1
  72. package/build/contracts/Proxy.json +1 -1
  73. package/build/contracts/PureSuperToken.json +694 -694
  74. package/build/contracts/Resolver.json +1058 -1058
  75. package/build/contracts/SETHProxy.json +661 -661
  76. package/build/contracts/SafeCast.json +1 -1
  77. package/build/contracts/SafeERC20.json +1 -1
  78. package/build/contracts/SafeMath.json +1 -1
  79. package/build/contracts/SelfDeletingFlowTestApp.json +4440 -4451
  80. package/build/contracts/SlotsBitmapLibrary.json +1757 -1757
  81. package/build/contracts/Strings.json +1 -1
  82. package/build/contracts/SuperAppBase.json +2 -2
  83. package/build/contracts/SuperAppDefinitions.json +1 -1
  84. package/build/contracts/SuperToken.json +9757 -9515
  85. package/build/contracts/SuperTokenFactory.json +2074 -2074
  86. package/build/contracts/SuperTokenFactoryBase.json +989 -989
  87. package/build/contracts/SuperTokenFactoryHelper.json +1095 -1095
  88. package/build/contracts/SuperUpgrader.json +2495 -2495
  89. package/build/contracts/Superfluid.json +12978 -12978
  90. package/build/contracts/SuperfluidFrameworkDeployer.json +2042 -2042
  91. package/build/contracts/SuperfluidGovernanceBase.json +9 -9
  92. package/build/contracts/SuperfluidGovernanceConfigs.json +1 -1
  93. package/build/contracts/SuperfluidGovernanceII.json +2022 -2022
  94. package/build/contracts/SuperfluidGovernanceIIProxy.json +227 -227
  95. package/build/contracts/SuperfluidLoader.json +752 -752
  96. package/build/contracts/SuperfluidToken.json +3476 -2953
  97. package/build/contracts/TOGA.json +4681 -4731
  98. package/build/contracts/TestGovernance.json +2402 -2402
  99. package/build/contracts/TestToken.json +1267 -1267
  100. package/build/contracts/TokenCustodian.json +903 -903
  101. package/build/contracts/TokenInfo.json +1 -1
  102. package/build/contracts/UUPSProxiable.json +233 -233
  103. package/build/contracts/UUPSProxy.json +257 -257
  104. package/build/contracts/UUPSUtils.json +85 -85
  105. package/build/contracts-sizes.txt +6 -6
  106. package/contracts/apps/CFAv1Library.sol +147 -111
  107. package/contracts/apps/IDAv1Library.sol +133 -101
  108. package/contracts/interfaces/superfluid/ISuperfluidToken.sol +8 -8
  109. package/contracts/libs/EventsEmitter.sol +16 -0
  110. package/contracts/mocks/CFAAppMocks.sol +52 -36
  111. package/contracts/mocks/CustomSuperTokenMock.sol +11 -4
  112. package/contracts/mocks/IDASuperAppTester.sol +24 -18
  113. package/contracts/mocks/MultiFlowTesterApp.sol +33 -24
  114. package/contracts/mocks/SuperAppMocks.sol +54 -40
  115. package/contracts/superfluid/SuperfluidToken.sol +33 -31
  116. package/contracts/utils/BatchLiquidator.sol +15 -11
  117. package/contracts/utils/TOGA.sol +40 -30
  118. package/package.json +2 -2
@@ -177,7 +177,7 @@
177
177
  },
178
178
  "networks": {},
179
179
  "schemaVersion": "3.4.7",
180
- "updatedAt": "2022-05-27T08:56:18.668Z",
180
+ "updatedAt": "2022-06-06T10:25:55.049Z",
181
181
  "devdoc": {
182
182
  "details": "Interface of the ERC165 standard, as defined in the https://eips.ethereum.org/EIPS/eip-165[EIP]. Implementers can declare support of contract interfaces, which can then be queried by others ({ERC165Checker}). For an implementation, see {ERC165}.",
183
183
  "kind": "dev",
@@ -210,7 +210,7 @@
210
210
  },
211
211
  "networks": {},
212
212
  "schemaVersion": "3.4.7",
213
- "updatedAt": "2022-05-27T08:56:18.669Z",
213
+ "updatedAt": "2022-06-06T10:25:55.049Z",
214
214
  "devdoc": {
215
215
  "details": "Interface for an ERC1820 implementer, as defined in the https://eips.ethereum.org/EIPS/eip-1820#interface-implementation-erc1820implementerinterface[EIP]. Used by contracts that will be registered as implementers in the {IERC1820Registry}.",
216
216
  "kind": "dev",
@@ -1286,7 +1286,7 @@
1286
1286
  },
1287
1287
  "networks": {},
1288
1288
  "schemaVersion": "3.4.7",
1289
- "updatedAt": "2022-05-27T08:56:18.669Z",
1289
+ "updatedAt": "2022-06-06T10:25:55.049Z",
1290
1290
  "devdoc": {
1291
1291
  "details": "Interface of the global ERC1820 Registry, as defined in the https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register implementers for interfaces in this registry, as well as query support. Implementers may be shared by multiple accounts, and can also implement more than a single interface for each account. Contracts can implement interfaces for themselves, but externally-owned accounts (EOA) must delegate this to a contract. {IERC165} interfaces can also be queried via the registry. For an in-depth explanation and source code analysis, see the EIP text.",
1292
1292
  "kind": "dev",
@@ -1116,7 +1116,7 @@
1116
1116
  },
1117
1117
  "networks": {},
1118
1118
  "schemaVersion": "3.4.7",
1119
- "updatedAt": "2022-05-27T08:56:18.651Z",
1119
+ "updatedAt": "2022-06-06T10:25:55.032Z",
1120
1120
  "devdoc": {
1121
1121
  "details": "Interface of the ERC20 standard as defined in the EIP.",
1122
1122
  "events": {
@@ -503,7 +503,7 @@
503
503
  },
504
504
  "networks": {},
505
505
  "schemaVersion": "3.4.7",
506
- "updatedAt": "2022-05-27T08:56:18.653Z",
506
+ "updatedAt": "2022-06-06T10:25:55.034Z",
507
507
  "devdoc": {
508
508
  "details": "Interface for the optional metadata functions from the ERC20 standard. _Available since v4.1._",
509
509
  "kind": "dev",
@@ -2276,7 +2276,7 @@
2276
2276
  },
2277
2277
  "networks": {},
2278
2278
  "schemaVersion": "3.4.7",
2279
- "updatedAt": "2022-05-27T08:56:18.660Z",
2279
+ "updatedAt": "2022-06-06T10:25:55.041Z",
2280
2280
  "devdoc": {
2281
2281
  "details": "Interface of the ERC777Token standard as defined in the EIP. This contract uses the https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let token holders and recipients react to token movements by using setting implementers for the associated interfaces in said registry. See {IERC1820Registry} and {ERC1820Implementer}.",
2282
2282
  "kind": "dev",
@@ -306,7 +306,7 @@
306
306
  },
307
307
  "networks": {},
308
308
  "schemaVersion": "3.4.7",
309
- "updatedAt": "2022-05-27T08:56:18.662Z",
309
+ "updatedAt": "2022-06-06T10:25:55.042Z",
310
310
  "devdoc": {
311
311
  "details": "Interface of the ERC777TokensRecipient standard as defined in the EIP. Accounts can be notified of {IERC777} tokens being sent to them by having a contract implement this interface (contract holders can be their own implementer) and registering it on the https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. See {IERC1820Registry} and {ERC1820Implementer}.",
312
312
  "kind": "dev",
@@ -306,7 +306,7 @@
306
306
  },
307
307
  "networks": {},
308
308
  "schemaVersion": "3.4.7",
309
- "updatedAt": "2022-05-27T08:56:18.662Z",
309
+ "updatedAt": "2022-06-06T10:25:55.043Z",
310
310
  "devdoc": {
311
311
  "details": "Interface of the ERC777TokensSender standard as defined in the EIP. {IERC777} Token holders can be notified of operations performed on their tokens by having a contract implement this interface (contract holders can be their own implementer) and registering it on the https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry]. See {IERC1820Registry} and {ERC1820Implementer}.",
312
312
  "kind": "dev",
@@ -940,7 +940,7 @@
940
940
  "type": "function"
941
941
  }
942
942
  ],
943
- "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"IndexCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"IndexDistributionClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"IndexSubscribed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"units\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"IndexUnitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"IndexUnsubscribed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"oldIndexValue\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newIndexValue\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"totalUnitsPending\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"totalUnitsApproved\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"IndexUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"SubscriptionApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SubscriptionDistributionClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"SubscriptionRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"units\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"SubscriptionUnitsUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"agreementType\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"approveSubscription\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"calculateDistribution\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"newIndexValue\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"createIndex\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"deleteSubscription\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"distribute\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"}],\"name\":\"getIndex\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"exist\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"indexValue\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"totalUnitsApproved\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"totalUnitsPending\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"}],\"name\":\"getSubscription\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"exist\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"units\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"pendingDistribution\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"agreementId\",\"type\":\"bytes32\"}],\"name\":\"getSubscriptionByID\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"units\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"pendingDistribution\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"}],\"name\":\"listSubscriptions\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"publishers\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"indexIds\",\"type\":\"uint32[]\"},{\"internalType\":\"uint128[]\",\"name\":\"unitsList\",\"type\":\"uint128[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"realtimeBalanceOf\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"dynamicBalance\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"owedDeposit\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"revokeSubscription\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"uint128\",\"name\":\"indexValue\",\"type\":\"uint128\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"updateIndex\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"units\",\"type\":\"uint128\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"updateSubscription\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Superfluid Notes: - A publisher can create as many as indices as possibly identifiable with `indexId`. - `indexId` is deliberately limited to 32 bits, to avoid the chance for sha-3 collision. Despite knowing sha-3 collision is only theoretical. - A publisher can create a subscription to an index for any subscriber. - A subscription consists of: - The index it subscribes to. - Number of units subscribed. - An index consists of: - Current value as `uint128 indexValue`. - Total units of the approved subscriptions as `uint128 totalUnitsApproved`. - Total units of the non approved subscription as `uint128 totalUnitsPending`. - A publisher can update an index with a new value that doesn't decrease. - A publisher can update a subscription with any number of units. - A publisher or a subscriber can delete a subscription and reset its units to zero. - A subscriber must approve the index in order to receive distributions from the publisher each time the index is updated. - The amount distributed is $$\\\\Delta{index} * units$$ - Distributions to a non approved subscription stays in the publisher's deposit until: - the subscriber approves the subscription (side effect), - the publisher updates the subscription (side effect), - the subscriber deletes the subscription even if it is never approved (side effect), - or the subscriber can explicitly claim them.\",\"events\":{\"IndexCreated(address,address,uint32,bytes)\":{\"details\":\"Index created event\",\"params\":{\"indexId\":\"The specified indexId of the newly created index\",\"publisher\":\"Index creator and publisher\",\"token\":\"Super token address\",\"userData\":\"The user provided data\"}},\"IndexDistributionClaimed(address,address,uint32,address,uint256)\":{\"details\":\"Index distribution claimed event\",\"params\":{\"amount\":\"The pending amount claimed\",\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The subscriber units updated\",\"token\":\"Super token address\"}},\"IndexSubscribed(address,address,uint32,address,bytes)\":{\"details\":\"Index subscribed event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The approved subscriber\",\"token\":\"Super token address\",\"userData\":\"The user provided data\"}},\"IndexUnitsUpdated(address,address,uint32,address,uint128,bytes)\":{\"details\":\"Index units updated event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The subscriber units updated\",\"token\":\"Super token address\",\"units\":\"The new units amount\",\"userData\":\"The user provided data\"}},\"IndexUnsubscribed(address,address,uint32,address,bytes)\":{\"details\":\"Index unsubscribed event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The unsubscribed subscriber\",\"token\":\"Super token address\",\"userData\":\"The user provided data\"}},\"IndexUpdated(address,address,uint32,uint128,uint128,uint128,uint128,bytes)\":{\"details\":\"Index updated event\",\"params\":{\"indexId\":\"The specified indexId of the updated index\",\"newIndexValue\":\"The updated index value\",\"oldIndexValue\":\"The previous index value\",\"publisher\":\"Index updater and publisher\",\"token\":\"Super token address\",\"totalUnitsApproved\":\"The total units approved when the indexValue was updated\",\"totalUnitsPending\":\"The total units pending when the indexValue was updated\",\"userData\":\"The user provided data\"}},\"SubscriptionApproved(address,address,address,uint32,bytes)\":{\"details\":\"Subscription approved event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The approved subscriber\",\"token\":\"Super token address\",\"userData\":\"The user provided data\"}},\"SubscriptionDistributionClaimed(address,address,address,uint32,uint256)\":{\"details\":\"Subscription distribution claimed event\",\"params\":{\"amount\":\"The pending amount claimed\",\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The subscriber units updated\",\"token\":\"Super token address\"}},\"SubscriptionRevoked(address,address,address,uint32,bytes)\":{\"details\":\"Subscription approved event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The approved subscriber\",\"token\":\"Super token address\",\"userData\":\"The user provided data\"}},\"SubscriptionUnitsUpdated(address,address,address,uint32,uint128,bytes)\":{\"details\":\"Subscription units updated event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The subscriber units updated\",\"token\":\"Super token address\",\"units\":\"The new units amount\",\"userData\":\"The user provided data\"}}},\"kind\":\"dev\",\"methods\":{\"agreementType()\":{\"details\":\"ISuperAgreement.agreementType implementation\"},\"approveSubscription(address,address,uint32,bytes)\":{\"details\":\"Approve the subscription of an index\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks - if subscription exist - AgreementCreated callback to the publisher: - agreementId is for the subscription - if subscription does not exist - AgreementUpdated callback to the publisher: - agreementId is for the subscription\",\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"token\":\"Super token address\"}},\"calculateDistribution(address,address,uint32,uint256)\":{\"details\":\"Calculate actual distribution amount\",\"params\":{\"amount\":\"The amount of tokens desired to be distributed\",\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"token\":\"Super token address\"},\"returns\":{\"actualAmount\":\"The amount to be distributed after ensuring no rounding errors\",\"newIndexValue\":\"The index value given the desired amount of tokens to be distributed\"}},\"claim(address,address,uint32,address,bytes)\":{\"details\":\"Claim pending distributions\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) The subscription should not be approved yet # App callbacks - AgreementUpdated callback to the publisher: - agreementId is for the subscription\",\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"subscriber\":\"The subscriber's address\",\"token\":\"Super token address\"}},\"createIndex(address,uint32,bytes)\":{\"details\":\"Create a new index for the publisher\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks None\",\"indexId\":\"Id of the index\",\"token\":\"Super token address\"}},\"deleteSubscription(address,address,uint32,address,bytes)\":{\"details\":\"Delete the subscription of an user\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks - if the subscriber called it - AgreementTerminated callback to the publsiher: - agreementId is for the subscription - if the publisher called it - AgreementTerminated callback to the subscriber: - agreementId is for the subscription\",\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"subscriber\":\"The subscriber's address\",\"token\":\"Super token address\"}},\"distribute(address,uint32,uint256,bytes)\":{\"details\":\"Distribute tokens through the index\",\"params\":{\"amount\":\"The amount of tokens desired to be distributed\",\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) NOTE: - This is a convenient version of updateIndex. It adds to the index a delta that equals to `amount / totalUnits` - The actual amount distributed could be obtained via `calculateDistribution`. This is due to precision error with index value and units data range # App callbacks None\",\"indexId\":\"Id of the index\",\"token\":\"Super token address\"}},\"getIndex(address,address,uint32)\":{\"details\":\"Query the data of a index\",\"params\":{\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"token\":\"Super token address\"},\"returns\":{\"exist\":\"Does the index exist\",\"indexValue\":\"Value of the current index\",\"totalUnitsApproved\":\"Total units approved for the index\",\"totalUnitsPending\":\"Total units pending approval for the index\"}},\"getSubscription(address,address,uint32,address)\":{\"details\":\"Get data of a subscription\",\"params\":{\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"subscriber\":\"The subscriber of the index\",\"token\":\"Super token address\"},\"returns\":{\"approved\":\"Is the subscription approved?\",\"exist\":\"Does the subscription exist?\",\"pendingDistribution\":\"Pending amount of tokens to be distributed for unapproved subscription\",\"units\":\"Units of the suscription\"}},\"getSubscriptionByID(address,bytes32)\":{\"details\":\"indexId (agreementId) is the keccak256 hash of encodePacked(\\\"publisher\\\", publisher, indexId)\",\"params\":{\"agreementId\":\"The agreement ID\",\"token\":\"Super token address\"},\"returns\":{\"approved\":\"Is the subscription approved?\",\"indexId\":\"Id of the index\",\"pendingDistribution\":\"Pending amount of tokens to be distributed for unapproved subscription\",\"publisher\":\"The publisher of the index\",\"units\":\"Units of the suscription\"}},\"listSubscriptions(address,address)\":{\"details\":\"List subscriptions of an user\",\"params\":{\"subscriber\":\"The subscriber's address\",\"token\":\"Super token address\"},\"returns\":{\"indexIds\":\"Indexes of the subscriptions\",\"publishers\":\"Publishers of the subcriptions\",\"unitsList\":\"Units of the subscriptions\"}},\"realtimeBalanceOf(address,address,uint256)\":{\"details\":\"Calculate the real-time balance for the account of this agreement class\",\"params\":{\"account\":\"Account the state belongs to\",\"time\":\"Time used for the calculation\"},\"returns\":{\"deposit\":\"Account deposit amount of this agreement\",\"dynamicBalance\":\"Dynamic balance portion of real-time balance of this agreement\",\"owedDeposit\":\"Account owed deposit amount of this agreement\"}},\"revokeSubscription(address,address,uint32,bytes)\":{\"details\":\"\\\"Unapproves\\\" the subscription and moves approved units to pending\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks - AgreementUpdated callback to the publisher: - agreementId is for the subscription\",\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"token\":\"Super token address\"}},\"updateIndex(address,uint32,uint128,bytes)\":{\"details\":\"Update index value of an index\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks None\",\"indexId\":\"Id of the index\",\"indexValue\":\"Value of the index\",\"token\":\"Super token address\"}},\"updateSubscription(address,uint32,address,uint128,bytes)\":{\"details\":\"Update the nuber of units of a subscription\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks - if subscription exist - AgreementCreated callback to the subscriber: - agreementId is for the subscription - if subscription does not exist - AgreementUpdated callback to the subscriber: - agreementId is for the subscription\",\"indexId\":\"Id of the index\",\"subscriber\":\"The subscriber of the index\",\"token\":\"Super token address\",\"units\":\"Number of units of the subscription\"}}},\"title\":\"Instant Distribution Agreement interface\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getSubscriptionByID(address,bytes32)\":{\"notice\":\"Get data of a subscription by agreement ID\"},\"revokeSubscription(address,address,uint32,bytes)\":{\"notice\":\"Revoke the subscription of an index\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/interfaces/agreements/IInstantDistributionAgreementV1.sol\":\"IInstantDistributionAgreementV1\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/interfaces/agreements/IInstantDistributionAgreementV1.sol\":{\"keccak256\":\"0x47948789bc2265e6228f70ddd9eb194be4e35b1c5ce598f5b5a01fcb48def27b\",\"license\":\"AGPLv3\",\"urls\":[\"bzz-raw://d758b5560a735d8ab2175a2b76afe38f99bf170800917c4f0adae1f8862ad785\",\"dweb:/ipfs/QmXZToKtnJXmJq4hBqkwVAj6CYkG2DGbErt9G9T7sW4Zoe\"]},\"project:/contracts/interfaces/superfluid/ISuperAgreement.sol\":{\"keccak256\":\"0xc3a6a907245116bcecc70fe4b207454012e8ce4fa190228fb8bbe39e0b1bc5cf\",\"license\":\"AGPLv3\",\"urls\":[\"bzz-raw://83c116bdae48685d20e5a27c942111e685ec1ef6334e7ff6f6d9af66edbd8025\",\"dweb:/ipfs/QmTnVuNTaRFiDmkAmDk7NFYdfQTW1kqgBZiY2exC6k8jDx\"]},\"project:/contracts/interfaces/superfluid/ISuperfluidToken.sol\":{\"keccak256\":\"0x9189eaba9e856cc4932ea29eeaf4e89a09448dde13860591691ec122856fdc75\",\"license\":\"AGPLv3\",\"urls\":[\"bzz-raw://7d5991b906bba706373f5bfe3c2c8789a7a45360a41eee50574272b393c4ab70\",\"dweb:/ipfs/QmVCXVnYA13vMNxa7rGzNB129sUXiGE1asuHdnEMEPVZsp\"]}},\"version\":1}",
943
+ "metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"IndexCreated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"IndexDistributionClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"IndexSubscribed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"units\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"IndexUnitsUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"IndexUnsubscribed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"oldIndexValue\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"newIndexValue\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"totalUnitsPending\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"totalUnitsApproved\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"IndexUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"SubscriptionApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SubscriptionDistributionClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"SubscriptionRevoked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"indexed\":false,\"internalType\":\"uint128\",\"name\":\"units\",\"type\":\"uint128\"},{\"indexed\":false,\"internalType\":\"bytes\",\"name\":\"userData\",\"type\":\"bytes\"}],\"name\":\"SubscriptionUnitsUpdated\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"agreementType\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"approveSubscription\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"calculateDistribution\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"actualAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint128\",\"name\":\"newIndexValue\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"createIndex\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"deleteSubscription\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"distribute\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"}],\"name\":\"getIndex\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"exist\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"indexValue\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"totalUnitsApproved\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"totalUnitsPending\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"}],\"name\":\"getSubscription\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"exist\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"units\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"pendingDistribution\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"agreementId\",\"type\":\"bytes32\"}],\"name\":\"getSubscriptionByID\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"units\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"pendingDistribution\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"}],\"name\":\"listSubscriptions\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"publishers\",\"type\":\"address[]\"},{\"internalType\":\"uint32[]\",\"name\":\"indexIds\",\"type\":\"uint32[]\"},{\"internalType\":\"uint128[]\",\"name\":\"unitsList\",\"type\":\"uint128[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"name\":\"realtimeBalanceOf\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"dynamicBalance\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"deposit\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"owedDeposit\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"publisher\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"revokeSubscription\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"uint128\",\"name\":\"indexValue\",\"type\":\"uint128\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"updateIndex\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract ISuperfluidToken\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint32\",\"name\":\"indexId\",\"type\":\"uint32\"},{\"internalType\":\"address\",\"name\":\"subscriber\",\"type\":\"address\"},{\"internalType\":\"uint128\",\"name\":\"units\",\"type\":\"uint128\"},{\"internalType\":\"bytes\",\"name\":\"ctx\",\"type\":\"bytes\"}],\"name\":\"updateSubscription\",\"outputs\":[{\"internalType\":\"bytes\",\"name\":\"newCtx\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Superfluid Notes: - A publisher can create as many as indices as possibly identifiable with `indexId`. - `indexId` is deliberately limited to 32 bits, to avoid the chance for sha-3 collision. Despite knowing sha-3 collision is only theoretical. - A publisher can create a subscription to an index for any subscriber. - A subscription consists of: - The index it subscribes to. - Number of units subscribed. - An index consists of: - Current value as `uint128 indexValue`. - Total units of the approved subscriptions as `uint128 totalUnitsApproved`. - Total units of the non approved subscription as `uint128 totalUnitsPending`. - A publisher can update an index with a new value that doesn't decrease. - A publisher can update a subscription with any number of units. - A publisher or a subscriber can delete a subscription and reset its units to zero. - A subscriber must approve the index in order to receive distributions from the publisher each time the index is updated. - The amount distributed is $$\\\\Delta{index} * units$$ - Distributions to a non approved subscription stays in the publisher's deposit until: - the subscriber approves the subscription (side effect), - the publisher updates the subscription (side effect), - the subscriber deletes the subscription even if it is never approved (side effect), - or the subscriber can explicitly claim them.\",\"events\":{\"IndexCreated(address,address,uint32,bytes)\":{\"details\":\"Index created event\",\"params\":{\"indexId\":\"The specified indexId of the newly created index\",\"publisher\":\"Index creator and publisher\",\"token\":\"Super token address\",\"userData\":\"The user provided data\"}},\"IndexDistributionClaimed(address,address,uint32,address,uint256)\":{\"details\":\"Index distribution claimed event\",\"params\":{\"amount\":\"The pending amount claimed\",\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The subscriber units updated\",\"token\":\"Super token address\"}},\"IndexSubscribed(address,address,uint32,address,bytes)\":{\"details\":\"Index subscribed event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The approved subscriber\",\"token\":\"Super token address\",\"userData\":\"The user provided data\"}},\"IndexUnitsUpdated(address,address,uint32,address,uint128,bytes)\":{\"details\":\"Index units updated event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The subscriber units updated\",\"token\":\"Super token address\",\"units\":\"The new units amount\",\"userData\":\"The user provided data\"}},\"IndexUnsubscribed(address,address,uint32,address,bytes)\":{\"details\":\"Index unsubscribed event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The unsubscribed subscriber\",\"token\":\"Super token address\",\"userData\":\"The user provided data\"}},\"IndexUpdated(address,address,uint32,uint128,uint128,uint128,uint128,bytes)\":{\"details\":\"Index updated event\",\"params\":{\"indexId\":\"The specified indexId of the updated index\",\"newIndexValue\":\"The updated index value\",\"oldIndexValue\":\"The previous index value\",\"publisher\":\"Index updater and publisher\",\"token\":\"Super token address\",\"totalUnitsApproved\":\"The total units approved when the indexValue was updated\",\"totalUnitsPending\":\"The total units pending when the indexValue was updated\",\"userData\":\"The user provided data\"}},\"SubscriptionApproved(address,address,address,uint32,bytes)\":{\"details\":\"Subscription approved event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The approved subscriber\",\"token\":\"Super token address\",\"userData\":\"The user provided data\"}},\"SubscriptionDistributionClaimed(address,address,address,uint32,uint256)\":{\"details\":\"Subscription distribution claimed event\",\"params\":{\"amount\":\"The pending amount claimed\",\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The subscriber units updated\",\"token\":\"Super token address\"}},\"SubscriptionRevoked(address,address,address,uint32,bytes)\":{\"details\":\"Subscription approved event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The approved subscriber\",\"token\":\"Super token address\",\"userData\":\"The user provided data\"}},\"SubscriptionUnitsUpdated(address,address,address,uint32,uint128,bytes)\":{\"details\":\"Subscription units updated event\",\"params\":{\"indexId\":\"The specified indexId\",\"publisher\":\"Index publisher\",\"subscriber\":\"The subscriber units updated\",\"token\":\"Super token address\",\"units\":\"The new units amount\",\"userData\":\"The user provided data\"}}},\"kind\":\"dev\",\"methods\":{\"agreementType()\":{\"details\":\"ISuperAgreement.agreementType implementation\"},\"approveSubscription(address,address,uint32,bytes)\":{\"details\":\"Approve the subscription of an index\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks - if subscription exist - AgreementCreated callback to the publisher: - agreementId is for the subscription - if subscription does not exist - AgreementUpdated callback to the publisher: - agreementId is for the subscription\",\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"token\":\"Super token address\"}},\"calculateDistribution(address,address,uint32,uint256)\":{\"details\":\"Calculate actual distribution amount\",\"params\":{\"amount\":\"The amount of tokens desired to be distributed\",\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"token\":\"Super token address\"},\"returns\":{\"actualAmount\":\"The amount to be distributed after ensuring no rounding errors\",\"newIndexValue\":\"The index value given the desired amount of tokens to be distributed\"}},\"claim(address,address,uint32,address,bytes)\":{\"details\":\"Claim pending distributions\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) The subscription should not be approved yet # App callbacks - AgreementUpdated callback to the publisher: - agreementId is for the subscription\",\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"subscriber\":\"The subscriber's address\",\"token\":\"Super token address\"}},\"createIndex(address,uint32,bytes)\":{\"details\":\"Create a new index for the publisher\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks None\",\"indexId\":\"Id of the index\",\"token\":\"Super token address\"}},\"deleteSubscription(address,address,uint32,address,bytes)\":{\"details\":\"Delete the subscription of an user\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks - if the subscriber called it - AgreementTerminated callback to the publsiher: - agreementId is for the subscription - if the publisher called it - AgreementTerminated callback to the subscriber: - agreementId is for the subscription\",\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"subscriber\":\"The subscriber's address\",\"token\":\"Super token address\"}},\"distribute(address,uint32,uint256,bytes)\":{\"details\":\"Distribute tokens through the index\",\"params\":{\"amount\":\"The amount of tokens desired to be distributed\",\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) NOTE: - This is a convenient version of updateIndex. It adds to the index a delta that equals to `amount / totalUnits` - The actual amount distributed could be obtained via `calculateDistribution`. This is due to precision error with index value and units data range # App callbacks None\",\"indexId\":\"Id of the index\",\"token\":\"Super token address\"}},\"getIndex(address,address,uint32)\":{\"details\":\"Query the data of a index\",\"params\":{\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"token\":\"Super token address\"},\"returns\":{\"exist\":\"Does the index exist\",\"indexValue\":\"Value of the current index\",\"totalUnitsApproved\":\"Total units approved for the index\",\"totalUnitsPending\":\"Total units pending approval for the index\"}},\"getSubscription(address,address,uint32,address)\":{\"details\":\"Get data of a subscription\",\"params\":{\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"subscriber\":\"The subscriber of the index\",\"token\":\"Super token address\"},\"returns\":{\"approved\":\"Is the subscription approved?\",\"exist\":\"Does the subscription exist?\",\"pendingDistribution\":\"Pending amount of tokens to be distributed for unapproved subscription\",\"units\":\"Units of the suscription\"}},\"getSubscriptionByID(address,bytes32)\":{\"details\":\"indexId (agreementId) is the keccak256 hash of encodePacked(\\\"publisher\\\", publisher, indexId)\",\"params\":{\"agreementId\":\"The agreement ID\",\"token\":\"Super token address\"},\"returns\":{\"approved\":\"Is the subscription approved?\",\"indexId\":\"Id of the index\",\"pendingDistribution\":\"Pending amount of tokens to be distributed for unapproved subscription\",\"publisher\":\"The publisher of the index\",\"units\":\"Units of the suscription\"}},\"listSubscriptions(address,address)\":{\"details\":\"List subscriptions of an user\",\"params\":{\"subscriber\":\"The subscriber's address\",\"token\":\"Super token address\"},\"returns\":{\"indexIds\":\"Indexes of the subscriptions\",\"publishers\":\"Publishers of the subcriptions\",\"unitsList\":\"Units of the subscriptions\"}},\"realtimeBalanceOf(address,address,uint256)\":{\"details\":\"Calculate the real-time balance for the account of this agreement class\",\"params\":{\"account\":\"Account the state belongs to\",\"time\":\"Time used for the calculation\"},\"returns\":{\"deposit\":\"Account deposit amount of this agreement\",\"dynamicBalance\":\"Dynamic balance portion of real-time balance of this agreement\",\"owedDeposit\":\"Account owed deposit amount of this agreement\"}},\"revokeSubscription(address,address,uint32,bytes)\":{\"details\":\"\\\"Unapproves\\\" the subscription and moves approved units to pending\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks - AgreementUpdated callback to the publisher: - agreementId is for the subscription\",\"indexId\":\"Id of the index\",\"publisher\":\"The publisher of the index\",\"token\":\"Super token address\"}},\"updateIndex(address,uint32,uint128,bytes)\":{\"details\":\"Update index value of an index\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks None\",\"indexId\":\"Id of the index\",\"indexValue\":\"Value of the index\",\"token\":\"Super token address\"}},\"updateSubscription(address,uint32,address,uint128,bytes)\":{\"details\":\"Update the nuber of units of a subscription\",\"params\":{\"ctx\":\"Context bytes (see ISuperfluid.sol for Context struct) # App callbacks - if subscription exist - AgreementCreated callback to the subscriber: - agreementId is for the subscription - if subscription does not exist - AgreementUpdated callback to the subscriber: - agreementId is for the subscription\",\"indexId\":\"Id of the index\",\"subscriber\":\"The subscriber of the index\",\"token\":\"Super token address\",\"units\":\"Number of units of the subscription\"}}},\"title\":\"Instant Distribution Agreement interface\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"getSubscriptionByID(address,bytes32)\":{\"notice\":\"Get data of a subscription by agreement ID\"},\"revokeSubscription(address,address,uint32,bytes)\":{\"notice\":\"Revoke the subscription of an index\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"project:/contracts/interfaces/agreements/IInstantDistributionAgreementV1.sol\":\"IInstantDistributionAgreementV1\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"project:/contracts/interfaces/agreements/IInstantDistributionAgreementV1.sol\":{\"keccak256\":\"0x47948789bc2265e6228f70ddd9eb194be4e35b1c5ce598f5b5a01fcb48def27b\",\"license\":\"AGPLv3\",\"urls\":[\"bzz-raw://d758b5560a735d8ab2175a2b76afe38f99bf170800917c4f0adae1f8862ad785\",\"dweb:/ipfs/QmXZToKtnJXmJq4hBqkwVAj6CYkG2DGbErt9G9T7sW4Zoe\"]},\"project:/contracts/interfaces/superfluid/ISuperAgreement.sol\":{\"keccak256\":\"0xc3a6a907245116bcecc70fe4b207454012e8ce4fa190228fb8bbe39e0b1bc5cf\",\"license\":\"AGPLv3\",\"urls\":[\"bzz-raw://83c116bdae48685d20e5a27c942111e685ec1ef6334e7ff6f6d9af66edbd8025\",\"dweb:/ipfs/QmTnVuNTaRFiDmkAmDk7NFYdfQTW1kqgBZiY2exC6k8jDx\"]},\"project:/contracts/interfaces/superfluid/ISuperfluidToken.sol\":{\"keccak256\":\"0x518b869178aafffde40c654a1e24b3b1a2b5e42e5e8f17562556f404db8b9434\",\"license\":\"AGPLv3\",\"urls\":[\"bzz-raw://458ce84666b418fa3a7569c0e109db4d920fb6d1cb67ebc4c497c9c71107d93b\",\"dweb:/ipfs/QmV9nqhRF7MDGkV6UW3WWcqeXov2vmqHuRcvbqaaV8yP6u\"]}},\"version\":1}",
944
944
  "bytecode": "0x",
945
945
  "deployedBytecode": "0x",
946
946
  "immutableReferences": {},
@@ -5644,7 +5644,7 @@
5644
5644
  },
5645
5645
  "networks": {},
5646
5646
  "schemaVersion": "3.4.7",
5647
- "updatedAt": "2022-05-27T08:56:18.781Z",
5647
+ "updatedAt": "2022-06-06T10:25:55.153Z",
5648
5648
  "devdoc": {
5649
5649
  "author": "Superfluid Notes: - A publisher can create as many as indices as possibly identifiable with `indexId`. - `indexId` is deliberately limited to 32 bits, to avoid the chance for sha-3 collision. Despite knowing sha-3 collision is only theoretical. - A publisher can create a subscription to an index for any subscriber. - A subscription consists of: - The index it subscribes to. - Number of units subscribed. - An index consists of: - Current value as `uint128 indexValue`. - Total units of the approved subscriptions as `uint128 totalUnitsApproved`. - Total units of the non approved subscription as `uint128 totalUnitsPending`. - A publisher can update an index with a new value that doesn't decrease. - A publisher can update a subscription with any number of units. - A publisher or a subscriber can delete a subscription and reset its units to zero. - A subscriber must approve the index in order to receive distributions from the publisher each time the index is updated. - The amount distributed is $$\\Delta{index} * units$$ - Distributions to a non approved subscription stays in the publisher's deposit until: - the subscriber approves the subscription (side effect), - the publisher updates the subscription (side effect), - the subscriber deletes the subscription even if it is never approved (side effect), - or the subscriber can explicitly claim them.",
5650
5650
  "events": {