@etherisc/gif-next 0.0.2-bf75dbb-287 → 0.0.2-bfb44e0-483
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -1
- package/artifacts/contracts/components/Component.sol/Component.dbg.json +4 -0
- package/artifacts/contracts/components/Component.sol/Component.json +897 -0
- package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/components/Distribution.sol/Distribution.json +907 -218
- package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +4 -0
- package/artifacts/contracts/components/{BaseComponent.sol/BaseComponent.json → IComponent.sol/IComponent.json} +151 -84
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +798 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +662 -43
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +661 -5
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +620 -193
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +550 -115
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.dbg.json +1 -1
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.dbg.json +1 -1
- package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.dbg.json +1 -1
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +38 -62
- 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 +725 -36
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +198 -20
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +490 -710
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +188 -144
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +61 -97
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +501 -264
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +178 -100
- package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +1 -1
- package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +8 -32
- package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +4 -0
- package/artifacts/contracts/{shared/RegisterableUpgradable.sol/RegisterableUpgradable.json → instance/base/ComponentService.sol/ComponentService.json} +321 -9
- 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 +59 -16
- 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 +1117 -0
- package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +1318 -0
- package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +4 -0
- package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +586 -0
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +544 -84
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +191 -33
- package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +4 -0
- package/artifacts/contracts/instance/{base/ComponentServiceBase.sol/ComponentServiceBase.json → service/IApplicationService.sol/IApplicationService.json} +207 -109
- package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +798 -0
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +229 -19
- package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/{IComponentOwnerService.sol/IComponentOwnerService.json → IPolicyService.sol/IPolicyService.json} +369 -51
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +28 -244
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +33 -244
- package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +1378 -0
- package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +4 -0
- package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +642 -0
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +259 -351
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +166 -56
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +270 -410
- package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +166 -80
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +2 -2
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +225 -133
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +146 -94
- 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 +238 -235
- package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +285 -0
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +214 -156
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +181 -97
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +547 -0
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +150 -29
- 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 +37 -0
- 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 +18 -5
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.json +69 -0
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.json +32 -19
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +2 -2
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +156 -11
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +4 -0
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +269 -0
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +156 -6
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +152 -11
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +105 -0
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/Service.sol/Service.json +178 -19
- 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 -2
- 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 +152 -11
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +2 -2
- package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
- package/artifacts/contracts/test/TestService.sol/TestService.json +196 -37
- 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 -8
- 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/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/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/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
- 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 +236 -0
- package/contracts/components/Distribution.sol +199 -64
- package/contracts/components/IComponent.sol +50 -0
- package/contracts/components/IDistributionComponent.sol +59 -3
- package/contracts/components/IPoolComponent.sol +50 -29
- package/contracts/components/IProductComponent.sol +7 -3
- package/contracts/components/Pool.sol +136 -149
- package/contracts/components/Product.sol +104 -115
- package/contracts/instance/BundleManager.sol +7 -11
- package/contracts/instance/IInstance.sol +39 -9
- package/contracts/instance/IInstanceService.sol +29 -4
- package/contracts/instance/Instance.sol +78 -251
- package/contracts/instance/InstanceAccessManager.sol +87 -78
- package/contracts/instance/InstanceReader.sol +3 -25
- package/contracts/instance/InstanceService.sol +306 -137
- package/contracts/instance/InstanceServiceManager.sol +5 -8
- package/contracts/instance/ObjectManager.sol +7 -24
- package/contracts/instance/base/ComponentService.sol +134 -0
- package/contracts/instance/module/IAccess.sol +27 -18
- package/contracts/instance/module/ISetup.sol +5 -4
- package/contracts/instance/service/ApplicationService.sol +268 -0
- package/contracts/instance/service/BundleService.sol +298 -0
- package/contracts/instance/service/BundleServiceManager.sol +51 -0
- package/contracts/instance/service/DistributionService.sol +212 -26
- package/contracts/instance/service/DistributionServiceManager.sol +6 -9
- package/contracts/instance/service/IApplicationService.sol +82 -0
- package/contracts/instance/service/IBundleService.sol +54 -0
- package/contracts/instance/service/IDistributionService.sol +53 -0
- package/contracts/instance/service/IPolicyService.sol +88 -0
- package/contracts/instance/service/IPoolService.sol +2 -33
- package/contracts/instance/service/IProductService.sol +2 -72
- package/contracts/instance/service/PolicyService.sol +524 -0
- package/contracts/instance/service/PolicyServiceManager.sol +54 -0
- package/contracts/instance/service/PoolService.sol +34 -212
- package/contracts/instance/service/PoolServiceManager.sol +5 -8
- package/contracts/instance/service/ProductService.sol +123 -460
- package/contracts/registry/ChainNft.sol +1 -1
- package/contracts/registry/IRegistry.sol +37 -19
- package/contracts/registry/IRegistryService.sol +28 -13
- package/contracts/registry/Registry.sol +231 -217
- package/contracts/registry/RegistryAccessManager.sol +216 -0
- package/contracts/registry/RegistryService.sol +65 -162
- package/contracts/registry/RegistryServiceManager.sol +18 -36
- package/contracts/registry/ReleaseManager.sol +332 -0
- package/contracts/registry/TokenRegistry.sol +11 -9
- package/contracts/shared/ERC165.sol +12 -11
- package/contracts/shared/INftOwnable.sol +12 -6
- package/contracts/shared/IPolicyHolder.sol +26 -0
- package/contracts/shared/IRegisterable.sol +4 -6
- package/contracts/shared/IRegistryLinked.sol +15 -0
- package/contracts/shared/IService.sol +2 -1
- package/contracts/shared/IVersionable.sol +2 -2
- package/contracts/shared/NftOwnable.sol +113 -57
- package/contracts/shared/PolicyHolder.sol +81 -0
- package/contracts/shared/ProxyManager.sol +6 -5
- package/contracts/shared/Registerable.sol +15 -24
- package/contracts/shared/RegistryLinked.sol +64 -0
- package/contracts/shared/Service.sol +18 -13
- package/contracts/shared/Versionable.sol +3 -2
- package/contracts/test/TestRegisterable.sol +1 -1
- package/contracts/test/TestService.sol +4 -3
- package/contracts/types/DistributorType.sol +2 -2
- package/contracts/types/ObjectType.sol +6 -2
- package/contracts/types/RoleId.sol +10 -10
- package/package.json +3 -3
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +0 -368
- package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +0 -4
- package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.json +0 -1206
- package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.dbg.json +0 -4
- package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.json +0 -1082
- package/artifacts/contracts/instance/IInstanceBase.sol/IInstanceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/IInstanceBase.sol/IInstanceBase.json +0 -448
- package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.json +0 -763
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +0 -113
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +0 -4
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +0 -827
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +0 -4
- package/artifacts/contracts/shared/RegisterableUpgradable.sol/RegisterableUpgradable.dbg.json +0 -4
- package/contracts/components/BaseComponent.sol +0 -132
- package/contracts/components/IBaseComponent.sol +0 -31
- package/contracts/instance/AccessManagerUpgradeableInitializeable.sol +0 -23
- package/contracts/instance/IAccessManagerSimple.sol +0 -391
- package/contracts/instance/IInstanceBase.sol +0 -26
- package/contracts/instance/InstanceBase.sol +0 -41
- package/contracts/instance/base/ComponentServiceBase.sol +0 -134
- package/contracts/instance/base/IInstanceBase.sol +0 -23
- package/contracts/instance/service/ComponentOwnerService.sol +0 -317
- package/contracts/instance/service/IComponentOwnerService.sol +0 -20
- package/contracts/shared/RegisterableUpgradable.sol +0 -16
@@ -4,21 +4,17 @@ pragma solidity ^0.8.19;
|
|
4
4
|
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
5
5
|
|
6
6
|
import {IRisk} from "../instance/module/IRisk.sol";
|
7
|
-
import {
|
8
|
-
import {IProductService} from "../instance/service/IProductService.sol";
|
7
|
+
import {IPolicyService} from "../instance/service/IPolicyService.sol";
|
9
8
|
import {IProductComponent} from "./IProductComponent.sol";
|
10
|
-
import {NftId,
|
11
|
-
import {
|
9
|
+
import {NftId, NftIdLib} from "../types/NftId.sol";
|
10
|
+
import {PRODUCT} from "../types/ObjectType.sol";
|
12
11
|
import {ReferralId} from "../types/Referral.sol";
|
13
12
|
import {RiskId, RiskIdLib} from "../types/RiskId.sol";
|
14
13
|
import {StateId} from "../types/StateId.sol";
|
15
14
|
import {Timestamp} from "../types/Timestamp.sol";
|
16
|
-
import {Fee
|
17
|
-
import {
|
15
|
+
import {Fee} from "../types/Fee.sol";
|
16
|
+
import {Component} from "./Component.sol";
|
18
17
|
|
19
|
-
import {IRegistry} from "../registry/IRegistry.sol";
|
20
|
-
import {IRegisterable} from "../shared/IRegisterable.sol";
|
21
|
-
import {Registerable} from "../shared/Registerable.sol";
|
22
18
|
import {TokenHandler} from "../shared/TokenHandler.sol";
|
23
19
|
|
24
20
|
import {InstanceReader} from "../instance/InstanceReader.sol";
|
@@ -26,45 +22,55 @@ import {ISetup} from "../instance/module/ISetup.sol";
|
|
26
22
|
import {Pool} from "../components/Pool.sol";
|
27
23
|
import {Distribution} from "../components/Distribution.sol";
|
28
24
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
25
|
+
abstract contract Product is
|
26
|
+
Component,
|
27
|
+
IProductComponent
|
28
|
+
{
|
29
|
+
// keccak256(abi.encode(uint256(keccak256("etherisc.storage.Product")) - 1)) & ~bytes32(uint256(0xff));
|
30
|
+
bytes32 public constant PRODUCT_STORAGE_LOCATION_V1 = 0x0bb7aafdb8e380f81267337bc5b5dfdf76e6d3a380ecadb51ec665246d9d6800;
|
31
|
+
|
32
|
+
struct ProductStorage {
|
33
|
+
IPolicyService _policyService;
|
34
|
+
Pool _pool;
|
35
|
+
Distribution _distribution;
|
36
|
+
Fee _initialProductFee;
|
37
|
+
Fee _initialProcessingFee;
|
38
|
+
TokenHandler _tokenHandler;
|
39
|
+
NftId _poolNftId;
|
40
|
+
NftId _distributionNftId;
|
41
|
+
}
|
43
42
|
|
44
|
-
|
43
|
+
function initializeProduct(
|
45
44
|
address registry,
|
46
|
-
NftId
|
45
|
+
NftId instanceNftId,
|
46
|
+
string memory name,
|
47
47
|
address token,
|
48
48
|
bool isInterceptor,
|
49
49
|
address pool,
|
50
50
|
address distribution,
|
51
51
|
Fee memory productFee,
|
52
52
|
Fee memory processingFee,
|
53
|
-
address initialOwner
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
_tokenHandler = new TokenHandler(token);
|
63
|
-
|
64
|
-
_poolNftId = getRegistry().getNftId(address(_pool));
|
65
|
-
_distributionNftId = getRegistry().getNftId(address(_distribution));
|
53
|
+
address initialOwner,
|
54
|
+
bytes memory data
|
55
|
+
)
|
56
|
+
public
|
57
|
+
virtual
|
58
|
+
onlyInitializing()
|
59
|
+
{
|
60
|
+
initializeComponent(registry, instanceNftId, name, token, PRODUCT(), isInterceptor, initialOwner, data);
|
66
61
|
|
67
|
-
|
62
|
+
ProductStorage storage $ = _getProductStorage();
|
63
|
+
// TODO add validation
|
64
|
+
$._policyService = getInstance().getPolicyService();
|
65
|
+
$._pool = Pool(pool);
|
66
|
+
$._distribution = Distribution(distribution);
|
67
|
+
$._initialProductFee = productFee;
|
68
|
+
$._initialProcessingFee = processingFee;
|
69
|
+
$._tokenHandler = new TokenHandler(token);
|
70
|
+
$._poolNftId = getRegistry().getNftId(pool);
|
71
|
+
$._distributionNftId = getRegistry().getNftId(distribution);
|
72
|
+
|
73
|
+
registerInterface(type(IProductComponent).interfaceId);
|
68
74
|
}
|
69
75
|
|
70
76
|
|
@@ -73,15 +79,15 @@ contract Product is BaseComponent, IProductComponent {
|
|
73
79
|
RiskId riskId,
|
74
80
|
uint256 lifetime,
|
75
81
|
bytes memory applicationData,
|
76
|
-
|
77
|
-
|
82
|
+
NftId bundleNftId,
|
83
|
+
ReferralId referralId
|
78
84
|
)
|
79
85
|
external
|
80
86
|
view
|
81
87
|
override
|
82
88
|
returns (uint256 premiumAmount)
|
83
89
|
{
|
84
|
-
(premiumAmount,,,,) =
|
90
|
+
(premiumAmount,,,,) = _getProductStorage()._policyService.calculatePremium(
|
85
91
|
riskId,
|
86
92
|
sumInsuredAmount,
|
87
93
|
lifetime,
|
@@ -115,7 +121,7 @@ contract Product is BaseComponent, IProductComponent {
|
|
115
121
|
RiskId id,
|
116
122
|
bytes memory data
|
117
123
|
) internal {
|
118
|
-
|
124
|
+
getProductService().createRisk(
|
119
125
|
id,
|
120
126
|
data
|
121
127
|
);
|
@@ -125,7 +131,7 @@ contract Product is BaseComponent, IProductComponent {
|
|
125
131
|
RiskId id,
|
126
132
|
bytes memory data
|
127
133
|
) internal {
|
128
|
-
|
134
|
+
getProductService().updateRisk(
|
129
135
|
id,
|
130
136
|
data
|
131
137
|
);
|
@@ -135,14 +141,14 @@ contract Product is BaseComponent, IProductComponent {
|
|
135
141
|
RiskId id,
|
136
142
|
StateId state
|
137
143
|
) internal {
|
138
|
-
|
144
|
+
getProductService().updateRiskState(
|
139
145
|
id,
|
140
146
|
state
|
141
147
|
);
|
142
148
|
}
|
143
149
|
|
144
150
|
function _getRiskInfo(RiskId id) internal view returns (IRisk.RiskInfo memory info) {
|
145
|
-
return
|
151
|
+
return getInstance().getInstanceReader().getRiskInfo(id);
|
146
152
|
}
|
147
153
|
|
148
154
|
function _createApplication(
|
@@ -153,8 +159,11 @@ contract Product is BaseComponent, IProductComponent {
|
|
153
159
|
bytes memory applicationData,
|
154
160
|
NftId bundleNftId,
|
155
161
|
ReferralId referralId
|
156
|
-
)
|
157
|
-
|
162
|
+
)
|
163
|
+
internal
|
164
|
+
returns (NftId nftId)
|
165
|
+
{
|
166
|
+
return _getProductStorage()._policyService.createApplication(
|
158
167
|
applicationOwner,
|
159
168
|
riskId,
|
160
169
|
sumInsuredAmount,
|
@@ -172,7 +181,7 @@ contract Product is BaseComponent, IProductComponent {
|
|
172
181
|
)
|
173
182
|
internal
|
174
183
|
{
|
175
|
-
|
184
|
+
_getProductStorage()._policyService.underwrite(
|
176
185
|
policyNftId,
|
177
186
|
requirePremiumPayment,
|
178
187
|
activateAt);
|
@@ -184,7 +193,7 @@ contract Product is BaseComponent, IProductComponent {
|
|
184
193
|
)
|
185
194
|
internal
|
186
195
|
{
|
187
|
-
|
196
|
+
_getProductStorage()._policyService.collectPremium(
|
188
197
|
policyNftId,
|
189
198
|
activateAt);
|
190
199
|
}
|
@@ -195,17 +204,25 @@ contract Product is BaseComponent, IProductComponent {
|
|
195
204
|
)
|
196
205
|
internal
|
197
206
|
{
|
198
|
-
|
207
|
+
_getProductStorage()._policyService.activate(
|
199
208
|
policyNftId,
|
200
209
|
activateAt);
|
201
210
|
}
|
202
211
|
|
212
|
+
function _close(
|
213
|
+
NftId policyNftId
|
214
|
+
)
|
215
|
+
internal
|
216
|
+
{
|
217
|
+
_getProductStorage()._policyService.close(policyNftId);
|
218
|
+
}
|
219
|
+
|
203
220
|
function getPoolNftId() external view override returns (NftId poolNftId) {
|
204
|
-
return getRegistry().getNftId(address(_pool));
|
221
|
+
return getRegistry().getNftId(address(_getProductStorage()._pool));
|
205
222
|
}
|
206
223
|
|
207
224
|
function getDistributionNftId() external view override returns (NftId distributionNftId) {
|
208
|
-
return getRegistry().getNftId(address(_distribution));
|
225
|
+
return getRegistry().getNftId(address(_getProductStorage()._distribution));
|
209
226
|
}
|
210
227
|
|
211
228
|
// from product component
|
@@ -215,75 +232,47 @@ contract Product is BaseComponent, IProductComponent {
|
|
215
232
|
)
|
216
233
|
external
|
217
234
|
onlyOwner
|
235
|
+
restricted()
|
218
236
|
override
|
219
237
|
{
|
220
|
-
|
238
|
+
getProductService().setFees(productFee, processingFee);
|
221
239
|
}
|
222
240
|
|
223
241
|
function getSetupInfo() public view returns (ISetup.ProductSetupInfo memory setupInfo) {
|
224
|
-
InstanceReader reader =
|
225
|
-
|
226
|
-
}
|
242
|
+
InstanceReader reader = getInstance().getInstanceReader();
|
243
|
+
setupInfo = reader.getProductSetupInfo(getNftId());
|
227
244
|
|
228
|
-
|
245
|
+
// fallback to initial setup info (wallet is always != address(0))
|
246
|
+
if(setupInfo.wallet == address(0)) {
|
247
|
+
setupInfo = _getInitialSetupInfo();
|
248
|
+
}
|
249
|
+
}
|
229
250
|
|
230
|
-
function
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
// from PoolComponent
|
250
|
-
(
|
251
|
-
,
|
252
|
-
bytes memory poolData
|
253
|
-
) = _pool.getInitialInfo();
|
254
|
-
|
255
|
-
(
|
256
|
-
ISetup.PoolSetupInfo memory poolSetupInfo
|
257
|
-
) = abi.decode(poolData, (ISetup.PoolSetupInfo));
|
258
|
-
|
259
|
-
// from DistributionComponent
|
260
|
-
(
|
261
|
-
,
|
262
|
-
bytes memory distributionData
|
263
|
-
) = _distribution.getInitialInfo();
|
264
|
-
|
265
|
-
(
|
266
|
-
ISetup.DistributionSetupInfo memory distributionSetupInfo
|
267
|
-
) = abi.decode(distributionData, (ISetup.DistributionSetupInfo));
|
268
|
-
|
269
|
-
return (
|
270
|
-
productInfo,
|
271
|
-
abi.encode(
|
272
|
-
ISetup.ProductSetupInfo(
|
273
|
-
_token,
|
274
|
-
_tokenHandler,
|
275
|
-
_distributionNftId,
|
276
|
-
_poolNftId,
|
277
|
-
distributionSetupInfo.distributionFee,
|
278
|
-
_initialProductFee,
|
279
|
-
_initialProcessingFee,
|
280
|
-
poolSetupInfo.poolFee,
|
281
|
-
poolSetupInfo.stakingFee,
|
282
|
-
poolSetupInfo.performanceFee,
|
283
|
-
false,
|
284
|
-
_wallet
|
285
|
-
)
|
286
|
-
)
|
251
|
+
function _getInitialSetupInfo() internal view returns (ISetup.ProductSetupInfo memory setupInfo) {
|
252
|
+
ProductStorage storage $ = _getProductStorage();
|
253
|
+
|
254
|
+
ISetup.DistributionSetupInfo memory distributionSetupInfo = $._distribution.getSetupInfo();
|
255
|
+
ISetup.PoolSetupInfo memory poolSetupInfo = $._pool.getSetupInfo();
|
256
|
+
|
257
|
+
return ISetup.ProductSetupInfo(
|
258
|
+
getToken(),
|
259
|
+
$._tokenHandler,
|
260
|
+
$._distributionNftId,
|
261
|
+
$._poolNftId,
|
262
|
+
distributionSetupInfo.distributionFee,
|
263
|
+
$._initialProductFee,
|
264
|
+
$._initialProcessingFee,
|
265
|
+
poolSetupInfo.poolFee,
|
266
|
+
poolSetupInfo.stakingFee,
|
267
|
+
poolSetupInfo.performanceFee,
|
268
|
+
false,
|
269
|
+
getWallet()
|
287
270
|
);
|
288
271
|
}
|
272
|
+
|
273
|
+
function _getProductStorage() private pure returns (ProductStorage storage $) {
|
274
|
+
assembly {
|
275
|
+
$.slot := PRODUCT_STORAGE_LOCATION_V1
|
276
|
+
}
|
277
|
+
}
|
289
278
|
}
|
@@ -32,17 +32,13 @@ contract BundleManager is
|
|
32
32
|
|
33
33
|
mapping(NftId bundleNftId => LibNftIdSet.Set policies) internal _activePolicies;
|
34
34
|
|
35
|
-
constructor() ObjectManager() {
|
36
|
-
}
|
37
|
-
|
38
|
-
|
39
35
|
/// @dev links a policy with its bundle
|
40
36
|
// to link a policy it MUST NOT yet have been activated
|
41
37
|
// the bundle MUST be unlocked (active) for linking (underwriting) and registered with this instance
|
42
38
|
function linkPolicy(NftId policyNftId) external restricted() {
|
43
|
-
NftId bundleNftId =
|
39
|
+
NftId bundleNftId = _instance.getInstanceReader().getPolicyInfo(policyNftId).bundleNftId;
|
44
40
|
// decision will likely depend on the decision what to check here and what in the service
|
45
|
-
NftId poolNftId =
|
41
|
+
NftId poolNftId = _instance.getInstanceReader().getBundleInfo(bundleNftId).poolNftId;
|
46
42
|
|
47
43
|
// ensure bundle is unlocked (in active set) and registered with this instance
|
48
44
|
if (!_isActive(poolNftId, bundleNftId)) {
|
@@ -59,11 +55,11 @@ contract BundleManager is
|
|
59
55
|
// - the policy MUST be past its expiry period and it MUST NOT have any open claims
|
60
56
|
// - the policy's payoutAmount MUST be equal to its sumInsuredAmount and MUST NOT have any open claims
|
61
57
|
function unlinkPolicy(NftId policyNftId) external restricted() {
|
62
|
-
IPolicy.PolicyInfo memory policyInfo =
|
58
|
+
IPolicy.PolicyInfo memory policyInfo = _instance.getInstanceReader().getPolicyInfo(policyNftId);
|
63
59
|
|
64
60
|
NftId bundleNftId = policyInfo.bundleNftId;
|
65
61
|
// decision will likely depend on the decision what to check here and what in the service
|
66
|
-
NftId poolNftId =
|
62
|
+
NftId poolNftId = _instance.getInstanceReader().getBundleInfo(bundleNftId).poolNftId;
|
67
63
|
|
68
64
|
// ensure bundle is registered with this instance
|
69
65
|
if (!_contains(poolNftId, bundleNftId)) {
|
@@ -78,7 +74,7 @@ contract BundleManager is
|
|
78
74
|
/// @dev add a new bundle to a riskpool registerd with this instance
|
79
75
|
// the corresponding pool is fetched via instance reader
|
80
76
|
function add(NftId bundleNftId) external restricted() {
|
81
|
-
NftId poolNftId =
|
77
|
+
NftId poolNftId = _instance.getInstanceReader().getBundleInfo(bundleNftId).poolNftId;
|
82
78
|
|
83
79
|
// ensure pool is registered with instance
|
84
80
|
if(poolNftId.eqz()) {
|
@@ -91,14 +87,14 @@ contract BundleManager is
|
|
91
87
|
|
92
88
|
/// @dev unlocked (active) bundles are available to underwrite new policies
|
93
89
|
function unlock(NftId bundleNftId) external restricted() {
|
94
|
-
NftId poolNftId =
|
90
|
+
NftId poolNftId = _instance.getInstanceReader().getBundleInfo(bundleNftId).poolNftId;
|
95
91
|
_activate(poolNftId, bundleNftId);
|
96
92
|
emit LogBundleManagerBundleUnlocked(poolNftId, bundleNftId);
|
97
93
|
}
|
98
94
|
|
99
95
|
/// @dev locked (deactivated) bundles may not underwrite any new policies
|
100
96
|
function lock(NftId bundleNftId) external restricted() {
|
101
|
-
NftId poolNftId =
|
97
|
+
NftId poolNftId = _instance.getInstanceReader().getBundleInfo(bundleNftId).poolNftId;
|
102
98
|
_deactivate(poolNftId, bundleNftId);
|
103
99
|
emit LogBundleManagerBundleLocked(poolNftId, bundleNftId);
|
104
100
|
}
|
@@ -1,31 +1,48 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {
|
4
|
+
import {IAccessManaged} from "@openzeppelin/contracts/access/manager/IAccessManaged.sol";
|
5
5
|
|
6
|
+
import {NftId} from "../types/NftId.sol";
|
7
|
+
import {StateId} from "../types/StateId.sol";
|
8
|
+
import {RiskId} from "../types/RiskId.sol";
|
9
|
+
|
10
|
+
import {IRegisterable} from "../shared/IRegisterable.sol";
|
11
|
+
|
12
|
+
import {InstanceAccessManager} from "./InstanceAccessManager.sol";
|
6
13
|
import {BundleManager} from "./BundleManager.sol";
|
7
14
|
import {InstanceReader} from "./InstanceReader.sol";
|
8
15
|
|
9
|
-
import {
|
16
|
+
import {IBundle} from "./module/IBundle.sol";
|
17
|
+
import {IBundleService} from "./service/IBundleService.sol";
|
10
18
|
import {IDistributionService} from "./service/IDistributionService.sol";
|
19
|
+
import {InstanceAccessManager} from "./InstanceAccessManager.sol";
|
20
|
+
import {IKeyValueStore} from "./base/IKeyValueStore.sol";
|
21
|
+
import {IPolicy} from "./module/IPolicy.sol";
|
22
|
+
import {IDistribution} from "./module/IDistribution.sol";
|
23
|
+
import {IPolicyService} from "./service/IPolicyService.sol";
|
11
24
|
import {IPoolService} from "./service/IPoolService.sol";
|
12
25
|
import {IProductService} from "./service/IProductService.sol";
|
13
|
-
import {
|
26
|
+
import {IPolicyService} from "./service/IPolicyService.sol";
|
27
|
+
import {IBundleService} from "./service/IBundleService.sol";
|
28
|
+
import {IRisk} from "./module/IRisk.sol";
|
14
29
|
import {ISetup} from "./module/ISetup.sol";
|
15
30
|
import {NftId} from "../types/NftId.sol";
|
16
|
-
import {StateId} from "../types/StateId.sol";
|
17
31
|
import {RiskId} from "../types/RiskId.sol";
|
18
|
-
import {
|
19
|
-
import {
|
20
|
-
import {
|
32
|
+
import {StateId} from "../types/StateId.sol";
|
33
|
+
import {VersionPart} from "../types/Version.sol";
|
34
|
+
import {Key32} from "../types/Key32.sol";
|
21
35
|
|
22
36
|
|
23
|
-
interface IInstance is IERC165, IKeyValueStore {
|
24
37
|
|
25
|
-
|
38
|
+
|
39
|
+
interface IInstance is IRegisterable, IKeyValueStore, IAccessManaged {
|
40
|
+
|
26
41
|
function getDistributionService() external view returns (IDistributionService);
|
27
42
|
function getProductService() external view returns (IProductService);
|
28
43
|
function getPoolService() external view returns (IPoolService);
|
44
|
+
function getPolicyService() external view returns (IPolicyService);
|
45
|
+
function getBundleService() external view returns (IBundleService);
|
29
46
|
|
30
47
|
function createDistributionSetup(NftId distributionNftId, ISetup.DistributionSetupInfo memory setup) external;
|
31
48
|
function updateDistributionSetup(NftId distributionNftId, ISetup.DistributionSetupInfo memory setup, StateId newState) external;
|
@@ -43,6 +60,18 @@ interface IInstance is IERC165, IKeyValueStore {
|
|
43
60
|
function updateProductSetup(NftId productNftId, ISetup.ProductSetupInfo memory setup, StateId newState) external;
|
44
61
|
function updateProductSetupState(NftId productNftId, StateId newState) external;
|
45
62
|
|
63
|
+
function createDistributorType(Key32 distributorKey, IDistribution.DistributorTypeInfo memory info) external;
|
64
|
+
function updateDistributorType(Key32 distributorKey, IDistribution.DistributorTypeInfo memory info, StateId newState) external;
|
65
|
+
function updateDistributorTypeState(Key32 distributorKey, StateId newState) external;
|
66
|
+
|
67
|
+
function createDistributor(NftId nftId, IDistribution.DistributorInfo memory info) external;
|
68
|
+
function updateDistributor(NftId nftId, IDistribution.DistributorInfo memory info, StateId newState) external;
|
69
|
+
function updateDistributorState(NftId nftId, StateId newState) external;
|
70
|
+
|
71
|
+
function createReferral(Key32 referralKey, IDistribution.ReferralInfo memory referralInfo) external;
|
72
|
+
function updateReferral(Key32 referralKey, IDistribution.ReferralInfo memory referralInfo, StateId newState) external;
|
73
|
+
function updateReferralState(Key32 referralKey, StateId newState) external;
|
74
|
+
|
46
75
|
function createRisk(RiskId riskId, IRisk.RiskInfo memory risk) external;
|
47
76
|
function updateRisk(RiskId riskId, IRisk.RiskInfo memory risk, StateId newState) external;
|
48
77
|
function updateRiskState(RiskId riskId, StateId newState) external;
|
@@ -51,6 +80,7 @@ interface IInstance is IERC165, IKeyValueStore {
|
|
51
80
|
function updatePolicy(NftId policyNftId, IPolicy.PolicyInfo memory policy, StateId newState) external;
|
52
81
|
function updatePolicyState(NftId policyNftId, StateId newState) external;
|
53
82
|
|
83
|
+
function getMajorVersion() external pure returns (VersionPart majorVersion);
|
54
84
|
function getInstanceReader() external view returns (InstanceReader);
|
55
85
|
function getBundleManager() external view returns (BundleManager);
|
56
86
|
}
|
@@ -8,27 +8,52 @@ import {IService} from "../shared/IService.sol";
|
|
8
8
|
import {IRegistry} from "../registry/IRegistry.sol";
|
9
9
|
|
10
10
|
import {IRegisterable} from "../shared/IRegisterable.sol";
|
11
|
-
import {
|
11
|
+
import {IComponent} from "../components/IComponent.sol";
|
12
12
|
|
13
|
-
import {
|
13
|
+
import {InstanceAccessManager} from "./InstanceAccessManager.sol";
|
14
14
|
import {Instance} from "./Instance.sol";
|
15
15
|
import {InstanceReader} from "./InstanceReader.sol";
|
16
16
|
import {BundleManager} from "./BundleManager.sol";
|
17
17
|
|
18
18
|
interface IInstanceService is IService {
|
19
19
|
|
20
|
-
error
|
20
|
+
error ErrorInstanceServiceMasterInstanceAlreadySet();
|
21
|
+
error ErrorInstanceServiceMasterInstanceAccessManagerAlreadySet();
|
22
|
+
error ErrorInstanceServiceMasterBundleManagerAlreadySet();
|
23
|
+
error ErrorInstanceServiceInstanceAddressZero();
|
24
|
+
|
25
|
+
error ErrorInstanceServiceMasterInstanceReaderNotSet();
|
26
|
+
error ErrorInstanceServiceInstanceReaderAddressZero();
|
27
|
+
error ErrorInstanceServiceInstanceReaderSameAsMasterInstanceReader();
|
28
|
+
error ErrorInstanceServiceInstanceReaderInstanceMismatch();
|
29
|
+
|
30
|
+
error ErrorInstanceServiceAccessManagerZero();
|
31
|
+
error ErrorInstanceServiceInstanceReaderZero();
|
32
|
+
error ErrorInstanceServiceBundleManagerZero();
|
33
|
+
|
34
|
+
error ErrorInstanceServiceInstanceAuthorityMismatch();
|
35
|
+
error ErrorInstanceServiceInstanceReaderInstanceMismatch2();
|
36
|
+
error ErrorInstanceServiceBundleMangerInstanceMismatch();
|
21
37
|
|
38
|
+
error ErrorInstanceServiceRequestUnauhorized(address caller);
|
39
|
+
error ErrorInstanceServiceNotInstanceOwner(address caller, NftId instanceNftId);
|
40
|
+
error ErrorInstanceServiceComponentNotRegistered(address componentAddress);
|
41
|
+
error ErrorInstanceServiceInvalidComponentType(address componentAddress, ObjectType expectedType, ObjectType componentType);
|
42
|
+
|
22
43
|
event LogInstanceCloned(address clonedAccessManagerAddress, address clonedInstanceAddress, address clonedInstanceReaderAddress, NftId clonedInstanceNftId);
|
23
44
|
|
24
45
|
function createInstanceClone()
|
25
46
|
external
|
26
47
|
returns (
|
27
|
-
|
48
|
+
InstanceAccessManager clonedAccessManager,
|
28
49
|
Instance clonedInstance,
|
29
50
|
NftId instanceNftId,
|
30
51
|
InstanceReader clonedInstanceReader,
|
31
52
|
BundleManager clonedBundleManager
|
32
53
|
);
|
54
|
+
|
55
|
+
function hasRole(address account, RoleId role, address instanceAddress) external returns (bool);
|
56
|
+
function setTargetLocked(string memory targetName, bool locked) external;
|
57
|
+
|
33
58
|
}
|
34
59
|
|