@etherisc/gif-next 0.0.2-da06f3b-803 → 0.0.2-da0f894-204
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +73 -1
- package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/components/Component.sol/Component.json +212 -94
- package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/components/Distribution.sol/Distribution.json +552 -122
- package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IComponent.sol/IComponent.json +64 -72
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +279 -98
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +406 -90
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +68 -144
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +654 -117
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +316 -166
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +2 -2
- package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +765 -323
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +97 -180
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +841 -574
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +134 -231
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +98 -124
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +265 -269
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +319 -99
- package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +1 -1
- package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +2 -2
- package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.json +118 -169
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +2 -2
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +2 -2
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +62 -36
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
- package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +1 -1
- package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.json +947 -0
- package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.json +665 -0
- package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +261 -267
- package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +305 -93
- package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.json +754 -0
- package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.json +637 -0
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +1031 -250
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +441 -85
- package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.json +535 -0
- package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +130 -212
- package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.json +409 -0
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +552 -135
- package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +40 -287
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +22 -169
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +22 -169
- package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +164 -391
- package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +311 -127
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +142 -221
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +302 -90
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +142 -221
- package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +302 -90
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +15 -21
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +83 -174
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +28 -34
- package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +2 -2
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +193 -216
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +300 -94
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +11 -11
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +141 -37
- package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +41 -3
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +40 -29
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +4 -0
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +129 -0
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +21 -29
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/{experiment/inheritance/IB.sol/IB.json → shared/IRegistryLinked.sol/IRegistryLinked.json} +18 -20
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.json +22 -169
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +2 -152
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +113 -33
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +4 -0
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +248 -0
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +294 -74
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +125 -55
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +84 -0
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/Service.sol/Service.json +113 -164
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +2 -2
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
- package/artifacts/contracts/shared/Versionable.sol/Versionable.json +2 -152
- package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +125 -55
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +6 -6
- package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
- package/artifacts/contracts/test/TestService.sol/TestService.json +134 -221
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +8 -190
- package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
- package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.json +100 -0
- package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +2 -2
- package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
- package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
- package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.json +100 -0
- package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/types/Referral.sol/ReferralLib.json +2 -2
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +2 -2
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +2 -2
- package/artifacts/contracts/types/Seconds.sol/SecondsLib.dbg.json +4 -0
- package/artifacts/contracts/types/Seconds.sol/SecondsLib.json +124 -0
- package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +25 -7
- package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
- package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
- package/contracts/components/Component.sol +82 -77
- package/contracts/components/Distribution.sol +188 -48
- package/contracts/components/IComponent.sol +42 -17
- package/contracts/components/IDistributionComponent.sol +39 -7
- package/contracts/components/IPoolComponent.sol +121 -21
- package/contracts/components/IProductComponent.sol +3 -2
- package/contracts/components/Pool.sol +290 -120
- package/contracts/components/Product.sol +92 -69
- package/contracts/instance/BundleManager.sol +1 -1
- package/contracts/instance/IInstance.sol +21 -1
- package/contracts/instance/IInstanceService.sol +19 -2
- package/contracts/instance/Instance.sol +58 -36
- package/contracts/instance/InstanceAccessManager.sol +136 -253
- package/contracts/instance/InstanceService.sol +154 -137
- package/contracts/instance/InstanceServiceManager.sol +1 -1
- package/contracts/instance/base/ComponentService.sol +1 -1
- package/contracts/instance/module/IAccess.sol +10 -11
- package/contracts/instance/module/IBundle.sol +2 -1
- package/contracts/instance/module/IDistribution.sol +2 -0
- package/contracts/instance/module/IPolicy.sol +30 -3
- package/contracts/instance/module/ISetup.sol +10 -10
- package/contracts/instance/service/ApplicationService.sol +346 -0
- package/contracts/instance/service/ApplicationServiceManager.sol +35 -0
- package/contracts/instance/service/BundleService.sol +15 -9
- package/contracts/instance/service/BundleServiceManager.sol +1 -1
- package/contracts/instance/service/ClaimService.sol +151 -0
- package/contracts/instance/service/ClaimServiceManager.sol +35 -0
- package/contracts/instance/service/DistributionService.sol +303 -15
- package/contracts/instance/service/DistributionServiceManager.sol +1 -1
- package/contracts/instance/service/IApplicationService.sol +81 -0
- package/contracts/instance/service/IBundleService.sol +14 -3
- package/contracts/instance/service/IClaimService.sol +61 -0
- package/contracts/instance/service/IDistributionService.sol +74 -0
- package/contracts/instance/service/IPolicyService.sol +26 -50
- package/contracts/instance/service/PolicyService.sol +126 -260
- package/contracts/instance/service/PolicyServiceManager.sol +2 -2
- package/contracts/instance/service/PoolService.sol +2 -3
- package/contracts/instance/service/PoolServiceManager.sol +1 -1
- package/contracts/instance/service/ProductService.sol +9 -9
- package/contracts/instance/service/ProductServiceManager.sol +2 -2
- package/contracts/registry/IRegistry.sol +3 -4
- package/contracts/registry/IRegistryService.sol +10 -8
- package/contracts/registry/Registry.sol +28 -21
- package/contracts/registry/RegistryService.sol +69 -48
- package/contracts/registry/RegistryServiceManager.sol +13 -13
- package/contracts/registry/ReleaseManager.sol +18 -28
- package/contracts/registry/TokenRegistry.sol +16 -12
- package/contracts/shared/ERC165.sol +14 -12
- package/contracts/shared/INftOwnable.sol +11 -10
- package/contracts/shared/IPolicyHolder.sol +26 -0
- package/contracts/shared/IRegisterable.sol +3 -3
- package/contracts/shared/IRegistryLinked.sol +12 -0
- package/contracts/shared/IService.sol +2 -0
- package/contracts/shared/IVersionable.sol +4 -47
- package/contracts/shared/NftOwnable.sol +66 -85
- package/contracts/shared/PolicyHolder.sol +81 -0
- package/contracts/shared/ProxyManager.sol +100 -25
- package/contracts/shared/Registerable.sol +7 -19
- package/contracts/shared/RegistryLinked.sol +48 -0
- package/contracts/shared/Service.sol +15 -17
- package/contracts/shared/Versionable.sol +4 -92
- package/contracts/test/TestRegisterable.sol +1 -1
- package/contracts/test/TestService.sol +1 -1
- package/contracts/types/ClaimId.sol +52 -0
- package/contracts/types/DistributorType.sol +2 -2
- package/contracts/types/ObjectType.sol +9 -5
- package/contracts/types/PayoutId.sol +54 -0
- package/contracts/types/RoleId.sol +14 -12
- package/contracts/types/Seconds.sol +54 -0
- package/contracts/types/Timestamp.sol +12 -13
- package/package.json +1 -1
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.dbg.json +0 -4
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.json +0 -66
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.dbg.json +0 -4
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.json +0 -24
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.dbg.json +0 -4
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.json +0 -42
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +0 -4
- package/artifacts/contracts/experiment/errors/Require.sol/Require.json +0 -105
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +0 -4
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +0 -105
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/A.sol/A.json +0 -128
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +0 -42
- package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/B.sol/B.json +0 -76
- package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/C.sol/C.json +0 -89
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +0 -128
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +0 -37
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +0 -4
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +0 -63
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +0 -4
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +0 -59
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +0 -4
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +0 -124
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +0 -4
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +0 -74
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +0 -4
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +0 -124
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +0 -4
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +0 -207
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +0 -4
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +0 -10
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +0 -4
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +0 -10
- package/contracts/experiment/cloning/Cloner.sol +0 -47
- package/contracts/experiment/errors/Require.sol +0 -38
- package/contracts/experiment/errors/Revert.sol +0 -44
- package/contracts/experiment/inheritance/A.sol +0 -53
- package/contracts/experiment/inheritance/B.sol +0 -28
- package/contracts/experiment/inheritance/C.sol +0 -34
- package/contracts/experiment/inheritance/IA.sol +0 -13
- package/contracts/experiment/inheritance/IB.sol +0 -10
- package/contracts/experiment/inheritance/IC.sol +0 -12
- package/contracts/experiment/statemachine/Dummy.sol +0 -27
- package/contracts/experiment/statemachine/ISM.sol +0 -25
- package/contracts/experiment/statemachine/SM.sol +0 -57
- package/contracts/experiment/statemachine/SimpleStateMachine.sol +0 -31
- package/contracts/experiment/types/TypeA.sol +0 -47
- package/contracts/experiment/types/TypeB.sol +0 -29
@@ -4,21 +4,46 @@ pragma solidity ^0.8.19;
|
|
4
4
|
import {Fee} from "../types/Fee.sol";
|
5
5
|
import {IComponent} from "./IComponent.sol";
|
6
6
|
import {ISetup} from "../instance/module/ISetup.sol";
|
7
|
-
import {ReferralId} from "../types/Referral.sol";
|
7
|
+
import {ReferralId, ReferralStatus} from "../types/Referral.sol";
|
8
8
|
import {NftId} from "../types/NftId.sol";
|
9
|
+
import {DistributorType} from "../types/DistributorType.sol";
|
10
|
+
import {UFixed} from "../types/UFixed.sol";
|
11
|
+
import {Timestamp} from "../types/Timestamp.sol";
|
9
12
|
|
10
13
|
interface IDistributionComponent is IComponent {
|
11
14
|
|
15
|
+
event LogDistributorUpdated(address to, address caller);
|
16
|
+
|
12
17
|
function getSetupInfo() external view returns (ISetup.DistributionSetupInfo memory setupInfo);
|
13
18
|
|
14
19
|
function setFees(
|
20
|
+
Fee memory minDistributionOwnerFee,
|
15
21
|
Fee memory distributionFee
|
16
22
|
) external;
|
17
23
|
|
18
|
-
function
|
19
|
-
|
20
|
-
|
21
|
-
|
24
|
+
function createDistributorType(
|
25
|
+
string memory name,
|
26
|
+
UFixed minDiscountPercentage,
|
27
|
+
UFixed maxDiscountPercentage,
|
28
|
+
UFixed commissionPercentage,
|
29
|
+
uint32 maxReferralCount,
|
30
|
+
uint32 maxReferralLifetime,
|
31
|
+
bool allowSelfReferrals,
|
32
|
+
bool allowRenewals,
|
33
|
+
bytes memory data
|
34
|
+
) external returns (DistributorType distributorType);
|
35
|
+
|
36
|
+
function createDistributor(
|
37
|
+
address distributor,
|
38
|
+
DistributorType distributorType,
|
39
|
+
bytes memory data
|
40
|
+
) external returns(NftId distributorNftId);
|
41
|
+
|
42
|
+
function updateDistributorType(
|
43
|
+
NftId distributorNftId,
|
44
|
+
DistributorType distributorType,
|
45
|
+
bytes memory data
|
46
|
+
) external;
|
22
47
|
|
23
48
|
function calculateRenewalFeeAmount(
|
24
49
|
ReferralId referralId,
|
@@ -39,8 +64,15 @@ interface IDistributionComponent is IComponent {
|
|
39
64
|
uint256 feeAmount
|
40
65
|
) external;
|
41
66
|
|
42
|
-
|
43
|
-
|
67
|
+
function getDiscountPercentage(
|
68
|
+
string memory referralCode
|
69
|
+
) external view returns (UFixed discountPercentage, ReferralStatus status);
|
70
|
+
|
71
|
+
function getDistributionFee() external view returns (Fee memory distibutionFee);
|
72
|
+
|
73
|
+
function getReferralId(
|
74
|
+
string memory referralCode
|
75
|
+
) external returns (ReferralId referralId);
|
44
76
|
|
45
77
|
/// @dev returns true iff the component needs to be called when selling/renewing policis
|
46
78
|
function isVerifying() external view returns (bool verifying);
|
@@ -5,47 +5,147 @@ import {Fee} from "../types/Fee.sol";
|
|
5
5
|
import {IComponent} from "./IComponent.sol";
|
6
6
|
import {ISetup} from "../instance/module/ISetup.sol";
|
7
7
|
import {NftId} from "../types/NftId.sol";
|
8
|
+
import {RoleId} from "../types/RoleId.sol";
|
9
|
+
import {Seconds} from "../types/Seconds.sol";
|
8
10
|
import {UFixed} from "../types/UFixed.sol";
|
9
11
|
|
12
|
+
/// @dev pool components hold and manage the collateral to cover active policies
|
13
|
+
/// pools come in different flavors
|
10
14
|
interface IPoolComponent is IComponent {
|
11
15
|
|
12
|
-
|
16
|
+
error ErrorPoolNotBundleOwner(NftId bundleNftId, address caller);
|
17
|
+
error ErrorPoolNotPoolService(address caller);
|
13
18
|
|
14
|
-
|
19
|
+
error ErrorPoolApplicationBundleMismatch(NftId applicationNftId);
|
20
|
+
error ErrorPoolBundleOwnerRoleAlreadySet();
|
21
|
+
|
22
|
+
event LogPoolVerifiedByPool(address pool, NftId applicationNftId, uint256 collateralizationAmount);
|
23
|
+
event LogPoolBundleMaxCapitalAmountUpdated(uint256 previousMaxCapitalAmount, uint256 currentMaxCapitalAmount);
|
24
|
+
event LogPoolBundleOwnerRoleSet(RoleId bundleOwnerRole);
|
25
|
+
|
26
|
+
/// @dev increases the staked tokens by the specified amount
|
27
|
+
/// only the bundle owner may stake tokens
|
28
|
+
/// bundle MUST be in active or locked state
|
29
|
+
function stake(NftId bundleNftId, uint256 amount) external;
|
30
|
+
|
31
|
+
/// @dev decreases the staked tokens by the specified amount
|
32
|
+
/// only the bundle owner may unstake tokens from the bundle
|
33
|
+
/// bundle MUST be in active, locked or closed state
|
34
|
+
function unstake(NftId bundleNftId, uint256 amount) external;
|
35
|
+
|
36
|
+
/// @dev extends the bundle lifetime of the bundle by the specified time
|
37
|
+
/// only the bundle owner may extend the bundle's lifetime
|
38
|
+
/// bundle MUST be in active or locked state
|
39
|
+
function extend(NftId bundleNftId, Seconds lifetimeExtension) external;
|
40
|
+
|
41
|
+
/// @dev locks the specified bundle
|
42
|
+
/// a bundle to be locked MUST be in active state
|
43
|
+
/// locked bundles may not be used to underwrite any new policy
|
44
|
+
function lockBundle(NftId bundleNftId) external;
|
45
|
+
|
46
|
+
/// @dev unlocks the specified bundle
|
47
|
+
/// a bundle to be unlocked MUST be in locked state
|
48
|
+
function unlockBundle(NftId bundleNftId) external;
|
15
49
|
|
50
|
+
/// @dev close the specified bundle
|
51
|
+
/// a bundle to be closed MUST be in active or locked state
|
52
|
+
/// to close a bundle all all linked policies MUST be in closed state as well
|
53
|
+
/// closing a bundle finalizes the bundle bookkeeping including overall profit calculation
|
54
|
+
/// once a bundle is closed this action cannot be reversed
|
55
|
+
function close(NftId bundleNftId) external;
|
56
|
+
|
57
|
+
/// @dev sets the fee for the specified bundle
|
58
|
+
/// the fee is added on top of the poolFee and deducted from the premium amounts
|
59
|
+
/// via these fees individual bundler owner may earn income per policy in the context of peer to peer pools
|
60
|
+
function setBundleFee(
|
61
|
+
NftId bundleNftId,
|
62
|
+
Fee memory fee
|
63
|
+
) external;
|
64
|
+
|
65
|
+
/// @dev sets the maximum overall capital amound held by this pool
|
66
|
+
/// function may only be called by pool owner
|
67
|
+
function setMaxCapitalAmount(uint256 maxCapitalAmount) external;
|
68
|
+
|
69
|
+
/// @dev sets the required role to create/own bundles
|
70
|
+
/// may only be called once after setting up a pool
|
71
|
+
/// may only be called by pool owner
|
72
|
+
function setBundleOwnerRole(RoleId bundleOwnerRole) external;
|
73
|
+
|
74
|
+
/// @dev update pool fees to the specified values
|
75
|
+
/// pool fees: are deducted from the premium amount and goes to the pool owner
|
76
|
+
/// staking fees: are deducted from the staked tokens by a bundle owner and goes to the pool owner
|
77
|
+
/// performance fees: when a bundle is closed a bundle specific profit is calculated
|
78
|
+
/// the performance fee is deducted from this profit and goes to the pool owner
|
16
79
|
function setFees(
|
17
80
|
Fee memory poolFee,
|
18
81
|
Fee memory stakingFee,
|
19
82
|
Fee memory performanceFee
|
20
83
|
) external;
|
21
84
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
NftId
|
30
|
-
bytes memory policyData,
|
85
|
+
/// @dev this is a callback function that is called by the product service when underwriting a policy.
|
86
|
+
/// the pool has the option to check the details and object to underwriting by reverting.
|
87
|
+
/// the function is only called for "active" pools that ask to be involved/notified
|
88
|
+
/// by product related state changes.
|
89
|
+
function verifyApplication(
|
90
|
+
NftId applicationNftId,
|
91
|
+
bytes memory applicationData,
|
92
|
+
NftId bundleNftId,
|
31
93
|
bytes memory bundleFilter,
|
32
94
|
uint256 collateralizationAmount
|
33
95
|
) external;
|
34
96
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
97
|
+
/// @dev defines the multiplier to calculate the required collateral to cover a given sum insured amount
|
98
|
+
/// default implementation returns 100%
|
99
|
+
function getCollateralizationLevel() external view returns (UFixed collateralizationLevel);
|
100
|
+
|
101
|
+
/// @dev defines the amount of collateral held in the pool.
|
102
|
+
/// if the value is < 100% the pool is required to hold a policy that covers the locally missing collateral
|
103
|
+
/// default implementation returns 100%
|
104
|
+
function getRetentionLevel() external view returns (UFixed retentionLevel);
|
105
|
+
|
106
|
+
/// @dev declares if pool relies on external management of collateral (yes/no):
|
107
|
+
/// - yes: underwriting of new policies does not require an actual token balance, instead it is assumed that the pool owner will manage funds externally and inject enough tokens to allow process confirmed payouts
|
108
|
+
/// - no: the pool smart contract ensures that the necessary capacity of the pool prior to underwriting.
|
109
|
+
/// default implementation returns false (no)
|
110
|
+
function isExternallyManaged() external view returns (bool);
|
111
|
+
|
112
|
+
/// @dev declares if pool component is actively involved in underwriting (yes/no):
|
113
|
+
/// - yes: verifying pools components actively confirm underwriting applications, ie the pool component logic explicitly needs to confirm the locking of collateral to cover the sum insured of the policy
|
114
|
+
/// - no: underwriting a policy does not require any interaction with the pool component if the covering bundle can provide the necessary captial
|
115
|
+
/// default implementation returnsfalse (no)
|
116
|
+
function isVerifyingApplications() external view returns (bool);
|
117
|
+
|
118
|
+
/// @dev returns the maximum overall capital amound held by this pool
|
119
|
+
function getMaxCapitalAmount() external view returns (uint256 maxCapitalAmount);
|
120
|
+
|
121
|
+
/// @dev declares if pool intercept transfers of bundle nft ids
|
122
|
+
/// - yes: pool may block transfer of bundle ownership or simply updates some bookkeeping related to bundle ownership. callback function is nftTransferFrom
|
123
|
+
/// - no: pool is not involved in transfer of bundle ownership
|
124
|
+
/// default implementation returns false (no)
|
125
|
+
function isInterceptingBundleTransfers() external view returns (bool);
|
126
|
+
|
127
|
+
/// @dev returns the required role for bundle owners
|
128
|
+
/// default emplementation returns PUBLIC_ROLE
|
129
|
+
/// the PUBLIC_ROLE role implies that no specific roole is required for bundle owners
|
130
|
+
function getBundleOwnerRole() external view returns (RoleId bundleOwnerRole);
|
131
|
+
|
132
|
+
/// @dev returns true iff the application matches with the bundle
|
133
|
+
/// this is a callback function that is only called if a pool declares itself as a verifying pool
|
134
|
+
/// default implementation returns true
|
135
|
+
function applicationMatchesBundle(
|
136
|
+
NftId applicationNftId,
|
137
|
+
bytes memory applicationData,
|
138
|
+
NftId bundleNftId,
|
139
|
+
bytes memory bundleFilter,
|
140
|
+
uint256 collateralizationAmount
|
42
141
|
)
|
43
142
|
external
|
44
143
|
view
|
45
144
|
returns (bool isMatching);
|
46
145
|
|
47
|
-
|
48
|
-
|
49
|
-
|
146
|
+
/// @dev returns setup infos for this pool
|
147
|
+
/// when registered with an instance the setup info is obtained from the data stored in the instance
|
148
|
+
/// when not registered the function returns the initial setup info
|
149
|
+
function getSetupInfo() external view returns (ISetup.PoolSetupInfo memory setupInfo);
|
50
150
|
|
51
151
|
}
|
@@ -7,6 +7,7 @@ import {ISetup} from "../instance/module/ISetup.sol";
|
|
7
7
|
import {NftId} from "../types/NftId.sol";
|
8
8
|
import {ReferralId} from "../types/Referral.sol";
|
9
9
|
import {RiskId} from "../types/RiskId.sol";
|
10
|
+
import {Seconds} from "../types/Seconds.sol";
|
10
11
|
|
11
12
|
interface IProductComponent is IComponent {
|
12
13
|
|
@@ -20,7 +21,7 @@ interface IProductComponent is IComponent {
|
|
20
21
|
function calculatePremium(
|
21
22
|
uint256 sumInsuredAmount,
|
22
23
|
RiskId riskId,
|
23
|
-
|
24
|
+
Seconds lifetime,
|
24
25
|
bytes memory applicationData,
|
25
26
|
NftId bundleNftId,
|
26
27
|
ReferralId referralId
|
@@ -29,7 +30,7 @@ interface IProductComponent is IComponent {
|
|
29
30
|
function calculateNetPremium(
|
30
31
|
uint256 sumInsuredAmount,
|
31
32
|
RiskId riskId,
|
32
|
-
|
33
|
+
Seconds lifetime,
|
33
34
|
bytes memory applicationData
|
34
35
|
) external view returns (uint256 netPremiumAmount);
|
35
36
|
|