@etherisc/gif-next 0.0.2-f18fb8b-243 → 0.0.2-f1e0c66-773
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +14 -2
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +2 -2
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +2 -2
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.json +2 -2
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +2 -2
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +69 -26
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +16 -16
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +43 -0
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +237 -74
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +66 -38
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +43 -0
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +102 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +4 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +703 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +6 -6
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +5 -5
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +9 -9
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +73 -73
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +31 -31
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +54 -59
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +15 -15
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +6 -6
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +66 -76
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +2 -2
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +2 -2
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +4 -0
- package/artifacts/contracts/instance/base/{ObjectManager.sol/ObjectManager.json → ObjectSet.sol/ObjectSet.json} +6 -6
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.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/mock/Dip.sol/Dip.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +46 -16
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +2 -2
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +30 -0
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +30 -0
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +2 -2
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +2 -2
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +43 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +16 -16
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +221 -55
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +55 -23
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +102 -0
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +43 -0
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +43 -0
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +2 -2
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +2 -2
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +2 -2
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +2 -2
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +19 -0
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +16 -16
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +2 -2
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +2 -2
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +13 -0
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +19 -0
- package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +64 -51
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +26 -26
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +7 -2
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +2 -2
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +19 -0
- package/artifacts/contracts/product/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/product/ProductService.sol/ProductService.json +2 -2
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +2 -2
- 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 +50 -2
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +0 -183
- 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 +95 -23
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +88 -88
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +2 -2
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +2 -2
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +2 -2
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +1159 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +6 -6
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +2 -2
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +271 -62
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +60 -32
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +153 -0
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +19 -0
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +4 -0
- package/artifacts/contracts/shared/{ERC165.sol/ERC165.json → InitializableERC165.sol/InitializableERC165.json} +4 -4
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +19 -0
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +4 -0
- package/artifacts/contracts/shared/{NftIdSetManager.sol/NftIdSetManager.json → NftIdSet.sol/NftIdSet.json} +4 -4
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +2 -2
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +2 -2
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +2 -2
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +2 -2
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +12 -2
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +36 -36
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +2 -2
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +19 -19
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +2 -2
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +2 -2
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +2 -2
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +20 -15
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +7 -2
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.json +37 -8
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +2 -2
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +2 -2
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.json +7 -2
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32.sol/Key32Lib.json +2 -2
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.json +2 -2
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.json +2 -2
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.json +2 -2
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +2 -2
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +2 -2
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +2 -2
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +2 -2
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +2 -2
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/MathLib.json +9 -3
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +39 -2
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.json +2 -2
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.json +21 -2
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/IVersionable.sol/IVersionable.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/ProxyManager.sol/ProxyManager.json +3 -3
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +3 -3
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/Versionable.sol/Versionable.json +1 -1
- package/contracts/distribution/BasicDistribution.sol +4 -15
- package/contracts/distribution/BasicDistributionAuthorization.sol +5 -1
- package/contracts/distribution/Distribution.sol +22 -10
- package/contracts/distribution/DistributionService.sol +61 -26
- package/contracts/distribution/DistributionServiceManager.sol +2 -5
- package/contracts/distribution/IDistributionComponent.sol +8 -4
- package/contracts/distribution/IDistributionService.sol +12 -0
- package/contracts/instance/{BundleManager.sol → BundleSet.sol} +23 -23
- package/contracts/instance/IInstance.sol +5 -5
- package/contracts/instance/IInstanceService.sol +5 -5
- package/contracts/instance/Instance.sol +4 -4
- package/contracts/instance/InstanceAdmin.sol +2 -2
- package/contracts/instance/InstanceAuthorizationV3.sol +13 -11
- package/contracts/instance/InstanceService.sol +10 -10
- package/contracts/instance/InstanceServiceManager.sol +2 -6
- package/contracts/instance/InstanceStore.sol +2 -1
- package/contracts/instance/base/{ObjectManager.sol → ObjectSet.sol} +5 -5
- package/contracts/instance/module/IComponents.sol +0 -1
- package/contracts/instance/module/IDistribution.sol +0 -1
- package/contracts/oracle/IOracleComponent.sol +2 -1
- package/contracts/oracle/Oracle.sol +15 -6
- package/contracts/oracle/OracleServiceManager.sol +2 -5
- package/contracts/pool/BasicPoolAuthorization.sol +6 -0
- package/contracts/pool/BundleService.sol +72 -27
- package/contracts/pool/BundleServiceManager.sol +2 -5
- package/contracts/pool/IBundleService.sol +14 -0
- package/contracts/pool/IPoolComponent.sol +6 -0
- package/contracts/pool/Pool.sol +18 -1
- package/contracts/pool/PoolService.sol +11 -29
- package/contracts/pool/PoolServiceManager.sol +2 -5
- package/contracts/product/ApplicationService.sol +12 -36
- package/contracts/product/ApplicationServiceManager.sol +2 -2
- package/contracts/product/BasicProduct.sol +3 -33
- package/contracts/product/BasicProductAuthorization.sol +3 -0
- package/contracts/product/ClaimService.sol +7 -32
- package/contracts/product/ClaimServiceManager.sol +2 -2
- package/contracts/product/IPolicyService.sol +2 -0
- package/contracts/product/IProductComponent.sol +1 -0
- package/contracts/product/PolicyService.sol +28 -4
- package/contracts/product/PolicyServiceManager.sol +2 -5
- package/contracts/product/PricingServiceManager.sol +2 -5
- package/contracts/product/Product.sol +10 -1
- package/contracts/product/ProductService.sol +7 -32
- package/contracts/product/ProductServiceManager.sol +2 -5
- package/contracts/registry/IRegistry.sol +26 -13
- package/contracts/registry/IRegistryService.sol +6 -6
- package/contracts/registry/Registry.sol +80 -82
- package/contracts/registry/RegistryAdmin.sol +23 -23
- package/contracts/registry/RegistryService.sol +4 -18
- package/contracts/registry/RegistryServiceManager.sol +2 -2
- package/contracts/registry/{ReleaseManager.sol → ReleaseRegistry.sol} +48 -50
- package/contracts/registry/ServiceAuthorizationV3.sol +5 -5
- package/contracts/registry/TokenRegistry.sol +2 -2
- package/contracts/shared/Component.sol +13 -14
- package/contracts/shared/ComponentService.sol +82 -12
- package/contracts/shared/ComponentServiceManager.sol +2 -2
- package/contracts/shared/IComponentService.sol +15 -9
- package/contracts/shared/IInstanceLinkedComponent.sol +6 -0
- package/contracts/shared/IService.sol +1 -1
- package/contracts/shared/{ERC165.sol → InitializableERC165.sol} +1 -1
- package/contracts/shared/InstanceLinkedComponent.sol +21 -0
- package/contracts/shared/{NftIdSetManager.sol → NftIdSet.sol} +1 -1
- package/contracts/shared/NftOwnable.sol +2 -2
- package/contracts/shared/PolicyHolder.sol +2 -5
- package/contracts/shared/Service.sol +3 -4
- package/contracts/staking/IStaking.sol +1 -2
- package/contracts/staking/IStakingService.sol +12 -5
- package/contracts/staking/Staking.sol +20 -17
- package/contracts/staking/StakingManager.sol +2 -6
- package/contracts/staking/StakingReader.sol +12 -16
- package/contracts/staking/StakingServiceManager.sol +2 -2
- package/contracts/staking/StakingStore.sol +12 -22
- package/contracts/type/Amount.sol +12 -5
- package/contracts/type/ObjectType.sol +3 -7
- package/contracts/type/Referral.sol +1 -0
- package/contracts/type/UFixed.sol +29 -10
- package/contracts/type/Version.sol +3 -1
- package/contracts/{shared → upgradeability}/ProxyManager.sol +3 -4
- package/contracts/{shared → upgradeability}/UpgradableProxyWithAdmin.sol +1 -3
- package/package.json +1 -1
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +0 -4
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +0 -703
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +0 -1159
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +0 -4
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +0 -4
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.dbg.json +0 -4
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +0 -4
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +0 -4
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +0 -4
- /package/contracts/{shared → upgradeability}/IVersionable.sol +0 -0
- /package/contracts/{shared → upgradeability}/Versionable.sol +0 -0
@@ -1,46 +1,30 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {
|
5
|
-
import {IRegistry} from "../registry/IRegistry.sol";
|
6
|
-
import {IInstance} from "../instance/IInstance.sol";
|
7
|
-
import {IBundle} from "../instance/module/IBundle.sol";
|
4
|
+
import {IBundleService} from "./IBundleService.sol";
|
8
5
|
import {IComponents} from "../instance/module/IComponents.sol";
|
6
|
+
import {IComponentService} from "../shared/IComponentService.sol";
|
7
|
+
import {IInstance} from "../instance/IInstance.sol";
|
8
|
+
import {IInstanceService} from "../instance/IInstanceService.sol";
|
9
9
|
import {IPolicy} from "../instance/module/IPolicy.sol";
|
10
|
-
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
import {
|
10
|
+
import {IPoolService} from "./IPoolService.sol";
|
11
|
+
import {IRegistry} from "../registry/IRegistry.sol";
|
12
|
+
import {IRegistryService} from "../registry/IRegistryService.sol";
|
13
|
+
import {IStaking} from "../staking/IStaking.sol";
|
14
14
|
|
15
15
|
import {Amount, AmountLib} from "../type/Amount.sol";
|
16
16
|
import {Fee, FeeLib} from "../type/Fee.sol";
|
17
17
|
import {NftId, NftIdLib} from "../type/NftId.sol";
|
18
|
-
import {ObjectType, POOL, BUNDLE, COMPONENT, INSTANCE, REGISTRY
|
18
|
+
import {ObjectType, POOL, BUNDLE, COMPONENT, INSTANCE, REGISTRY} from "../type/ObjectType.sol";
|
19
19
|
import {RoleId, PUBLIC_ROLE} from "../type/RoleId.sol";
|
20
20
|
import {Fee, FeeLib} from "../type/Fee.sol";
|
21
|
-
import {
|
22
|
-
import {KEEP_STATE, StateId} from "../type/StateId.sol";
|
21
|
+
import {KEEP_STATE} from "../type/StateId.sol";
|
23
22
|
import {Seconds} from "../type/Seconds.sol";
|
24
|
-
import {TimestampLib, zeroTimestamp} from "../type/Timestamp.sol";
|
25
23
|
import {TokenHandler} from "../shared/TokenHandler.sol";
|
26
24
|
import {UFixed} from "../type/UFixed.sol";
|
27
|
-
import {Version, VersionLib} from "../type/Version.sol";
|
28
|
-
|
29
|
-
import {IService} from "../shared/IService.sol";
|
30
|
-
import {Service} from "../shared/Service.sol";
|
31
|
-
import {BundleManager} from "../instance/BundleManager.sol";
|
32
25
|
import {ComponentVerifyingService} from "../shared/ComponentVerifyingService.sol";
|
33
|
-
import {IBundleService} from "./IBundleService.sol";
|
34
|
-
import {IComponentService} from "../shared/IComponentService.sol";
|
35
|
-
import {IInstanceService} from "../instance/IInstanceService.sol";
|
36
|
-
import {IPoolService} from "./IPoolService.sol";
|
37
|
-
import {IRegistryService} from "../registry/IRegistryService.sol";
|
38
|
-
import {IStaking} from "../staking/IStaking.sol";
|
39
|
-
import {InstanceService} from "../instance/InstanceService.sol";
|
40
26
|
import {InstanceReader} from "../instance/InstanceReader.sol";
|
41
27
|
import {InstanceStore} from "../instance/InstanceStore.sol";
|
42
|
-
import {IComponent} from "../shared/IComponent.sol";
|
43
|
-
import {IPoolComponent} from "./IPoolComponent.sol";
|
44
28
|
|
45
29
|
string constant POOL_SERVICE_NAME = "PoolService";
|
46
30
|
|
@@ -48,9 +32,6 @@ contract PoolService is
|
|
48
32
|
ComponentVerifyingService,
|
49
33
|
IPoolService
|
50
34
|
{
|
51
|
-
using NftIdLib for NftId;
|
52
|
-
using AmountLib for Amount;
|
53
|
-
|
54
35
|
IBundleService internal _bundleService;
|
55
36
|
IComponentService internal _componentService;
|
56
37
|
IInstanceService private _instanceService;
|
@@ -439,6 +420,7 @@ contract PoolService is
|
|
439
420
|
address poolWallet = componentInfo.wallet;
|
440
421
|
|
441
422
|
if(amount.gtz()) {
|
423
|
+
// TODO: centralize token handling (issue #471)
|
442
424
|
tokenHandler.transfer(
|
443
425
|
bundleOwner,
|
444
426
|
poolWallet,
|
@@ -1,12 +1,9 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IVersionable} from "../
|
5
|
-
import {ProxyManager} from "../
|
4
|
+
import {IVersionable} from "../upgradeability/IVersionable.sol";
|
5
|
+
import {ProxyManager} from "../upgradeability/ProxyManager.sol";
|
6
6
|
import {PoolService} from "./PoolService.sol";
|
7
|
-
import {Registry} from "../registry/Registry.sol";
|
8
|
-
import {RegistryService} from "../registry/RegistryService.sol";
|
9
|
-
import {REGISTRY} from "../type/ObjectType.sol";
|
10
7
|
|
11
8
|
contract PoolServiceManager is ProxyManager {
|
12
9
|
|
@@ -1,51 +1,27 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
+
import {IApplicationService} from "./IApplicationService.sol";
|
5
|
+
import {IComponents} from "../instance/module/IComponents.sol";
|
6
|
+
import {IInstance} from "../instance/IInstance.sol";
|
7
|
+
import {IRegistry} from "../registry/IRegistry.sol";
|
8
|
+
import {IPolicy} from "../instance/module/IPolicy.sol";
|
9
|
+
import {IDistributionService} from "../distribution/IDistributionService.sol";
|
10
|
+
import {IPricingService} from "./IPricingService.sol";
|
11
|
+
import {IRegistryService} from "../registry/IRegistryService.sol";
|
12
|
+
|
4
13
|
import {AmountLib} from "../type/Amount.sol";
|
5
14
|
import {Seconds} from "../type/Seconds.sol";
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {ObjectType, DISTRIBUTION, INSTANCE, PRODUCT, POOL, REGISTRY, APPLICATION, POLICY, BUNDLE, PRICE} from "../type/ObjectType.sol";
|
10
|
-
import {APPLIED, REVOKED, ACTIVE, KEEP_STATE} from "../type/StateId.sol";
|
15
|
+
import {zeroTimestamp} from "../type/Timestamp.sol";
|
16
|
+
import {ObjectType, DISTRIBUTION, PRODUCT, REGISTRY, APPLICATION, POLICY, PRICE} from "../type/ObjectType.sol";
|
17
|
+
import {REVOKED} from "../type/StateId.sol";
|
11
18
|
import {NftId, NftIdLib} from "../type/NftId.sol";
|
12
|
-
import {Fee, FeeLib} from "../type/Fee.sol";
|
13
19
|
import {ReferralId} from "../type/Referral.sol";
|
14
20
|
import {RiskId} from "../type/RiskId.sol";
|
15
|
-
import {StateId} from "../type/StateId.sol";
|
16
|
-
import {Version, VersionLib} from "../type/Version.sol";
|
17
21
|
import {Amount, AmountLib} from "../type/Amount.sol";
|
18
|
-
|
19
|
-
import {TokenHandler} from "../shared/TokenHandler.sol";
|
20
|
-
import {IVersionable} from "../shared/IVersionable.sol";
|
21
|
-
import {Versionable} from "../shared/Versionable.sol";
|
22
|
-
import {IService} from "../shared/IService.sol";
|
23
|
-
import {Service} from "../shared/Service.sol";
|
24
|
-
|
25
|
-
import {IRegistry} from "../registry/IRegistry.sol";
|
26
|
-
|
27
|
-
import {IProductComponent} from "./IProductComponent.sol";
|
28
|
-
import {IPoolComponent} from "../pool/IPoolComponent.sol";
|
29
|
-
import {IDistributionComponent} from "../distribution/IDistributionComponent.sol";
|
30
|
-
import {Product} from "./Product.sol";
|
31
|
-
|
32
|
-
import {IComponents} from "../instance/module/IComponents.sol";
|
33
|
-
import {IPolicy} from "../instance/module/IPolicy.sol";
|
34
|
-
import {IRisk} from "../instance/module/IRisk.sol";
|
35
|
-
import {IBundle} from "../instance/module/IBundle.sol";
|
36
|
-
import {IProductService} from "./IProductService.sol";
|
37
|
-
|
38
22
|
import {ComponentVerifyingService} from "../shared/ComponentVerifyingService.sol";
|
39
|
-
|
40
|
-
import {IInstance} from "../instance/IInstance.sol";
|
41
23
|
import {InstanceReader} from "../instance/InstanceReader.sol";
|
42
24
|
|
43
|
-
import {IApplicationService} from "./IApplicationService.sol";
|
44
|
-
import {IBundleService} from "../pool/IBundleService.sol";
|
45
|
-
import {IDistributionService} from "../distribution/IDistributionService.sol";
|
46
|
-
import {IPoolService} from "../pool/IPoolService.sol";
|
47
|
-
import {IPricingService} from "./IPricingService.sol";
|
48
|
-
import {IRegistryService} from "../registry/IRegistryService.sol";
|
49
25
|
|
50
26
|
|
51
27
|
contract ApplicationService is
|
@@ -1,8 +1,8 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IVersionable} from "../
|
5
|
-
import {ProxyManager} from "../
|
4
|
+
import {IVersionable} from "../upgradeability/IVersionable.sol";
|
5
|
+
import {ProxyManager} from "../upgradeability/ProxyManager.sol";
|
6
6
|
import {ApplicationService} from "./ApplicationService.sol";
|
7
7
|
|
8
8
|
contract ApplicationServiceManager is ProxyManager {
|
@@ -1,43 +1,15 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {
|
5
|
-
|
6
|
-
import {Amount, AmountLib} from "../type/Amount.sol";
|
7
|
-
import {ClaimId} from "../type/ClaimId.sol";
|
8
|
-
import {InstanceLinkedComponent} from "../shared/InstanceLinkedComponent.sol";
|
9
|
-
import {Fee, FeeLib} from "../type/Fee.sol";
|
10
|
-
import {IRisk} from "../instance/module/IRisk.sol";
|
11
|
-
import {IApplicationService} from "./IApplicationService.sol";
|
4
|
+
import {Fee} from "../type/Fee.sol";
|
12
5
|
import {IAuthorization} from "../authorization/IAuthorization.sol";
|
13
|
-
import {
|
14
|
-
import {IPolicyService} from "./IPolicyService.sol";
|
15
|
-
import {IProductService} from "./IProductService.sol";
|
16
|
-
import {IClaimService} from "./IClaimService.sol";
|
17
|
-
import {IPricingService} from "./IPricingService.sol";
|
18
|
-
import {IProductComponent} from "./IProductComponent.sol";
|
19
|
-
import {NftId, NftIdLib} from "../type/NftId.sol";
|
6
|
+
import {NftId} from "../type/NftId.sol";
|
20
7
|
import {Product} from "../product/Product.sol";
|
21
|
-
import {PayoutId} from "../type/PayoutId.sol";
|
22
|
-
import {COMPONENT, PRODUCT, APPLICATION, POLICY, CLAIM, PRICE } from "../type/ObjectType.sol";
|
23
|
-
import {ReferralId} from "../type/Referral.sol";
|
24
|
-
import {RiskId, RiskIdLib} from "../type/RiskId.sol";
|
25
|
-
import {Seconds} from "../type/Seconds.sol";
|
26
|
-
import {StateId} from "../type/StateId.sol";
|
27
|
-
import {Timestamp} from "../type/Timestamp.sol";
|
28
|
-
|
29
|
-
import {TokenHandler} from "../shared/TokenHandler.sol";
|
30
|
-
|
31
|
-
import {InstanceReader} from "../instance/InstanceReader.sol";
|
32
|
-
import {IPolicy} from "../instance/module/IPolicy.sol";
|
33
|
-
import {IComponents} from "../instance/module/IComponents.sol";
|
34
|
-
import {Pool} from "../pool/Pool.sol";
|
35
|
-
import {Distribution} from "../distribution/Distribution.sol";
|
36
8
|
|
37
9
|
abstract contract BasicProduct is
|
38
10
|
Product
|
39
11
|
{
|
40
|
-
|
12
|
+
|
41
13
|
function setFees(
|
42
14
|
Fee memory productFee,
|
43
15
|
Fee memory processingFee
|
@@ -49,8 +21,6 @@ abstract contract BasicProduct is
|
|
49
21
|
{
|
50
22
|
_setFees(productFee, processingFee);
|
51
23
|
}
|
52
|
-
|
53
|
-
|
54
24
|
function _initializeBasicProduct(
|
55
25
|
address registry,
|
56
26
|
NftId instanceNftId,
|
@@ -5,6 +5,7 @@ import {Authorization} from "../authorization/Authorization.sol";
|
|
5
5
|
import {BasicProduct} from "./BasicProduct.sol";
|
6
6
|
import {PRODUCT} from "../type/ObjectType.sol";
|
7
7
|
import {IAccess} from "../authorization/IAccess.sol";
|
8
|
+
import {IInstanceLinkedComponent} from "../shared/IInstanceLinkedComponent.sol";
|
8
9
|
import {PUBLIC_ROLE} from "../../contracts/type/RoleId.sol";
|
9
10
|
import {RoleId} from "../type/RoleId.sol";
|
10
11
|
|
@@ -35,6 +36,8 @@ contract BasicProductAuthorization
|
|
35
36
|
// authorize public role (open access to any account, only allows to lock target)
|
36
37
|
functions = _authorizeForTarget(getTargetName(), PUBLIC_ROLE());
|
37
38
|
_authorize(functions, BasicProduct.setFees.selector, "setFees");
|
39
|
+
|
40
|
+
_authorize(functions, IInstanceLinkedComponent.withdrawFees.selector, "withdrawFees");
|
38
41
|
}
|
39
42
|
}
|
40
43
|
|
@@ -1,48 +1,22 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IRisk} from "../instance/module/IRisk.sol";
|
5
|
-
import {IService} from "./IApplicationService.sol";
|
6
|
-
|
7
4
|
import {IComponents} from "../instance/module/IComponents.sol";
|
8
|
-
import {IRegistry} from "../registry/IRegistry.sol";
|
9
|
-
import {IProductComponent} from "./IProductComponent.sol";
|
10
|
-
import {Product} from "./Product.sol";
|
11
|
-
import {IPoolComponent} from "../pool/IPoolComponent.sol";
|
12
|
-
import {IDistributionComponent} from "../distribution/IDistributionComponent.sol";
|
13
5
|
import {IInstance} from "../instance/IInstance.sol";
|
14
6
|
import {IPolicy} from "../instance/module/IPolicy.sol";
|
15
|
-
import {IRisk} from "../instance/module/IRisk.sol";
|
16
|
-
import {IBundle} from "../instance/module/IBundle.sol";
|
17
|
-
import {IProductService} from "./IProductService.sol";
|
18
|
-
|
19
|
-
import {TokenHandler} from "../shared/TokenHandler.sol";
|
20
|
-
|
21
|
-
import {IVersionable} from "../shared/IVersionable.sol";
|
22
|
-
import {Versionable} from "../shared/Versionable.sol";
|
23
|
-
|
24
7
|
import {Amount, AmountLib} from "../type/Amount.sol";
|
25
|
-
import {
|
26
|
-
import {
|
27
|
-
import {
|
28
|
-
import {
|
29
|
-
import {
|
30
|
-
import {NftId, NftIdLib} from "../type/NftId.sol";
|
31
|
-
import {Fee, FeeLib} from "../type/Fee.sol";
|
32
|
-
import {ReferralId} from "../type/Referral.sol";
|
33
|
-
import {RiskId} from "../type/RiskId.sol";
|
8
|
+
import {TimestampLib} from "../type/Timestamp.sol";
|
9
|
+
import {ObjectType, CLAIM, PRODUCT, POOL} from "../type/ObjectType.sol";
|
10
|
+
import {SUBMITTED, KEEP_STATE, DECLINED, CONFIRMED, CLOSED, PAID} from "../type/StateId.sol";
|
11
|
+
import {NftId} from "../type/NftId.sol";
|
12
|
+
import {FeeLib} from "../type/Fee.sol";
|
34
13
|
import {StateId} from "../type/StateId.sol";
|
35
14
|
import {ClaimId, ClaimIdLib} from "../type/ClaimId.sol";
|
36
15
|
import {PayoutId, PayoutIdLib} from "../type/PayoutId.sol";
|
37
|
-
import {Version, VersionLib} from "../type/Version.sol";
|
38
|
-
|
39
16
|
import {ComponentVerifyingService} from "../shared/ComponentVerifyingService.sol";
|
40
17
|
import {InstanceReader} from "../instance/InstanceReader.sol";
|
41
|
-
import {IBundleService} from "../pool/IBundleService.sol";
|
42
18
|
import {IClaimService} from "./IClaimService.sol";
|
43
19
|
import {IPoolService} from "../pool/IPoolService.sol";
|
44
|
-
import {IService} from "../shared/IService.sol";
|
45
|
-
import {Service} from "../shared/Service.sol";
|
46
20
|
|
47
21
|
|
48
22
|
contract ClaimService is
|
@@ -362,7 +336,8 @@ contract ClaimService is
|
|
362
336
|
// TODO transfer processing fees to product wallet
|
363
337
|
// TODO inform product to update fee book keeping
|
364
338
|
}
|
365
|
-
|
339
|
+
|
340
|
+
// TODO: centralize token handling (issue #471)
|
366
341
|
poolInfo.tokenHandler.transfer(
|
367
342
|
poolInfo.wallet,
|
368
343
|
beneficiary,
|
@@ -1,8 +1,8 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IVersionable} from "../
|
5
|
-
import {ProxyManager} from "../
|
4
|
+
import {IVersionable} from "../upgradeability/IVersionable.sol";
|
5
|
+
import {ProxyManager} from "../upgradeability/ProxyManager.sol";
|
6
6
|
import {ClaimService} from "./ClaimService.sol";
|
7
7
|
|
8
8
|
contract ClaimServiceManager is ProxyManager {
|
@@ -38,6 +38,8 @@ interface IPolicyService is IService {
|
|
38
38
|
error ErrorPolicyServicePremiumMismatch(NftId policyNftId, Amount expectedPremiumAmount, Amount recalculatedPremiumAmount);
|
39
39
|
error ErrorPolicyServiceTransferredPremiumMismatch(NftId policyNftId, Amount expectedPremiumAmount, Amount transferredPremiumAmount);
|
40
40
|
|
41
|
+
event LogPolicyServicePolicyDeclined(NftId policyNftId);
|
42
|
+
|
41
43
|
/// @dev collateralizes the policy represented by {policyNftId}
|
42
44
|
/// sets the policy state to collateralized
|
43
45
|
/// may set the policy state to activated and set the activation date
|
@@ -90,15 +90,38 @@ contract PolicyService is
|
|
90
90
|
(, productInfo,) = _getAndVerifyActiveComponent(PRODUCT());
|
91
91
|
product = Product(productInfo.objectAddress);
|
92
92
|
}
|
93
|
-
|
93
|
+
|
94
94
|
|
95
95
|
function decline(
|
96
|
-
NftId policyNftId
|
96
|
+
NftId applicationNftId // = policyNftId
|
97
97
|
)
|
98
98
|
external
|
99
|
-
override
|
99
|
+
virtual override
|
100
100
|
{
|
101
|
-
|
101
|
+
(NftId productNftId,, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
102
|
+
InstanceReader instanceReader = instance.getInstanceReader();
|
103
|
+
|
104
|
+
// check policy is in state applied
|
105
|
+
if (instanceReader.getPolicyState(applicationNftId) != APPLIED()) {
|
106
|
+
revert ErrorPolicyServicePolicyStateNotApplied(applicationNftId);
|
107
|
+
}
|
108
|
+
|
109
|
+
// check policy matches with calling product
|
110
|
+
IPolicy.PolicyInfo memory applicationInfo = instanceReader.getPolicyInfo(applicationNftId);
|
111
|
+
if(applicationInfo.productNftId != productNftId) {
|
112
|
+
revert ErrorPolicyServicePolicyProductMismatch(
|
113
|
+
applicationNftId,
|
114
|
+
applicationInfo.productNftId,
|
115
|
+
productNftId);
|
116
|
+
}
|
117
|
+
|
118
|
+
|
119
|
+
// store updated policy info
|
120
|
+
instance.getInstanceStore().updatePolicyState(
|
121
|
+
applicationNftId,
|
122
|
+
DECLINED());
|
123
|
+
|
124
|
+
emit LogPolicyServicePolicyDeclined(applicationNftId);
|
102
125
|
}
|
103
126
|
|
104
127
|
event LogDebug(uint idx, string message);
|
@@ -427,6 +450,7 @@ contract PolicyService is
|
|
427
450
|
bundleNftId,
|
428
451
|
premium);
|
429
452
|
|
453
|
+
// TODO: centralize token handling (issue #471)
|
430
454
|
// transfer premium amounts to target wallets
|
431
455
|
tokenHandler.transfer(policyHolder, productWallet, premium.productFeeAmount);
|
432
456
|
tokenHandler.transfer(policyHolder, distributionWallet, premium.distributionFeeAndCommissionAmount);
|
@@ -1,12 +1,9 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IVersionable} from "../
|
5
|
-
import {ProxyManager} from "../
|
4
|
+
import {IVersionable} from "../upgradeability/IVersionable.sol";
|
5
|
+
import {ProxyManager} from "../upgradeability/ProxyManager.sol";
|
6
6
|
import {PolicyService} from "./PolicyService.sol";
|
7
|
-
import {Registry} from "../registry/Registry.sol";
|
8
|
-
import {RegistryService} from "../registry/RegistryService.sol";
|
9
|
-
import {VersionLib} from "../type/Version.sol";
|
10
7
|
|
11
8
|
contract PolicyServiceManager is ProxyManager {
|
12
9
|
|
@@ -1,12 +1,9 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IVersionable} from "../
|
5
|
-
import {ProxyManager} from "../
|
4
|
+
import {IVersionable} from "../upgradeability/IVersionable.sol";
|
5
|
+
import {ProxyManager} from "../upgradeability/ProxyManager.sol";
|
6
6
|
import {PricingService} from "./PricingService.sol";
|
7
|
-
import {Registry} from "../registry/Registry.sol";
|
8
|
-
import {RegistryService} from "../registry/RegistryService.sol";
|
9
|
-
import {REGISTRY} from "../type/ObjectType.sol";
|
10
7
|
|
11
8
|
contract PricingServiceManager is ProxyManager {
|
12
9
|
|
@@ -102,6 +102,7 @@ abstract contract Product is
|
|
102
102
|
onlyOwner()
|
103
103
|
{
|
104
104
|
_getProductStorage()._componentService.registerProduct();
|
105
|
+
_approveTokenHandler(type(uint256).max);
|
105
106
|
}
|
106
107
|
|
107
108
|
|
@@ -134,7 +135,6 @@ abstract contract Product is
|
|
134
135
|
return getRegistry().getNftId(address(_getProductStorage()._distribution));
|
135
136
|
}
|
136
137
|
|
137
|
-
|
138
138
|
function _initializeProduct(
|
139
139
|
address registry,
|
140
140
|
NftId instanceNftId,
|
@@ -265,6 +265,15 @@ abstract contract Product is
|
|
265
265
|
activateAt);
|
266
266
|
}
|
267
267
|
|
268
|
+
function _decline(
|
269
|
+
NftId policyNftId
|
270
|
+
)
|
271
|
+
internal
|
272
|
+
{
|
273
|
+
_getProductStorage()._policyService.decline(
|
274
|
+
policyNftId);
|
275
|
+
}
|
276
|
+
|
268
277
|
function _collectPremium(
|
269
278
|
NftId policyNftId,
|
270
279
|
Timestamp activateAt
|
@@ -1,45 +1,20 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IRegistry} from "../registry/IRegistry.sol";
|
5
|
-
import {IProductComponent} from "./IProductComponent.sol";
|
6
|
-
import {Product} from "./Product.sol";
|
7
|
-
import {IInstanceLinkedComponent} from "../shared/IInstanceLinkedComponent.sol";
|
8
|
-
import {IPoolComponent} from "../pool/IPoolComponent.sol";
|
9
|
-
import {IDistributionComponent} from "../distribution/IDistributionComponent.sol";
|
10
4
|
import {IInstance} from "../instance/IInstance.sol";
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
import {IBundle} from "../instance/module/IBundle.sol";
|
5
|
+
import {IInstanceService} from "../instance/IInstanceService.sol";
|
6
|
+
import {IPoolService} from "../pool/PoolService.sol";
|
14
7
|
import {IProductService} from "./IProductService.sol";
|
15
|
-
import {
|
16
|
-
|
17
|
-
import {TokenHandler} from "../shared/TokenHandler.sol";
|
18
|
-
|
19
|
-
import {IVersionable} from "../shared/IVersionable.sol";
|
20
|
-
import {Versionable} from "../shared/Versionable.sol";
|
8
|
+
import {IRegistryService} from "../registry/IRegistryService.sol";
|
9
|
+
import {IRisk} from "../instance/module/IRisk.sol";
|
21
10
|
|
22
|
-
import {
|
23
|
-
import {UFixed, UFixedLib} from "../type/UFixed.sol";
|
24
|
-
import {Blocknumber, blockNumber} from "../type/Blocknumber.sol";
|
11
|
+
import {InstanceReader} from "../instance/InstanceReader.sol";
|
25
12
|
import {ObjectType, INSTANCE, PRODUCT, POOL, POLICY, REGISTRY} from "../type/ObjectType.sol";
|
26
|
-
import {
|
27
|
-
import {NftId
|
28
|
-
import {Fee, FeeLib} from "../type/Fee.sol";
|
29
|
-
import {ReferralId} from "../type/Referral.sol";
|
13
|
+
import {KEEP_STATE} from "../type/StateId.sol";
|
14
|
+
import {NftId} from "../type/NftId.sol";
|
30
15
|
import {RiskId} from "../type/RiskId.sol";
|
31
16
|
import {StateId} from "../type/StateId.sol";
|
32
|
-
import {Version, VersionLib} from "../type/Version.sol";
|
33
|
-
import {RoleId, PRODUCT_OWNER_ROLE} from "../type/RoleId.sol";
|
34
|
-
|
35
|
-
import {IService} from "../shared/IService.sol";
|
36
|
-
import {Service} from "../shared/Service.sol";
|
37
17
|
import {ComponentVerifyingService} from "../shared/ComponentVerifyingService.sol";
|
38
|
-
import {IInstanceService} from "../instance/IInstanceService.sol";
|
39
|
-
import {IProductService} from "./IProductService.sol";
|
40
|
-
import {IRegistryService} from "../registry/IRegistryService.sol";
|
41
|
-
import {InstanceReader} from "../instance/InstanceReader.sol";
|
42
|
-
import {IPoolService} from "../pool/PoolService.sol";
|
43
18
|
|
44
19
|
contract ProductService is
|
45
20
|
ComponentVerifyingService,
|
@@ -1,12 +1,9 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IVersionable} from "../
|
5
|
-
import {ProxyManager} from "../
|
4
|
+
import {IVersionable} from "../upgradeability/IVersionable.sol";
|
5
|
+
import {ProxyManager} from "../upgradeability/ProxyManager.sol";
|
6
6
|
import {ProductService} from "./ProductService.sol";
|
7
|
-
import {Registry} from "../registry/Registry.sol";
|
8
|
-
import {RegistryService} from "../registry/RegistryService.sol";
|
9
|
-
import {VersionLib} from "../type/Version.sol";
|
10
7
|
|
11
8
|
contract ProductServiceManager is ProxyManager {
|
12
9
|
|
@@ -7,21 +7,29 @@ import {NftId} from "../type/NftId.sol";
|
|
7
7
|
import {ObjectType} from "../type/ObjectType.sol";
|
8
8
|
import {VersionPart} from "../type/Version.sol";
|
9
9
|
import {Timestamp} from "../type/Timestamp.sol";
|
10
|
-
import {RoleId} from "../type/RoleId.sol";
|
11
10
|
|
11
|
+
/// @title Chain Registry interface.
|
12
|
+
/// A chain registry holds all protocol relevant objects with basic metadata.
|
13
|
+
/// Registered objects include services, instances, products, pools, policies, bundles, stakes and more.
|
14
|
+
/// Registered objects are represented by NFTs.
|
12
15
|
interface IRegistry is IERC165 {
|
13
16
|
|
14
17
|
event LogRegistration(NftId nftId, NftId parentNftId, ObjectType objectType, bool isInterceptor, address objectAddress, address initialOwner);
|
15
18
|
event LogServiceRegistration(VersionPart majorVersion, ObjectType domain);
|
16
19
|
|
20
|
+
// register()
|
21
|
+
error ErrorRegistryCallerNotRegistryService();
|
22
|
+
error ErrorRegistryService(address service);
|
23
|
+
|
17
24
|
// registerService()
|
18
|
-
error
|
25
|
+
error ErrorRegistryCallerNotReleaseRegistry();
|
26
|
+
error ErrorRegistryServiceAddressZero();
|
27
|
+
error ErrorRegistryServiceVersionZero();
|
28
|
+
error ErrorRegistryNotService(address service, ObjectType objectType);
|
29
|
+
error ErrorRegistryServiceParentNotRegistry(NftId parentNftId);
|
19
30
|
error ErrorRegistryDomainZero(address service);
|
20
31
|
error ErrorRegistryDomainAlreadyRegistered(address service, VersionPart version, ObjectType domain);
|
21
32
|
|
22
|
-
// register()
|
23
|
-
error ErrorRegistryCallerNotRegistryService();
|
24
|
-
|
25
33
|
// registerWithCustomTypes()
|
26
34
|
error ErrorRegistryCoreTypeRegistration();
|
27
35
|
|
@@ -45,24 +53,29 @@ interface IRegistry is IERC165 {
|
|
45
53
|
bytes32 salt;
|
46
54
|
address[] addresses;
|
47
55
|
string[] names;
|
48
|
-
// RoleId[][] serviceRoles;
|
49
|
-
// string[][] serviceRoleNames;
|
50
|
-
// RoleId[][] functionRoles;
|
51
|
-
// string[][] functionRoleNames;
|
52
|
-
// bytes4[][][] selectors;
|
53
56
|
ObjectType[] domains;
|
54
57
|
Timestamp activatedAt;
|
55
58
|
Timestamp disabledAt;
|
56
59
|
}
|
57
60
|
|
61
|
+
/// @dev Register an object with a known core type.
|
62
|
+
/// The function returns a newly minted object NFT ID.
|
63
|
+
/// May not be used to register services.
|
64
|
+
function register(ObjectInfo memory info) external returns (NftId nftId);
|
65
|
+
|
66
|
+
/// @dev Register a service with using the provided domain and version.
|
67
|
+
/// The function returns a newly minted service NFT ID.
|
68
|
+
/// May only be used to register services.
|
58
69
|
function registerService(
|
59
70
|
ObjectInfo memory serviceInfo,
|
60
71
|
VersionPart serviceVersion,
|
61
72
|
ObjectType serviceDomain
|
62
73
|
) external returns(NftId nftId);
|
63
74
|
|
64
|
-
|
65
|
-
|
75
|
+
/// @dev Register an object with a custom type.
|
76
|
+
/// The function returns a newly minted object NFT ID.
|
77
|
+
/// This function is reserved for GIF releases > 3.
|
78
|
+
/// May not be used to register known core types.
|
66
79
|
function registerWithCustomType(ObjectInfo memory info) external returns (NftId nftId);
|
67
80
|
|
68
81
|
function getInitialVersion() external view returns (VersionPart);
|
@@ -109,7 +122,7 @@ interface IRegistry is IERC165 {
|
|
109
122
|
// TODO refactor the address getters below to contract getters
|
110
123
|
function getChainNftAddress() external view returns (address);
|
111
124
|
|
112
|
-
function
|
125
|
+
function getReleaseRegistryAddress() external view returns (address);
|
113
126
|
|
114
127
|
function getStakingAddress() external view returns (address);
|
115
128
|
|
@@ -50,14 +50,14 @@ interface IRegistryService is
|
|
50
50
|
function registerComponent(IComponent component, ObjectType objectType, address owner)
|
51
51
|
external returns(IRegistry.ObjectInfo memory info);
|
52
52
|
|
53
|
-
function registerProduct(IComponent product, address owner)
|
54
|
-
|
53
|
+
// function registerProduct(IComponent product, address owner)
|
54
|
+
// external returns(IRegistry.ObjectInfo memory info);
|
55
55
|
|
56
|
-
function registerPool(IComponent pool, address owner)
|
57
|
-
|
56
|
+
// function registerPool(IComponent pool, address owner)
|
57
|
+
// external returns(IRegistry.ObjectInfo memory info);
|
58
58
|
|
59
|
-
function registerDistribution(IComponent distribution, address owner)
|
60
|
-
|
59
|
+
// function registerDistribution(IComponent distribution, address owner)
|
60
|
+
// external returns(IRegistry.ObjectInfo memory info);
|
61
61
|
|
62
62
|
function registerDistributor(IRegistry.ObjectInfo memory info) external returns(NftId nftId);
|
63
63
|
|