@etherisc/gif-next 0.0.2-be8b468-276 → 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 +136 -2
- 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 +972 -209
- package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +4 -0
- package/artifacts/contracts/{instance/base/ComponentServiceBase.sol/ComponentServiceBase.json → components/IComponent.sol/IComponent.json} +191 -152
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +752 -6
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +676 -31
- 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 +875 -299
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +695 -180
- 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 +4 -0
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +764 -0
- package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +4 -0
- package/artifacts/contracts/instance/{AccessManagedSimple.sol/AccessManagedSimple.json → Cloneable.sol/Cloneable.json} +86 -2
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +2056 -113
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +214 -20
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +559 -752
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +211 -144
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +179 -76
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +550 -77
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +194 -32
- package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +4 -0
- package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +261 -0
- 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 +576 -41
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +198 -24
- package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/{IComponentOwnerService.sol/IComponentOwnerService.json → IApplicationService.sol/IApplicationService.json} +223 -51
- 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/IPolicyService.sol/IPolicyService.json +784 -0
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +34 -83
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +44 -246
- 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 +4 -0
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +957 -0
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +4 -0
- package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +574 -0
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +1007 -0
- package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +4 -0
- package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +574 -0
- 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 +208 -224
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +240 -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 +222 -330
- 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 +221 -107
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +181 -105
- 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 +26 -3
- 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 +198 -66
- package/contracts/components/IComponent.sol +50 -0
- package/contracts/components/IDistributionComponent.sol +58 -4
- package/contracts/components/IPoolComponent.sol +54 -29
- package/contracts/components/IProductComponent.sol +7 -3
- package/contracts/components/Pool.sol +153 -157
- package/contracts/components/Product.sol +109 -128
- package/contracts/instance/BundleManager.sol +125 -0
- package/contracts/instance/Cloneable.sol +46 -0
- package/contracts/instance/IInstance.sol +63 -10
- package/contracts/instance/IInstanceService.sol +33 -4
- package/contracts/instance/Instance.sol +104 -266
- package/contracts/instance/InstanceAccessManager.sol +87 -78
- package/contracts/instance/InstanceReader.sol +29 -26
- package/contracts/instance/InstanceService.sol +361 -90
- package/contracts/instance/InstanceServiceManager.sol +10 -12
- package/contracts/instance/ObjectManager.sol +84 -0
- package/contracts/instance/base/ComponentService.sol +134 -0
- package/contracts/instance/module/IAccess.sol +27 -18
- package/contracts/instance/module/IBundle.sol +1 -0
- package/contracts/instance/module/ISetup.sol +7 -3
- 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 +214 -36
- package/contracts/instance/service/DistributionServiceManager.sol +10 -12
- 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 +6 -23
- package/contracts/instance/service/IProductService.sol +6 -73
- package/contracts/instance/service/PolicyService.sol +524 -0
- package/contracts/instance/service/PolicyServiceManager.sol +54 -0
- package/contracts/instance/service/PoolService.sol +109 -0
- package/contracts/instance/service/PoolServiceManager.sol +51 -0
- package/contracts/instance/service/ProductService.sol +233 -0
- package/contracts/instance/service/ProductServiceManager.sol +54 -0
- package/contracts/registry/ChainNft.sol +1 -1
- package/contracts/registry/IRegistry.sol +38 -33
- package/contracts/registry/IRegistryService.sol +45 -13
- package/contracts/registry/Registry.sol +223 -250
- package/contracts/registry/RegistryAccessManager.sol +216 -0
- package/contracts/registry/RegistryService.sol +86 -224
- 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 +114 -60
- 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 +19 -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/NftIdSet.sol +26 -24
- package/contracts/types/ObjectType.sol +6 -2
- package/contracts/types/RoleId.sol +10 -8
- package/package.json +3 -3
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +0 -4
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +0 -327
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +0 -4
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +0 -280
- package/artifacts/contracts/instance/AccessManagedSimple.sol/AccessManagedSimple.dbg.json +0 -4
- package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.dbg.json +0 -4
- package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.json +0 -1132
- 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/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 -91
- package/contracts/components/IBaseComponent.sol +0 -25
- package/contracts/instance/AccessManagedSimple.sol +0 -115
- package/contracts/instance/AccessManagerSimple.sol +0 -692
- package/contracts/instance/IAccessManagerSimple.sol +0 -391
- package/contracts/instance/base/ComponentServiceBase.sol +0 -39
- 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
@@ -1,41 +1,51 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {
|
5
|
-
import {ShortString, ShortStrings} from "@openzeppelin/contracts/utils/ShortStrings.sol";
|
4
|
+
import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";
|
6
5
|
|
7
|
-
import {AccessManagedSimple} from "./AccessManagedSimple.sol";
|
8
|
-
import {AccessManagerSimple} from "./AccessManagerSimple.sol";
|
9
|
-
import {IAccess} from "./module/IAccess.sol";
|
10
|
-
import {IBundle} from "./module/IBundle.sol";
|
11
|
-
import {IPolicy} from "./module/IPolicy.sol";
|
12
|
-
import {IRisk} from "./module/IRisk.sol";
|
13
|
-
import {ISetup} from "./module/ISetup.sol";
|
14
6
|
import {Key32, KeyId, Key32Lib} from "../types/Key32.sol";
|
15
|
-
import {KeyValueStore} from "./base/KeyValueStore.sol";
|
16
|
-
import {IInstance} from "./IInstance.sol";
|
17
|
-
import {InstanceReader} from "./InstanceReader.sol";
|
18
7
|
import {NftId} from "../types/NftId.sol";
|
19
8
|
import {NumberId} from "../types/NumberId.sol";
|
20
|
-
import {ObjectType, BUNDLE, DISTRIBUTION, INSTANCE, POLICY, POOL, ROLE, PRODUCT, TARGET} from "../types/ObjectType.sol";
|
9
|
+
import {ObjectType, BUNDLE, DISTRIBUTION, INSTANCE, POLICY, POOL, ROLE, PRODUCT, TARGET, COMPONENT, DISTRIBUTOR, DISTRIBUTOR_TYPE} from "../types/ObjectType.sol";
|
21
10
|
import {RiskId, RiskIdLib} from "../types/RiskId.sol";
|
22
11
|
import {RoleId, RoleIdLib} from "../types/RoleId.sol";
|
23
12
|
import {StateId, ACTIVE} from "../types/StateId.sol";
|
13
|
+
import {TimestampLib} from "../types/Timestamp.sol";
|
14
|
+
import {VersionPart} from "../types/Version.sol";
|
15
|
+
|
24
16
|
import {ERC165} from "../shared/ERC165.sol";
|
25
17
|
import {Registerable} from "../shared/Registerable.sol";
|
26
|
-
|
27
|
-
import {
|
18
|
+
|
19
|
+
import {IInstance} from "./IInstance.sol";
|
20
|
+
import {InstanceReader} from "./InstanceReader.sol";
|
21
|
+
import {InstanceAccessManager} from "./InstanceAccessManager.sol";
|
22
|
+
import {BundleManager} from "./BundleManager.sol";
|
23
|
+
|
24
|
+
import {KeyValueStore} from "./base/KeyValueStore.sol";
|
25
|
+
|
26
|
+
import {IAccess} from "./module/IAccess.sol";
|
27
|
+
import {IBundle} from "./module/IBundle.sol";
|
28
|
+
import {IDistribution} from "./module/IDistribution.sol";
|
29
|
+
import {IPolicy} from "./module/IPolicy.sol";
|
30
|
+
import {IRisk} from "./module/IRisk.sol";
|
31
|
+
import {ISetup} from "./module/ISetup.sol";
|
32
|
+
|
28
33
|
import {IDistributionService} from "./service/IDistributionService.sol";
|
29
|
-
import {
|
34
|
+
import {IPoolService} from "./service/IPoolService.sol";
|
35
|
+
import {IProductService} from "./service/IProductService.sol";
|
36
|
+
import {IPolicyService} from "./service/IPolicyService.sol";
|
37
|
+
import {IBundleService} from "./service/IBundleService.sol";
|
38
|
+
import {VersionPart, VersionPartLib} from "../types/Version.sol";
|
30
39
|
|
31
40
|
contract Instance is
|
32
|
-
AccessManagedSimple,
|
33
|
-
KeyValueStore,
|
34
41
|
IInstance,
|
35
|
-
|
36
|
-
Registerable
|
42
|
+
AccessManagedUpgradeable,
|
43
|
+
Registerable,
|
44
|
+
KeyValueStore
|
37
45
|
{
|
38
46
|
|
47
|
+
uint256 public constant GIF_MAJOR_VERSION = 3;
|
48
|
+
|
39
49
|
uint64 public constant ADMIN_ROLE = type(uint64).min;
|
40
50
|
uint64 public constant PUBLIC_ROLE = type(uint64).max;
|
41
51
|
uint64 public constant CUSTOM_ROLE_ID_MIN = 10000;
|
@@ -44,153 +54,18 @@ contract Instance is
|
|
44
54
|
|
45
55
|
bool private _initialized;
|
46
56
|
|
47
|
-
|
48
|
-
mapping(RoleId roleId => EnumerableSet.AddressSet roleMembers) internal _roleMembers;
|
49
|
-
RoleId [] internal _roles;
|
50
|
-
|
51
|
-
mapping(ShortString name => address target) internal _target;
|
52
|
-
|
53
|
-
AccessManagerSimple internal _accessManager;
|
57
|
+
InstanceAccessManager internal _accessManager;
|
54
58
|
InstanceReader internal _instanceReader;
|
59
|
+
BundleManager internal _bundleManager;
|
55
60
|
|
56
|
-
|
61
|
+
function initialize(address accessManagerAddress, address registryAddress, NftId registryNftId, address initialOwner)
|
62
|
+
public
|
63
|
+
initializer()
|
57
64
|
{
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
require(!_initialized, "Contract instance has already been initialized");
|
63
|
-
|
64
|
-
initializeAccessManagedSimple(accessManagerAddress);
|
65
|
-
|
66
|
-
_accessManager = AccessManagerSimple(accessManagerAddress);
|
67
|
-
_createRole(RoleIdLib.toRoleId(ADMIN_ROLE), "AdminRole", false, false);
|
68
|
-
_createRole(RoleIdLib.toRoleId(PUBLIC_ROLE), "PublicRole", false, false);
|
69
|
-
|
70
|
-
_initializeRegisterable(registryAddress, registryNftId, INSTANCE(), false, initialOwner, "");
|
71
|
-
|
72
|
-
_registerInterface(type(IInstance).interfaceId);
|
73
|
-
_initialized = true;
|
74
|
-
}
|
75
|
-
|
76
|
-
//--- Role ------------------------------------------------------//
|
77
|
-
function createStandardRole(RoleId roleId, string memory name) external restricted() {
|
78
|
-
_createRole(roleId, name, false, true);
|
79
|
-
}
|
80
|
-
|
81
|
-
function createCustomRole(RoleId roleId, string memory name) external restricted() {
|
82
|
-
_createRole(roleId, name, true, true);
|
83
|
-
}
|
84
|
-
|
85
|
-
function updateRole(RoleId roleId, string memory name, StateId newState) external restricted() {
|
86
|
-
(bool isCustom,) = _validateRoleParameters(roleId, name, false);
|
87
|
-
IAccess.RoleInfo memory role = _toRole(roleId, name, isCustom);
|
88
|
-
update(toRoleKey32(roleId), abi.encode(role), newState);
|
89
|
-
}
|
90
|
-
|
91
|
-
function updateRoleState(RoleId roleId, StateId newState) external restricted() {
|
92
|
-
updateState(toRoleKey32(roleId), newState);
|
93
|
-
}
|
94
|
-
|
95
|
-
function grantRole(RoleId roleId, address member) external restricted() returns (bool granted) {
|
96
|
-
Key32 roleKey = toRoleKey32(roleId);
|
97
|
-
|
98
|
-
if (!exists(roleKey)) {
|
99
|
-
revert IAccess.ErrorGrantNonexstentRole(roleId);
|
100
|
-
}
|
101
|
-
|
102
|
-
if (getState(roleKey) != ACTIVE()) {
|
103
|
-
revert IAccess.ErrorRoleIdNotActive(roleId);
|
104
|
-
}
|
105
|
-
|
106
|
-
if (!EnumerableSet.contains(_roleMembers[roleId], member)) {
|
107
|
-
_accessManager.grantRole(roleId.toInt(), member, EXECUTION_DELAY);
|
108
|
-
EnumerableSet.add(_roleMembers[roleId], member);
|
109
|
-
return true;
|
110
|
-
}
|
111
|
-
|
112
|
-
return false;
|
113
|
-
}
|
114
|
-
|
115
|
-
function revokeRole(RoleId roleId, address member) external restricted() returns (bool revoked) {
|
116
|
-
Key32 roleKey = toRoleKey32(roleId);
|
117
|
-
|
118
|
-
if (!exists(roleKey)) {
|
119
|
-
revert IAccess.ErrorRevokeNonexstentRole(roleId);
|
120
|
-
}
|
121
|
-
|
122
|
-
if (EnumerableSet.contains(_roleMembers[roleId], member)) {
|
123
|
-
_accessManager.revokeRole(roleId.toInt(), member);
|
124
|
-
EnumerableSet.remove(_roleMembers[roleId], member);
|
125
|
-
return true;
|
126
|
-
}
|
127
|
-
|
128
|
-
return false;
|
129
|
-
}
|
130
|
-
|
131
|
-
/// @dev not restricted function by intention
|
132
|
-
/// the restriction to role members is already enforced by the call to the access manger
|
133
|
-
function renounceRole(RoleId roleId) external returns (bool revoked) {
|
134
|
-
address member = msg.sender;
|
135
|
-
Key32 roleKey = toRoleKey32(roleId);
|
136
|
-
|
137
|
-
if (!exists(roleKey)) {
|
138
|
-
revert IAccess.ErrorRenounceNonexstentRole(roleId);
|
139
|
-
}
|
140
|
-
|
141
|
-
if (EnumerableSet.contains(_roleMembers[roleId], member)) {
|
142
|
-
_accessManager.renounceRole(roleId.toInt(), member);
|
143
|
-
EnumerableSet.remove(_roleMembers[roleId], member);
|
144
|
-
return true;
|
145
|
-
}
|
146
|
-
|
147
|
-
return false;
|
148
|
-
}
|
149
|
-
|
150
|
-
function roles() external view returns (uint256 numberOfRoles) {
|
151
|
-
return _roles.length;
|
152
|
-
}
|
153
|
-
|
154
|
-
function getRoleId(uint256 idx) external view returns (RoleId roleId) {
|
155
|
-
return _roles[idx];
|
156
|
-
}
|
157
|
-
|
158
|
-
function getRole(RoleId roleId) external view returns (IAccess.RoleInfo memory role) {
|
159
|
-
return abi.decode(getData(roleId.toKey32()), (IAccess.RoleInfo));
|
160
|
-
}
|
161
|
-
|
162
|
-
function roleMembers(RoleId roleId) external view returns (uint256 numberOfMembers) {
|
163
|
-
return EnumerableSet.length(_roleMembers[roleId]);
|
164
|
-
}
|
165
|
-
|
166
|
-
function getRoleMember(RoleId roleId, uint256 idx) external view returns (address roleMember) {
|
167
|
-
return EnumerableSet.at(_roleMembers[roleId], idx);
|
168
|
-
}
|
169
|
-
|
170
|
-
function _createRole(RoleId roleId, string memory name, bool isCustom, bool validateParameters) internal {
|
171
|
-
if (validateParameters) {
|
172
|
-
_validateRoleParameters(roleId, name, isCustom);
|
173
|
-
}
|
174
|
-
|
175
|
-
IAccess.RoleInfo memory role = _toRole(roleId, name, isCustom);
|
176
|
-
_role[role.name] = roleId;
|
177
|
-
_roles.push(roleId);
|
178
|
-
|
179
|
-
create(toRoleKey32(roleId), abi.encode(role));
|
180
|
-
}
|
181
|
-
|
182
|
-
//--- Target ------------------------------------------------------//
|
183
|
-
function createTarget(address target, IAccess.TargetInfo memory targetInfo) external restricted() {
|
184
|
-
_validateTargetParameters(target, targetInfo);
|
185
|
-
create(toTargetKey32(target), abi.encode(targetInfo));
|
186
|
-
}
|
187
|
-
|
188
|
-
function setTargetClosed(address target, bool closed) external restricted() {
|
189
|
-
if (!exists(toTargetKey32(target))) {
|
190
|
-
revert IAccess.ErrorTargetDoesNotExist(target);
|
191
|
-
}
|
192
|
-
|
193
|
-
_accessManager.setTargetClosed(target, closed);
|
65
|
+
__AccessManaged_init(accessManagerAddress);
|
66
|
+
|
67
|
+
initializeRegisterable(registryAddress, registryNftId, INSTANCE(), false, initialOwner, "");
|
68
|
+
registerInterface(type(IInstance).interfaceId);
|
194
69
|
}
|
195
70
|
|
196
71
|
//--- ProductSetup ------------------------------------------------------//
|
@@ -220,55 +95,55 @@ contract Instance is
|
|
220
95
|
}
|
221
96
|
|
222
97
|
//--- PoolSetup ------------------------------------------------------//
|
223
|
-
function createPoolSetup(NftId
|
224
|
-
create(_toNftKey32(
|
98
|
+
function createPoolSetup(NftId poolNftId, ISetup.PoolSetupInfo memory setup) external restricted() {
|
99
|
+
create(_toNftKey32(poolNftId, POOL()), abi.encode(setup));
|
225
100
|
}
|
226
101
|
|
227
|
-
function updatePoolSetup(NftId
|
228
|
-
update(_toNftKey32(
|
102
|
+
function updatePoolSetup(NftId poolNftId, ISetup.PoolSetupInfo memory setup, StateId newState) external restricted() {
|
103
|
+
update(_toNftKey32(poolNftId, POOL()), abi.encode(setup), newState);
|
229
104
|
}
|
230
105
|
|
231
|
-
function updatePoolSetupState(NftId
|
232
|
-
updateState(_toNftKey32(
|
106
|
+
function updatePoolSetupState(NftId poolNftId, StateId newState) external restricted() {
|
107
|
+
updateState(_toNftKey32(poolNftId, POOL()), newState);
|
233
108
|
}
|
234
109
|
|
235
|
-
//--- DistributorType
|
236
|
-
function createDistributorType(
|
237
|
-
create(
|
110
|
+
//--- DistributorType -------------------------------------------------------//
|
111
|
+
function createDistributorType(Key32 distributorKey, IDistribution.DistributorTypeInfo memory info) external restricted() {
|
112
|
+
create(distributorKey, abi.encode(info));
|
238
113
|
}
|
239
114
|
|
240
|
-
function updateDistributorType(
|
241
|
-
update(
|
115
|
+
function updateDistributorType(Key32 distributorKey, IDistribution.DistributorTypeInfo memory info, StateId newState) external restricted() {
|
116
|
+
update(distributorKey, abi.encode(info), newState);
|
242
117
|
}
|
243
118
|
|
244
|
-
function updateDistributorTypeState(
|
245
|
-
updateState(
|
119
|
+
function updateDistributorTypeState(Key32 distributorKey, StateId newState) external restricted() {
|
120
|
+
updateState(distributorKey, newState);
|
246
121
|
}
|
247
122
|
|
248
123
|
//--- Distributor -------------------------------------------------------//
|
249
|
-
function createDistributor(NftId
|
250
|
-
create(
|
124
|
+
function createDistributor(NftId nftId, IDistribution.DistributorInfo memory info) external restricted() {
|
125
|
+
create(toDistributorKey32(nftId), abi.encode(info));
|
251
126
|
}
|
252
127
|
|
253
|
-
function updateDistributor(NftId
|
254
|
-
update(
|
128
|
+
function updateDistributor(NftId nftId, IDistribution.DistributorInfo memory info, StateId newState) external restricted() {
|
129
|
+
update(toDistributorKey32(nftId), abi.encode(info), newState);
|
255
130
|
}
|
256
131
|
|
257
|
-
function updateDistributorState(NftId
|
258
|
-
updateState(
|
132
|
+
function updateDistributorState(NftId nftId, StateId newState) external restricted() {
|
133
|
+
updateState(toDistributorKey32(nftId), newState);
|
259
134
|
}
|
260
135
|
|
261
136
|
//--- Referral ----------------------------------------------------------//
|
262
|
-
function createReferral(
|
263
|
-
create(
|
137
|
+
function createReferral(Key32 referralKey, IDistribution.ReferralInfo memory referralInfo) external restricted() {
|
138
|
+
create(referralKey, abi.encode(referralInfo));
|
264
139
|
}
|
265
140
|
|
266
|
-
function updateReferral(
|
267
|
-
update(
|
141
|
+
function updateReferral(Key32 referralKey, IDistribution.ReferralInfo memory referralInfo, StateId newState) external restricted() {
|
142
|
+
update(referralKey, abi.encode(referralInfo), newState);
|
268
143
|
}
|
269
144
|
|
270
|
-
function updateReferralState(
|
271
|
-
updateState(
|
145
|
+
function updateReferralState(Key32 referralKey, StateId newState) external restricted() {
|
146
|
+
updateState(referralKey, newState);
|
272
147
|
}
|
273
148
|
|
274
149
|
//--- Bundle ------------------------------------------------------------//
|
@@ -337,71 +212,6 @@ contract Instance is
|
|
337
212
|
}
|
338
213
|
|
339
214
|
//--- internal view/pure functions --------------------------------------//
|
340
|
-
function _toRole(RoleId roleId, string memory name, bool isCustom)
|
341
|
-
internal
|
342
|
-
pure
|
343
|
-
returns (IAccess.RoleInfo memory role)
|
344
|
-
{
|
345
|
-
return IAccess.RoleInfo(
|
346
|
-
ShortStrings.toShortString(name),
|
347
|
-
isCustom);
|
348
|
-
}
|
349
|
-
|
350
|
-
function _validateRoleParameters(
|
351
|
-
RoleId roleId,
|
352
|
-
string memory name,
|
353
|
-
bool isCustom
|
354
|
-
)
|
355
|
-
internal
|
356
|
-
view
|
357
|
-
returns (
|
358
|
-
bool roleExists,
|
359
|
-
bool roleIsCustom
|
360
|
-
)
|
361
|
-
{
|
362
|
-
Key32 roleKey = toRoleKey32(roleId);
|
363
|
-
roleExists = exists(roleKey);
|
364
|
-
if (roleExists) {
|
365
|
-
roleIsCustom = abi.decode(getData(roleKey), (IAccess.RoleInfo)).isCustom;
|
366
|
-
} else {
|
367
|
-
roleIsCustom = isCustom;
|
368
|
-
}
|
369
|
-
|
370
|
-
// check role id
|
371
|
-
uint64 roleIdInt = RoleId.unwrap(roleId);
|
372
|
-
if(roleIdInt == ADMIN_ROLE || roleIdInt == PUBLIC_ROLE) {
|
373
|
-
revert IAccess.ErrorRoleIdInvalid(roleId);
|
374
|
-
}
|
375
|
-
|
376
|
-
if (roleIsCustom && roleIdInt < CUSTOM_ROLE_ID_MIN) {
|
377
|
-
revert IAccess.ErrorRoleIdTooSmall(roleId);
|
378
|
-
} else if (roleIsCustom && roleIdInt >= CUSTOM_ROLE_ID_MIN) {
|
379
|
-
revert IAccess.ErrorRoleIdTooBig(roleId);
|
380
|
-
}
|
381
|
-
|
382
|
-
// role name checks
|
383
|
-
ShortString nameShort = ShortStrings.toShortString(name);
|
384
|
-
if (ShortStrings.byteLength(nameShort) == 0) {
|
385
|
-
revert IAccess.ErrorRoleNameEmpty(roleId);
|
386
|
-
}
|
387
|
-
|
388
|
-
if (_role[nameShort] != RoleIdLib.zero() && _role[nameShort] != roleId) {
|
389
|
-
revert IAccess.ErrorRoleNameNotUnique(_role[nameShort], nameShort);
|
390
|
-
}
|
391
|
-
}
|
392
|
-
|
393
|
-
function _validateTargetParameters(address target, IAccess.TargetInfo memory targetInfo) internal view {
|
394
|
-
|
395
|
-
}
|
396
|
-
|
397
|
-
function toRoleKey32(RoleId roleId) public pure returns (Key32) {
|
398
|
-
return roleId.toKey32();
|
399
|
-
}
|
400
|
-
|
401
|
-
function toTargetKey32(address target) public pure returns (Key32) {
|
402
|
-
return Key32Lib.toKey32(TARGET(), KeyId.wrap(bytes20(target)));
|
403
|
-
}
|
404
|
-
|
405
215
|
function _toNftKey32(NftId nftId, ObjectType objectType) internal pure returns (Key32) {
|
406
216
|
return nftId.toKey32(objectType);
|
407
217
|
}
|
@@ -414,30 +224,58 @@ contract Instance is
|
|
414
224
|
return policyNftId.toKey32(POLICY());
|
415
225
|
}
|
416
226
|
|
417
|
-
function
|
418
|
-
return
|
227
|
+
function toDistributionKey32(NftId distNftId) public pure returns (Key32) {
|
228
|
+
return distNftId.toKey32(DISTRIBUTION());
|
419
229
|
}
|
420
230
|
|
231
|
+
function toDistributorTypeKey32(NftId distNftId) public pure returns (Key32) {
|
232
|
+
return distNftId.toKey32(DISTRIBUTOR_TYPE());
|
233
|
+
}
|
234
|
+
|
235
|
+
function toDistributorKey32(NftId distNftId) public pure returns (Key32) {
|
236
|
+
return distNftId.toKey32(DISTRIBUTOR());
|
237
|
+
}
|
238
|
+
|
421
239
|
function getDistributionService() external view returns (IDistributionService) {
|
422
|
-
return IDistributionService(
|
240
|
+
return IDistributionService(getRegistry().getServiceAddress(DISTRIBUTION(), VersionPart.wrap(3)));
|
241
|
+
}
|
242
|
+
|
243
|
+
function getProductService() external view returns (IProductService) {
|
244
|
+
return IProductService(getRegistry().getServiceAddress(PRODUCT(), VersionPart.wrap(3)));
|
245
|
+
}
|
246
|
+
|
247
|
+
function getPoolService() external view returns (IPoolService) {
|
248
|
+
return IPoolService(getRegistry().getServiceAddress(POOL(), VersionPart.wrap(3)));
|
423
249
|
}
|
424
250
|
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
// }
|
251
|
+
function getPolicyService() external view returns (IPolicyService) {
|
252
|
+
return IPolicyService(getRegistry().getServiceAddress(POLICY(), VersionPart.wrap(3)));
|
253
|
+
}
|
429
254
|
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
// }
|
255
|
+
function getBundleService() external view returns (IBundleService) {
|
256
|
+
return IBundleService(getRegistry().getServiceAddress(BUNDLE(), VersionPart.wrap(3)));
|
257
|
+
}
|
434
258
|
|
435
259
|
function setInstanceReader(InstanceReader instanceReader) external restricted() {
|
436
|
-
require(
|
260
|
+
require(instanceReader.getInstance() == Instance(this), "InstanceReader instance mismatch");
|
437
261
|
_instanceReader = instanceReader;
|
438
262
|
}
|
439
263
|
|
264
|
+
function getMajorVersion() external pure returns (VersionPart majorVersion) {
|
265
|
+
return VersionPartLib.toVersionPart(GIF_MAJOR_VERSION);
|
266
|
+
}
|
267
|
+
|
440
268
|
function getInstanceReader() external view returns (InstanceReader) {
|
441
269
|
return _instanceReader;
|
442
270
|
}
|
271
|
+
|
272
|
+
function setBundleManager(BundleManager bundleManager) external restricted() {
|
273
|
+
require(address(_bundleManager) == address(0), "BundleManager is set");
|
274
|
+
require(bundleManager.getInstance() == Instance(this), "BundleManager instance mismatch");
|
275
|
+
_bundleManager = bundleManager;
|
276
|
+
}
|
277
|
+
|
278
|
+
function getBundleManager() external view returns (BundleManager) {
|
279
|
+
return _bundleManager;
|
280
|
+
}
|
443
281
|
}
|