@superfluid-finance/ethereum-contracts 1.2.3-dev.7365205.0 → 1.2.3-dev.7dc62cd.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 +10 -10
- package/build/contracts/AgreementLibrary.json +4 -4
- package/build/contracts/BaseRelayRecipient.json +1 -1
- package/build/contracts/BatchLiquidator.json +1385 -1242
- package/build/contracts/BatchOperation.json +1 -1
- package/build/contracts/CFAv1Library.json +3437 -3625
- package/build/contracts/CallUtils.json +1 -1
- package/build/contracts/ClosingOnUpdateFlowTestApp.json +4440 -4451
- package/build/contracts/ConstantFlowAgreementV1.json +5204 -5204
- package/build/contracts/Context.json +1 -1
- package/build/contracts/ContextDefinitions.json +1 -1
- package/build/contracts/Create2.json +1 -1
- package/build/contracts/CustomSuperTokenBase.json +2 -2
- package/build/contracts/ERC165.json +1 -1
- package/build/contracts/ERC1820Implementer.json +79 -79
- package/build/contracts/ERC1820RegistryCompiled.json +1 -1
- package/build/contracts/ERC20.json +1008 -1008
- package/build/contracts/ERC20Burnable.json +1 -1
- package/build/contracts/ERC20Pausable.json +1 -1
- package/build/contracts/ERC20PresetMinterPauser.json +1816 -1816
- package/build/contracts/ERC20WithTokenInfo.json +1 -1
- package/build/contracts/ERC777Helper.json +1 -1
- package/build/contracts/ERC777RecipientDrainingGas.json +1874 -1874
- package/build/contracts/ERC777RecipientReverting.json +1896 -1896
- package/build/contracts/EnumerableSet.json +1 -1
- package/build/contracts/EventsEmitter.json +414 -0
- package/build/contracts/ExclusiveInflowTestApp.json +4468 -4479
- package/build/contracts/FixedSizeData.json +405 -405
- package/build/contracts/FlowExchangeTestApp.json +4578 -4589
- package/build/contracts/FlowOperatorDefinitions.json +1 -1
- package/build/contracts/FullUpgradableSuperTokenProxy.json +319 -319
- package/build/contracts/IAccessControl.json +1 -1
- package/build/contracts/IAccessControlEnumerable.json +1 -1
- package/build/contracts/IConstantFlowAgreementV1.json +450 -443
- package/build/contracts/IDAv1Library.json +3227 -3403
- 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/IERC777.json +1 -1
- package/build/contracts/IERC777Recipient.json +1 -1
- package/build/contracts/IERC777Sender.json +1 -1
- package/build/contracts/IInstantDistributionAgreementV1.json +569 -558
- package/build/contracts/IMaticBridgedNativeSuperToken.json +73 -34
- package/build/contracts/IMaticBridgedNativeSuperTokenCustom.json +2 -2
- package/build/contracts/IMultiSigWallet.json +1 -1
- package/build/contracts/IPureSuperToken.json +73 -34
- package/build/contracts/IPureSuperTokenCustom.json +2 -2
- package/build/contracts/IRelayRecipient.json +1 -1
- package/build/contracts/IResolver.json +1 -1
- package/build/contracts/ISETH.json +73 -34
- package/build/contracts/ISETHCustom.json +2 -2
- package/build/contracts/ISuperAgreement.json +2 -2
- package/build/contracts/ISuperApp.json +178 -172
- package/build/contracts/ISuperToken.json +524 -485
- package/build/contracts/ISuperTokenFactory.json +2 -2
- package/build/contracts/ISuperfluid.json +632 -627
- package/build/contracts/ISuperfluidGovernance.json +133 -132
- package/build/contracts/ISuperfluidToken.json +407 -398
- package/build/contracts/ITOGAv1.json +2689 -2739
- package/build/contracts/ITOGAv2.json +2689 -2739
- package/build/contracts/Initializable.json +1 -1
- package/build/contracts/InstantDistributionAgreementV1.json +5388 -5388
- package/build/contracts/MaticBridgedNativeSuperTokenProxy.json +971 -971
- package/build/contracts/NonClosableOutflowTestApp.json +4343 -4354
- 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 +694 -694
- package/build/contracts/Resolver.json +1058 -1058
- package/build/contracts/SETHProxy.json +661 -661
- 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 +4440 -4451
- package/build/contracts/SlotsBitmapLibrary.json +1757 -1757
- package/build/contracts/Strings.json +1 -1
- package/build/contracts/SuperAppBase.json +2 -2
- package/build/contracts/SuperAppDefinitions.json +1 -1
- package/build/contracts/SuperToken.json +9778 -9536
- package/build/contracts/SuperTokenFactory.json +2074 -2074
- package/build/contracts/SuperTokenFactoryBase.json +989 -989
- package/build/contracts/SuperTokenFactoryHelper.json +1095 -1095
- package/build/contracts/SuperUpgrader.json +2495 -2495
- package/build/contracts/Superfluid.json +12988 -12988
- package/build/contracts/SuperfluidFrameworkDeployer.json +2042 -2042
- package/build/contracts/SuperfluidGovernanceBase.json +10 -10
- package/build/contracts/SuperfluidGovernanceConfigs.json +1 -1
- package/build/contracts/SuperfluidGovernanceII.json +2023 -2023
- package/build/contracts/SuperfluidGovernanceIIProxy.json +227 -227
- package/build/contracts/SuperfluidLoader.json +752 -752
- package/build/contracts/SuperfluidToken.json +3478 -2955
- package/build/contracts/TOGA.json +4681 -4731
- package/build/contracts/TestGovernance.json +2403 -2403
- package/build/contracts/TestToken.json +1267 -1267
- package/build/contracts/TokenCustodian.json +903 -903
- package/build/contracts/TokenInfo.json +1 -1
- package/build/contracts/UUPSProxiable.json +233 -233
- package/build/contracts/UUPSProxy.json +257 -257
- package/build/contracts/UUPSUtils.json +85 -85
- package/build/contracts-sizes.txt +6 -6
- package/contracts/apps/CFAv1Library.sol +147 -111
- package/contracts/apps/IDAv1Library.sol +133 -101
- package/contracts/interfaces/agreements/IConstantFlowAgreementV1.sol +7 -10
- package/contracts/interfaces/agreements/IInstantDistributionAgreementV1.sol +11 -18
- package/contracts/interfaces/superfluid/ISuperApp.sol +7 -9
- package/contracts/interfaces/superfluid/ISuperToken.sol +36 -44
- package/contracts/interfaces/superfluid/ISuperfluid.sol +17 -21
- package/contracts/interfaces/superfluid/ISuperfluidGovernance.sol +1 -1
- package/contracts/interfaces/superfluid/ISuperfluidToken.sol +21 -22
- package/contracts/libs/EventsEmitter.sol +16 -0
- package/contracts/mocks/CFAAppMocks.sol +52 -36
- package/contracts/mocks/CustomSuperTokenMock.sol +11 -4
- package/contracts/mocks/IDASuperAppTester.sol +24 -18
- package/contracts/mocks/MultiFlowTesterApp.sol +33 -24
- package/contracts/mocks/SuperAppMocks.sol +54 -40
- package/contracts/superfluid/SuperfluidToken.sol +33 -31
- package/contracts/utils/BatchLiquidator.sol +15 -11
- package/contracts/utils/TOGA.sol +40 -30
- package/package.json +5 -3
|
@@ -186,11 +186,13 @@ library IDAv1Library {
|
|
|
186
186
|
) internal {
|
|
187
187
|
idaLibrary.host.callAgreement(
|
|
188
188
|
idaLibrary.ida,
|
|
189
|
-
abi.
|
|
190
|
-
idaLibrary.ida.createIndex
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
189
|
+
abi.encodeCall(
|
|
190
|
+
idaLibrary.ida.createIndex,
|
|
191
|
+
(
|
|
192
|
+
token,
|
|
193
|
+
indexId,
|
|
194
|
+
new bytes(0) // ctx placeholder
|
|
195
|
+
)
|
|
194
196
|
),
|
|
195
197
|
userData
|
|
196
198
|
);
|
|
@@ -225,11 +227,13 @@ library IDAv1Library {
|
|
|
225
227
|
) internal returns (bytes memory newCtx) {
|
|
226
228
|
(newCtx, ) = idaLibrary.host.callAgreementWithContext(
|
|
227
229
|
idaLibrary.ida,
|
|
228
|
-
abi.
|
|
229
|
-
idaLibrary.ida.createIndex
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
230
|
+
abi.encodeCall(
|
|
231
|
+
idaLibrary.ida.createIndex,
|
|
232
|
+
(
|
|
233
|
+
token,
|
|
234
|
+
indexId,
|
|
235
|
+
new bytes(0) // ctx placeholder
|
|
236
|
+
)
|
|
233
237
|
),
|
|
234
238
|
userData,
|
|
235
239
|
ctx
|
|
@@ -268,12 +272,14 @@ library IDAv1Library {
|
|
|
268
272
|
) internal {
|
|
269
273
|
idaLibrary.host.callAgreement(
|
|
270
274
|
idaLibrary.ida,
|
|
271
|
-
abi.
|
|
272
|
-
idaLibrary.ida.updateIndex
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
275
|
+
abi.encodeCall(
|
|
276
|
+
idaLibrary.ida.updateIndex,
|
|
277
|
+
(
|
|
278
|
+
token,
|
|
279
|
+
indexId,
|
|
280
|
+
indexValue,
|
|
281
|
+
new bytes(0) // ctx placeholder
|
|
282
|
+
)
|
|
277
283
|
),
|
|
278
284
|
userData
|
|
279
285
|
);
|
|
@@ -321,12 +327,14 @@ library IDAv1Library {
|
|
|
321
327
|
) internal returns (bytes memory newCtx) {
|
|
322
328
|
(newCtx, ) = idaLibrary.host.callAgreementWithContext(
|
|
323
329
|
idaLibrary.ida,
|
|
324
|
-
abi.
|
|
325
|
-
idaLibrary.ida.updateIndex
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
+
abi.encodeCall(
|
|
331
|
+
idaLibrary.ida.updateIndex,
|
|
332
|
+
(
|
|
333
|
+
token,
|
|
334
|
+
indexId,
|
|
335
|
+
indexValue,
|
|
336
|
+
new bytes(0) // ctx placeholder
|
|
337
|
+
)
|
|
330
338
|
),
|
|
331
339
|
userData,
|
|
332
340
|
ctx
|
|
@@ -365,12 +373,14 @@ library IDAv1Library {
|
|
|
365
373
|
) internal {
|
|
366
374
|
idaLibrary.host.callAgreement(
|
|
367
375
|
idaLibrary.ida,
|
|
368
|
-
abi.
|
|
369
|
-
idaLibrary.ida.distribute
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
376
|
+
abi.encodeCall(
|
|
377
|
+
idaLibrary.ida.distribute,
|
|
378
|
+
(
|
|
379
|
+
token,
|
|
380
|
+
indexId,
|
|
381
|
+
amount,
|
|
382
|
+
new bytes(0) // ctx placeholder
|
|
383
|
+
)
|
|
374
384
|
),
|
|
375
385
|
userData
|
|
376
386
|
);
|
|
@@ -411,13 +421,15 @@ library IDAv1Library {
|
|
|
411
421
|
bytes memory userData
|
|
412
422
|
) internal returns (bytes memory newCtx) {
|
|
413
423
|
(newCtx, ) = idaLibrary.host.callAgreementWithContext(
|
|
414
|
-
idaLibrary.ida,
|
|
415
|
-
abi.
|
|
416
|
-
idaLibrary.ida.distribute
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
424
|
+
idaLibrary.ida,
|
|
425
|
+
abi.encodeCall(
|
|
426
|
+
idaLibrary.ida.distribute,
|
|
427
|
+
(
|
|
428
|
+
token,
|
|
429
|
+
indexId,
|
|
430
|
+
amount,
|
|
431
|
+
new bytes(0) // ctx placeholder
|
|
432
|
+
)
|
|
421
433
|
),
|
|
422
434
|
userData,
|
|
423
435
|
ctx
|
|
@@ -462,12 +474,14 @@ library IDAv1Library {
|
|
|
462
474
|
) internal {
|
|
463
475
|
idaLibrary.host.callAgreement(
|
|
464
476
|
idaLibrary.ida,
|
|
465
|
-
abi.
|
|
466
|
-
idaLibrary.ida.approveSubscription
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
477
|
+
abi.encodeCall(
|
|
478
|
+
idaLibrary.ida.approveSubscription,
|
|
479
|
+
(
|
|
480
|
+
token,
|
|
481
|
+
publisher,
|
|
482
|
+
indexId,
|
|
483
|
+
new bytes(0) // ctx placeholder
|
|
484
|
+
)
|
|
471
485
|
),
|
|
472
486
|
userData
|
|
473
487
|
);
|
|
@@ -517,12 +531,14 @@ library IDAv1Library {
|
|
|
517
531
|
) internal returns (bytes memory newCtx) {
|
|
518
532
|
(newCtx, ) = idaLibrary.host.callAgreementWithContext(
|
|
519
533
|
idaLibrary.ida,
|
|
520
|
-
abi.
|
|
521
|
-
idaLibrary.ida.approveSubscription
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
534
|
+
abi.encodeCall(
|
|
535
|
+
idaLibrary.ida.approveSubscription,
|
|
536
|
+
(
|
|
537
|
+
token,
|
|
538
|
+
publisher,
|
|
539
|
+
indexId,
|
|
540
|
+
new bytes(0) // ctx placeholder
|
|
541
|
+
)
|
|
526
542
|
),
|
|
527
543
|
userData,
|
|
528
544
|
ctx
|
|
@@ -558,12 +574,14 @@ library IDAv1Library {
|
|
|
558
574
|
) internal {
|
|
559
575
|
idaLibrary.host.callAgreement(
|
|
560
576
|
idaLibrary.ida,
|
|
561
|
-
abi.
|
|
562
|
-
idaLibrary.ida.revokeSubscription
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
577
|
+
abi.encodeCall(
|
|
578
|
+
idaLibrary.ida.revokeSubscription,
|
|
579
|
+
(
|
|
580
|
+
token,
|
|
581
|
+
publisher,
|
|
582
|
+
indexId,
|
|
583
|
+
new bytes(0) // ctx placeholder
|
|
584
|
+
)
|
|
567
585
|
),
|
|
568
586
|
userData
|
|
569
587
|
);
|
|
@@ -610,12 +628,14 @@ library IDAv1Library {
|
|
|
610
628
|
) internal returns (bytes memory newCtx) {
|
|
611
629
|
(newCtx, ) = idaLibrary.host.callAgreementWithContext(
|
|
612
630
|
idaLibrary.ida,
|
|
613
|
-
abi.
|
|
614
|
-
idaLibrary.ida.revokeSubscription
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
631
|
+
abi.encodeCall(
|
|
632
|
+
idaLibrary.ida.revokeSubscription,
|
|
633
|
+
(
|
|
634
|
+
token,
|
|
635
|
+
publisher,
|
|
636
|
+
indexId,
|
|
637
|
+
new bytes(0) // ctx placeholder
|
|
638
|
+
)
|
|
619
639
|
),
|
|
620
640
|
userData,
|
|
621
641
|
ctx
|
|
@@ -657,13 +677,15 @@ library IDAv1Library {
|
|
|
657
677
|
) internal {
|
|
658
678
|
idaLibrary.host.callAgreement(
|
|
659
679
|
idaLibrary.ida,
|
|
660
|
-
abi.
|
|
661
|
-
idaLibrary.ida.updateSubscription
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
680
|
+
abi.encodeCall(
|
|
681
|
+
idaLibrary.ida.updateSubscription,
|
|
682
|
+
(
|
|
683
|
+
token,
|
|
684
|
+
indexId,
|
|
685
|
+
subscriber,
|
|
686
|
+
units,
|
|
687
|
+
new bytes(0) // ctx placeholder
|
|
688
|
+
)
|
|
667
689
|
),
|
|
668
690
|
userData
|
|
669
691
|
);
|
|
@@ -716,13 +738,15 @@ library IDAv1Library {
|
|
|
716
738
|
) internal returns (bytes memory newCtx) {
|
|
717
739
|
(newCtx, ) = idaLibrary.host.callAgreementWithContext(
|
|
718
740
|
idaLibrary.ida,
|
|
719
|
-
abi.
|
|
720
|
-
idaLibrary.ida.updateSubscription
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
741
|
+
abi.encodeCall(
|
|
742
|
+
idaLibrary.ida.updateSubscription,
|
|
743
|
+
(
|
|
744
|
+
token,
|
|
745
|
+
indexId,
|
|
746
|
+
subscriber,
|
|
747
|
+
units,
|
|
748
|
+
new bytes(0) // ctx placeholder
|
|
749
|
+
)
|
|
726
750
|
),
|
|
727
751
|
userData,
|
|
728
752
|
ctx
|
|
@@ -763,13 +787,15 @@ library IDAv1Library {
|
|
|
763
787
|
) internal {
|
|
764
788
|
idaLibrary.host.callAgreement(
|
|
765
789
|
idaLibrary.ida,
|
|
766
|
-
abi.
|
|
767
|
-
idaLibrary.ida.deleteSubscription
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
790
|
+
abi.encodeCall(
|
|
791
|
+
idaLibrary.ida.deleteSubscription,
|
|
792
|
+
(
|
|
793
|
+
token,
|
|
794
|
+
publisher,
|
|
795
|
+
indexId,
|
|
796
|
+
subscriber,
|
|
797
|
+
new bytes(0) // ctx placeholder
|
|
798
|
+
)
|
|
773
799
|
),
|
|
774
800
|
userData
|
|
775
801
|
);
|
|
@@ -821,13 +847,15 @@ library IDAv1Library {
|
|
|
821
847
|
) internal returns (bytes memory newCtx) {
|
|
822
848
|
(newCtx, ) = idaLibrary.host.callAgreementWithContext(
|
|
823
849
|
idaLibrary.ida,
|
|
824
|
-
abi.
|
|
825
|
-
idaLibrary.ida.deleteSubscription
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
850
|
+
abi.encodeCall(
|
|
851
|
+
idaLibrary.ida.deleteSubscription,
|
|
852
|
+
(
|
|
853
|
+
token,
|
|
854
|
+
publisher,
|
|
855
|
+
indexId,
|
|
856
|
+
subscriber,
|
|
857
|
+
new bytes(0) // ctx placeholder
|
|
858
|
+
)
|
|
831
859
|
),
|
|
832
860
|
userData,
|
|
833
861
|
ctx
|
|
@@ -868,13 +896,15 @@ library IDAv1Library {
|
|
|
868
896
|
) internal {
|
|
869
897
|
idaLibrary.host.callAgreement(
|
|
870
898
|
idaLibrary.ida,
|
|
871
|
-
abi.
|
|
872
|
-
idaLibrary.ida.claim
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
899
|
+
abi.encodeCall(
|
|
900
|
+
idaLibrary.ida.claim,
|
|
901
|
+
(
|
|
902
|
+
token,
|
|
903
|
+
publisher,
|
|
904
|
+
indexId,
|
|
905
|
+
subscriber,
|
|
906
|
+
new bytes(0) // ctx placeholder
|
|
907
|
+
)
|
|
878
908
|
),
|
|
879
909
|
userData
|
|
880
910
|
);
|
|
@@ -925,13 +955,15 @@ library IDAv1Library {
|
|
|
925
955
|
) internal returns (bytes memory newCtx) {
|
|
926
956
|
(newCtx, ) = idaLibrary.host.callAgreementWithContext(
|
|
927
957
|
idaLibrary.ida,
|
|
928
|
-
abi.
|
|
929
|
-
idaLibrary.ida.claim
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
958
|
+
abi.encodeCall(
|
|
959
|
+
idaLibrary.ida.claim,
|
|
960
|
+
(
|
|
961
|
+
token,
|
|
962
|
+
publisher,
|
|
963
|
+
indexId,
|
|
964
|
+
subscriber,
|
|
965
|
+
new bytes(0) // ctx placeholder
|
|
966
|
+
)
|
|
935
967
|
),
|
|
936
968
|
userData,
|
|
937
969
|
ctx
|
|
@@ -33,7 +33,7 @@ abstract contract IConstantFlowAgreementV1 is ISuperAgreement {
|
|
|
33
33
|
* @dev Calculates the deposit based on the liquidationPeriod and flowRate
|
|
34
34
|
* @param flowRate Flow rate to be tested
|
|
35
35
|
* @return deposit The deposit amount based on flowRate and liquidationPeriod
|
|
36
|
-
*
|
|
36
|
+
* @custom:note
|
|
37
37
|
* - if calculated deposit (flowRate * liquidationPeriod) is less
|
|
38
38
|
* than the minimum deposit, we use the minimum deposit otherwise
|
|
39
39
|
* we use the calculated deposit
|
|
@@ -163,13 +163,12 @@ abstract contract IConstantFlowAgreementV1 is ISuperAgreement {
|
|
|
163
163
|
* @param flowRate New flow rate in amount per second
|
|
164
164
|
* @param ctx Context bytes (see ISuperfluid.sol for Context struct)
|
|
165
165
|
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
166
|
+
* @custom:callbacks
|
|
168
167
|
* - AgreementCreated
|
|
169
168
|
* - agreementId - can be used in getFlowByID
|
|
170
169
|
* - agreementData - abi.encode(address flowSender, address flowReceiver)
|
|
171
170
|
*
|
|
172
|
-
*
|
|
171
|
+
* @custom:note
|
|
173
172
|
* - A deposit is taken as safety margin for the solvency agents
|
|
174
173
|
* - A extra gas fee may be taken to pay for solvency agent liquidations
|
|
175
174
|
*/
|
|
@@ -209,13 +208,12 @@ abstract contract IConstantFlowAgreementV1 is ISuperAgreement {
|
|
|
209
208
|
* @param flowRate New flow rate in amount per second
|
|
210
209
|
* @param ctx Context bytes (see ISuperfluid.sol for Context struct)
|
|
211
210
|
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
211
|
+
* @custom:callbacks
|
|
214
212
|
* - AgreementUpdated
|
|
215
213
|
* - agreementId - can be used in getFlowByID
|
|
216
214
|
* - agreementData - abi.encode(address flowSender, address flowReceiver)
|
|
217
215
|
*
|
|
218
|
-
*
|
|
216
|
+
* @custom:note
|
|
219
217
|
* - Only the flow sender may update the flow rate
|
|
220
218
|
* - Even if the flow rate is zero, the flow is not deleted
|
|
221
219
|
* from the system
|
|
@@ -335,13 +333,12 @@ abstract contract IConstantFlowAgreementV1 is ISuperAgreement {
|
|
|
335
333
|
* @param ctx Context bytes (see ISuperfluid.sol for Context struct)
|
|
336
334
|
* @param receiver Flow receiver address
|
|
337
335
|
*
|
|
338
|
-
*
|
|
339
|
-
*
|
|
336
|
+
* @custom:callbacks
|
|
340
337
|
* - AgreementTerminated
|
|
341
338
|
* - agreementId - can be used in getFlowByID
|
|
342
339
|
* - agreementData - abi.encode(address flowSender, address flowReceiver)
|
|
343
340
|
*
|
|
344
|
-
*
|
|
341
|
+
* @custom:note
|
|
345
342
|
* - Both flow sender and receiver may delete the flow
|
|
346
343
|
* - If Sender account is insolvent or in critical state, a solvency agent may
|
|
347
344
|
* also terminate the agreement
|
|
@@ -9,7 +9,7 @@ import { ISuperfluidToken } from "../superfluid/ISuperfluidToken.sol";
|
|
|
9
9
|
* @title Instant Distribution Agreement interface
|
|
10
10
|
* @author Superfluid
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* @notice
|
|
13
13
|
* - A publisher can create as many as indices as possibly identifiable with `indexId`.
|
|
14
14
|
* - `indexId` is deliberately limited to 32 bits, to avoid the chance for sha-3 collision.
|
|
15
15
|
* Despite knowing sha-3 collision is only theoretical.
|
|
@@ -50,8 +50,7 @@ abstract contract IInstantDistributionAgreementV1 is ISuperAgreement {
|
|
|
50
50
|
* @param indexId Id of the index
|
|
51
51
|
* @param ctx Context bytes (see ISuperfluid.sol for Context struct)
|
|
52
52
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
53
|
+
* @custom:callbacks
|
|
55
54
|
* None
|
|
56
55
|
*/
|
|
57
56
|
function createIndex(
|
|
@@ -124,8 +123,7 @@ abstract contract IInstantDistributionAgreementV1 is ISuperAgreement {
|
|
|
124
123
|
* @param indexValue Value of the index
|
|
125
124
|
* @param ctx Context bytes (see ISuperfluid.sol for Context struct)
|
|
126
125
|
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
126
|
+
* @custom:callbacks
|
|
129
127
|
* None
|
|
130
128
|
*/
|
|
131
129
|
function updateIndex(
|
|
@@ -164,15 +162,14 @@ abstract contract IInstantDistributionAgreementV1 is ISuperAgreement {
|
|
|
164
162
|
* @param amount The amount of tokens desired to be distributed
|
|
165
163
|
* @param ctx Context bytes (see ISuperfluid.sol for Context struct)
|
|
166
164
|
*
|
|
167
|
-
*
|
|
165
|
+
* @custom:note
|
|
168
166
|
* - This is a convenient version of updateIndex. It adds to the index
|
|
169
167
|
* a delta that equals to `amount / totalUnits`
|
|
170
168
|
* - The actual amount distributed could be obtained via
|
|
171
169
|
* `calculateDistribution`. This is due to precision error with index
|
|
172
170
|
* value and units data range
|
|
173
171
|
*
|
|
174
|
-
*
|
|
175
|
-
*
|
|
172
|
+
* @custom:callbacks
|
|
176
173
|
* None
|
|
177
174
|
*/
|
|
178
175
|
function distribute(
|
|
@@ -196,8 +193,7 @@ abstract contract IInstantDistributionAgreementV1 is ISuperAgreement {
|
|
|
196
193
|
* @param indexId Id of the index
|
|
197
194
|
* @param ctx Context bytes (see ISuperfluid.sol for Context struct)
|
|
198
195
|
*
|
|
199
|
-
*
|
|
200
|
-
*
|
|
196
|
+
* @custom:callbacks
|
|
201
197
|
* - if subscription exist
|
|
202
198
|
* - AgreementCreated callback to the publisher:
|
|
203
199
|
* - agreementId is for the subscription
|
|
@@ -251,7 +247,7 @@ abstract contract IInstantDistributionAgreementV1 is ISuperAgreement {
|
|
|
251
247
|
* @param indexId Id of the index
|
|
252
248
|
* @param ctx Context bytes (see ISuperfluid.sol for Context struct)
|
|
253
249
|
*
|
|
254
|
-
*
|
|
250
|
+
* @custom:callbacks
|
|
255
251
|
* - AgreementUpdated callback to the publisher:
|
|
256
252
|
* - agreementId is for the subscription
|
|
257
253
|
*/
|
|
@@ -301,8 +297,7 @@ abstract contract IInstantDistributionAgreementV1 is ISuperAgreement {
|
|
|
301
297
|
* @param units Number of units of the subscription
|
|
302
298
|
* @param ctx Context bytes (see ISuperfluid.sol for Context struct)
|
|
303
299
|
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
300
|
+
* @custom:callbacks
|
|
306
301
|
* - if subscription exist
|
|
307
302
|
* - AgreementCreated callback to the subscriber:
|
|
308
303
|
* - agreementId is for the subscription
|
|
@@ -432,8 +427,7 @@ abstract contract IInstantDistributionAgreementV1 is ISuperAgreement {
|
|
|
432
427
|
* @param subscriber The subscriber's address
|
|
433
428
|
* @param ctx Context bytes (see ISuperfluid.sol for Context struct)
|
|
434
429
|
*
|
|
435
|
-
*
|
|
436
|
-
*
|
|
430
|
+
* @custom:callbacks
|
|
437
431
|
* - if the subscriber called it
|
|
438
432
|
* - AgreementTerminated callback to the publsiher:
|
|
439
433
|
* - agreementId is for the subscription
|
|
@@ -459,10 +453,9 @@ abstract contract IInstantDistributionAgreementV1 is ISuperAgreement {
|
|
|
459
453
|
* @param subscriber The subscriber's address
|
|
460
454
|
* @param ctx Context bytes (see ISuperfluid.sol for Context struct)
|
|
461
455
|
*
|
|
462
|
-
* The subscription should not be approved yet
|
|
463
|
-
*
|
|
464
|
-
* # App callbacks
|
|
456
|
+
* @custom:note The subscription should not be approved yet
|
|
465
457
|
*
|
|
458
|
+
* @custom:callbacks
|
|
466
459
|
* - AgreementUpdated callback to the publisher:
|
|
467
460
|
* - agreementId is for the subscription
|
|
468
461
|
*/
|
|
@@ -7,7 +7,6 @@ import { ISuperToken } from "./ISuperToken.sol";
|
|
|
7
7
|
* @title SuperApp interface
|
|
8
8
|
* @author Superfluid
|
|
9
9
|
* @dev Be aware of the app being jailed, when the word permitted is used.
|
|
10
|
-
*
|
|
11
10
|
*/
|
|
12
11
|
interface ISuperApp {
|
|
13
12
|
|
|
@@ -21,7 +20,7 @@ interface ISuperApp {
|
|
|
21
20
|
* @return cbdata A free format in memory data the app can use to pass
|
|
22
21
|
* arbitary information to the after-hook callback.
|
|
23
22
|
*
|
|
24
|
-
*
|
|
23
|
+
* @custom:note
|
|
25
24
|
* - It will be invoked with `staticcall`, no state changes are permitted.
|
|
26
25
|
* - Only revert with a "reason" is permitted.
|
|
27
26
|
*/
|
|
@@ -46,7 +45,7 @@ interface ISuperApp {
|
|
|
46
45
|
* @param ctx The context data.
|
|
47
46
|
* @return newCtx The current context of the transaction.
|
|
48
47
|
*
|
|
49
|
-
*
|
|
48
|
+
* @custom:note
|
|
50
49
|
* - State changes is permitted.
|
|
51
50
|
* - Only revert with a "reason" is permitted.
|
|
52
51
|
*/
|
|
@@ -71,7 +70,7 @@ interface ISuperApp {
|
|
|
71
70
|
* @return cbdata A free format in memory data the app can use to pass
|
|
72
71
|
* arbitary information to the after-hook callback.
|
|
73
72
|
*
|
|
74
|
-
*
|
|
73
|
+
* @custom:note
|
|
75
74
|
* - It will be invoked with `staticcall`, no state changes are permitted.
|
|
76
75
|
* - Only revert with a "reason" is permitted.
|
|
77
76
|
*/
|
|
@@ -97,7 +96,7 @@ interface ISuperApp {
|
|
|
97
96
|
* @param ctx The context data.
|
|
98
97
|
* @return newCtx The current context of the transaction.
|
|
99
98
|
*
|
|
100
|
-
*
|
|
99
|
+
* @custom:note
|
|
101
100
|
* - State changes is permitted.
|
|
102
101
|
* - Only revert with a "reason" is permitted.
|
|
103
102
|
*/
|
|
@@ -119,10 +118,9 @@ interface ISuperApp {
|
|
|
119
118
|
* @param agreementId The agreementId
|
|
120
119
|
* @param agreementData The agreement data (non-compressed)
|
|
121
120
|
* @param ctx The context data.
|
|
122
|
-
* @return cbdata A free format in memory data the app can use to pass
|
|
123
|
-
* arbitary information to the after-hook callback.
|
|
121
|
+
* @return cbdata A free format in memory data the app can use to pass arbitary information to the after-hook callback.
|
|
124
122
|
*
|
|
125
|
-
*
|
|
123
|
+
* @custom:note
|
|
126
124
|
* - It will be invoked with `staticcall`, no state changes are permitted.
|
|
127
125
|
* - Revert is not permitted.
|
|
128
126
|
*/
|
|
@@ -147,7 +145,7 @@ interface ISuperApp {
|
|
|
147
145
|
* @param ctx The context data.
|
|
148
146
|
* @return newCtx The current context of the transaction.
|
|
149
147
|
*
|
|
150
|
-
*
|
|
148
|
+
* @custom:note
|
|
151
149
|
* - State changes is permitted.
|
|
152
150
|
* - Revert is not permitted.
|
|
153
151
|
*/
|