@etherisc/gif-next 0.0.2-da77c50-824 → 0.0.2-de0a1d3-009
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +58 -11
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +1 -1
- package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
- package/artifacts/contracts/components/Distribution.sol/Distribution.json +405 -0
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +340 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +131 -0
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +109 -18
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +194 -3
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +160 -21
- 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/SM.sol/SM.json +2 -2
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +2 -2
- 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/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +697 -671
- package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +928 -744
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/{InstanceBase.sol/InstanceBase.json → base/ComponentServiceBase.sol/ComponentServiceBase.json} +107 -33
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +113 -0
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +560 -0
- package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/{module/lifecycle/ILifecycle.sol/ILifecycleModule.json → base/ILifecycle.sol/ILifecycle.json} +10 -77
- package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +4 -0
- package/artifacts/contracts/instance/{service → base}/IService.sol/IService.json +63 -22
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +463 -0
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +710 -0
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +169 -0
- package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +4 -0
- package/artifacts/contracts/instance/{module/product/ProductModule.sol/ProductModule.json → base/ModuleBase.sol/ModuleBase.json} +2 -2
- package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/{service → base}/ServiceBase.sol/ServiceBase.json +93 -6
- package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +71 -50
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +71 -50
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +22 -93
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +22 -93
- package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +10 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +4 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.json +10 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.json +10 -0
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +61 -38
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +61 -38
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +1 -1
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +0 -5
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +0 -5
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +4 -0
- package/artifacts/contracts/instance/module/{product/IProductModule.sol/IProductModule.json → risk/IRisk.sol/IRisk.json} +2 -2
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +113 -0
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +131 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +209 -236
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +2 -2
- package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +209 -236
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +141 -42
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +507 -0
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +62 -21
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/{ComponentServiceBase.sol/ComponentServiceBase.json → IDistributionService.sol/IDistributionService.json} +96 -30
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +127 -22
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +215 -21
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +177 -46
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +322 -62
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +2 -2
- package/artifacts/contracts/registry/RegistryUpgradeable.sol/RegistryUpgradeable.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryUpgradeable.sol/RegistryUpgradeable.json +724 -0
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +58 -17
- package/artifacts/contracts/shared/Proxy.sol/ProxyDeployer.dbg.json +4 -0
- package/artifacts/contracts/shared/Proxy.sol/ProxyDeployer.json +248 -0
- package/artifacts/contracts/shared/Proxy.sol/ProxyWithProxyAdminGetter.dbg.json +4 -0
- package/artifacts/contracts/shared/Proxy.sol/ProxyWithProxyAdminGetter.json +129 -0
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
- package/artifacts/contracts/shared/Versionable.sol/Versionable.json +92 -5
- package/artifacts/contracts/shared/VersionableUpgradeable.sol/VersionableUpgradeable.dbg.json +4 -0
- package/artifacts/contracts/shared/VersionableUpgradeable.sol/VersionableUpgradeable.json +228 -0
- package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
- package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +405 -0
- package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
- package/artifacts/contracts/test/TestFee.sol/TestFee.json +28 -4
- package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +1 -1
- package/artifacts/contracts/test/TestPool.sol/TestPool.json +194 -3
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +1 -1
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +209 -27
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +2 -2
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +38 -4
- package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
- package/artifacts/contracts/test/TestService.sol/TestService.json +102 -43
- 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/TestVersion.sol/TestVersion.json +14 -18
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +102 -39
- package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
- package/artifacts/contracts/test/Usdc.sol/USDC.json +338 -0
- 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/Fee.sol/FeeLib.dbg.json +4 -0
- package/artifacts/contracts/types/Fee.sol/FeeLib.json +257 -0
- package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
- package/artifacts/contracts/types/Key32.sol/Key32Lib.json +111 -0
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +65 -4
- 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/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
- package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +30 -0
- package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +34 -8
- package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionLib.json +101 -2
- package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
- package/contracts/components/BaseComponent.sol +7 -2
- package/contracts/components/Distribution.sol +132 -0
- package/contracts/components/IDistributionComponent.sol +47 -0
- package/contracts/components/IPoolComponent.sol +14 -0
- package/contracts/components/IProductComponent.sol +24 -5
- package/contracts/components/Pool.sol +64 -3
- package/contracts/components/Product.sol +123 -13
- package/contracts/instance/IInstance.sol +16 -13
- package/contracts/instance/Instance.sol +22 -10
- package/contracts/instance/{service → base}/ComponentServiceBase.sol +1 -0
- package/contracts/instance/base/IInstanceBase.sol +22 -0
- package/contracts/instance/base/IKeyValueStore.sol +50 -0
- package/contracts/instance/base/ILifecycle.sol +30 -0
- package/contracts/instance/{InstanceBase.sol → base/InstanceBase.sol} +34 -17
- package/contracts/instance/base/KeyValueStore.sol +161 -0
- package/contracts/instance/{module/lifecycle/LifecycleModule.sol → base/Lifecycle.sol} +50 -39
- package/contracts/instance/base/ModuleBase.sol +57 -0
- package/contracts/instance/{service → base}/ServiceBase.sol +1 -3
- package/contracts/instance/module/access/Access.sol +6 -6
- package/contracts/instance/module/bundle/BundleModule.sol +24 -118
- package/contracts/instance/module/bundle/IBundle.sol +9 -9
- package/contracts/instance/module/component/ComponentModule.sol +27 -61
- package/contracts/instance/module/component/IComponent.sol +5 -30
- package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
- package/contracts/instance/module/distribution/IDistribution.sol +10 -0
- package/contracts/instance/module/policy/IPolicy.sol +12 -9
- package/contracts/instance/module/policy/PolicyModule.sol +33 -26
- package/contracts/instance/module/pool/IPoolModule.sol +0 -1
- package/contracts/instance/module/pool/PoolModule.sol +12 -9
- package/contracts/instance/module/risk/IRisk.sol +26 -0
- package/contracts/instance/module/risk/RiskModule.sol +62 -0
- package/contracts/instance/module/treasury/ITreasury.sol +30 -52
- package/contracts/instance/module/treasury/TreasuryModule.sol +74 -84
- package/contracts/instance/service/ComponentOwnerService.sol +33 -50
- package/contracts/instance/service/DistributionService.sol +59 -0
- package/contracts/instance/service/IComponentOwnerService.sol +1 -1
- package/contracts/instance/service/IDistributionService.sol +12 -0
- package/contracts/instance/service/IPoolService.sol +8 -1
- package/contracts/instance/service/IProductService.sol +56 -7
- package/contracts/instance/service/PoolService.sol +64 -13
- package/contracts/instance/service/ProductService.sol +234 -83
- package/contracts/registry/Registry.sol +4 -4
- package/contracts/registry/RegistryUpgradeable.sol +473 -0
- package/contracts/shared/IVersionable.sol +19 -6
- package/contracts/shared/Proxy.sol +94 -0
- package/contracts/shared/Versionable.sol +16 -9
- package/contracts/shared/VersionableUpgradeable.sol +133 -0
- package/contracts/test/TestDistribution.sol +21 -0
- package/contracts/test/TestFee.sol +3 -3
- package/contracts/test/TestPool.sol +6 -3
- package/contracts/test/TestProduct.sol +36 -8
- package/contracts/test/TestRoleId.sol +2 -2
- package/contracts/test/TestService.sol +3 -6
- package/contracts/test/TestVersion.sol +4 -7
- package/contracts/test/TestVersionable.sol +2 -5
- package/contracts/test/Usdc.sol +26 -0
- package/contracts/types/Fee.sol +44 -20
- package/contracts/types/Key32.sol +45 -0
- package/contracts/types/NftId.sol +16 -1
- package/contracts/types/ObjectType.sol +24 -8
- package/contracts/types/ReferralId.sol +48 -0
- package/contracts/types/RiskId.sol +43 -0
- package/contracts/types/RoleId.sol +12 -10
- package/contracts/types/StateId.sol +7 -1
- package/contracts/types/UFixed.sol +19 -16
- package/contracts/types/Version.sol +37 -25
- package/package.json +1 -1
- package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.dbg.json +0 -4
- package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.json +0 -50
- package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
- package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
- package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
- package/artifacts/contracts/instance/module/product/IProductModule.sol/IProductModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/product/ProductModule.sol/ProductModule.dbg.json +0 -4
- package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/service/IService.sol/IService.dbg.json +0 -4
- package/artifacts/contracts/instance/service/ServiceBase.sol/ServiceBase.dbg.json +0 -4
- package/contracts/instance/IServiceLinked.sol +0 -12
- package/contracts/instance/module/lifecycle/ILifecycle.sol +0 -47
- package/contracts/instance/module/product/IProductModule.sol +0 -6
- package/contracts/instance/module/product/ProductModule.sol +0 -8
- /package/contracts/instance/{service → base}/IService.sol +0 -0
@@ -1,28 +1,35 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.19;
|
3
3
|
|
4
|
-
import {Versionable} from "
|
5
|
-
import {Registerable} from "
|
6
|
-
// import {IRegistry} from "../registry/IRegistry.sol";
|
4
|
+
import {Versionable} from "../../shared/Versionable.sol";
|
5
|
+
import {Registerable} from "../../shared/Registerable.sol";
|
7
6
|
|
8
|
-
|
9
|
-
import {
|
10
|
-
import {NftId} from "
|
11
|
-
import {
|
7
|
+
import {ObjectType, INSTANCE} from "../../types/ObjectType.sol";
|
8
|
+
import {Key32} from "../../types/Key32.sol";
|
9
|
+
import {NftId} from "../../types/NftId.sol";
|
10
|
+
import {StateId} from "../../types/StateId.sol";
|
11
|
+
import {Version, VersionPart, VersionLib} from "../../types/Version.sol";
|
12
12
|
|
13
|
-
import {IComponentOwnerService} from "
|
14
|
-
import {
|
15
|
-
import {
|
13
|
+
import {IComponentOwnerService} from "../service/IComponentOwnerService.sol";
|
14
|
+
import {IDistributionService} from "../service/IDistributionService.sol";
|
15
|
+
import {IProductService} from "../service/IProductService.sol";
|
16
|
+
import {IPoolService} from "../service/IPoolService.sol";
|
16
17
|
|
17
|
-
import {
|
18
|
-
import {IInstance} from "
|
18
|
+
import {IKeyValueStore} from "./IKeyValueStore.sol";
|
19
|
+
import {IInstance} from "../IInstance.sol";
|
20
|
+
import {IInstanceBase} from "./IInstanceBase.sol";
|
21
|
+
|
22
|
+
import {KeyValueStore} from "./KeyValueStore.sol";
|
19
23
|
|
20
24
|
abstract contract InstanceBase is
|
21
25
|
Versionable,
|
22
26
|
Registerable,
|
23
|
-
|
27
|
+
IInstanceBase
|
24
28
|
{
|
29
|
+
IKeyValueStore internal _keyValueStore;
|
30
|
+
|
25
31
|
IComponentOwnerService internal _componentOwnerService;
|
32
|
+
IDistributionService internal _distributionService;
|
26
33
|
IProductService internal _productService;
|
27
34
|
IPoolService internal _poolService;
|
28
35
|
|
@@ -33,10 +40,22 @@ abstract contract InstanceBase is
|
|
33
40
|
Registerable(registry, registryNftId)
|
34
41
|
Versionable()
|
35
42
|
{
|
43
|
+
_keyValueStore = new KeyValueStore();
|
44
|
+
|
36
45
|
_registerInterface(type(IInstance).interfaceId);
|
37
46
|
_linkToServicesInRegistry();
|
38
47
|
}
|
39
48
|
|
49
|
+
function getKeyValueStore() public view virtual override returns (IKeyValueStore keyValueStore) { return _keyValueStore; }
|
50
|
+
|
51
|
+
function updateState(Key32 key, StateId state) external override {
|
52
|
+
_keyValueStore.updateState(key, state);
|
53
|
+
}
|
54
|
+
|
55
|
+
function getState(Key32 key) external view override returns (StateId state) {
|
56
|
+
return _keyValueStore.getState(key);
|
57
|
+
}
|
58
|
+
|
40
59
|
// from versionable
|
41
60
|
function getVersion()
|
42
61
|
public
|
@@ -44,10 +63,7 @@ abstract contract InstanceBase is
|
|
44
63
|
virtual override
|
45
64
|
returns(Version)
|
46
65
|
{
|
47
|
-
return toVersion(
|
48
|
-
toVersionPart(3),
|
49
|
-
toVersionPart(0),
|
50
|
-
toVersionPart(0));
|
66
|
+
return VersionLib.toVersion(3,0,0);
|
51
67
|
}
|
52
68
|
|
53
69
|
// from registerable
|
@@ -60,6 +76,7 @@ abstract contract InstanceBase is
|
|
60
76
|
function _linkToServicesInRegistry() internal {
|
61
77
|
VersionPart majorVersion = getVersion().toMajorPart();
|
62
78
|
_componentOwnerService = IComponentOwnerService(_getAndCheck("ComponentOwnerService", majorVersion));
|
79
|
+
_distributionService = IDistributionService(_getAndCheck("DistributionService", majorVersion));
|
63
80
|
_productService = IProductService(_getAndCheck("ProductService", majorVersion));
|
64
81
|
_poolService = IPoolService(_getAndCheck("PoolService", majorVersion));
|
65
82
|
}
|
@@ -0,0 +1,161 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.19;
|
3
|
+
|
4
|
+
import {Blocknumber, blockBlocknumber, zeroBlocknumber} from "../../types/Blocknumber.sol";
|
5
|
+
import {Key32, KeyId, Key32Lib} from "../../types/Key32.sol";
|
6
|
+
import {NftId} from "../../types/NftId.sol";
|
7
|
+
import {ObjectType} from "../../types/ObjectType.sol";
|
8
|
+
import {StateId, ACTIVE} from "../../types/StateId.sol";
|
9
|
+
import {Timestamp, blockTimestamp, zeroTimestamp} from "../../types/Timestamp.sol";
|
10
|
+
|
11
|
+
import {Lifecycle} from "./Lifecycle.sol";
|
12
|
+
import {IKeyValueStore} from "./IKeyValueStore.sol";
|
13
|
+
|
14
|
+
contract KeyValueStore is Lifecycle, IKeyValueStore {
|
15
|
+
|
16
|
+
mapping(Key32 key32 => Value value) private _value;
|
17
|
+
address private _owner;
|
18
|
+
|
19
|
+
modifier onlyOwner() {
|
20
|
+
require(
|
21
|
+
msg.sender == _owner,
|
22
|
+
"ERROR:KVS-001:NOT_OWNER");
|
23
|
+
_;
|
24
|
+
}
|
25
|
+
|
26
|
+
constructor() {
|
27
|
+
_owner = msg.sender;
|
28
|
+
}
|
29
|
+
|
30
|
+
function create(
|
31
|
+
Key32 key32,
|
32
|
+
ObjectType objectType,
|
33
|
+
bytes memory data
|
34
|
+
)
|
35
|
+
public
|
36
|
+
onlyOwner
|
37
|
+
{
|
38
|
+
require(objectType.gtz(), "ERROR:KVS-010:TYPE_UNDEFINED");
|
39
|
+
|
40
|
+
Metadata storage metadata = _value[key32].metadata;
|
41
|
+
require(metadata.state.eqz(), "ERROR:KVS-012:ALREADY_CREATED");
|
42
|
+
|
43
|
+
address createdBy = msg.sender;
|
44
|
+
Blocknumber blocknumber = blockBlocknumber();
|
45
|
+
StateId initialState = hasLifecycle(objectType) ? getInitialState(objectType) : ACTIVE();
|
46
|
+
|
47
|
+
// set metadata
|
48
|
+
metadata.objectType = objectType;
|
49
|
+
metadata.state = initialState;
|
50
|
+
metadata.updatedBy = createdBy;
|
51
|
+
metadata.updatedIn = blocknumber;
|
52
|
+
metadata.createdIn = blocknumber;
|
53
|
+
|
54
|
+
// set data
|
55
|
+
_value[key32].data = data;
|
56
|
+
|
57
|
+
// solhint-disable-next-line avoid-tx-origin
|
58
|
+
emit LogInfoCreated(toKey(key32), initialState, createdBy, tx.origin);
|
59
|
+
}
|
60
|
+
|
61
|
+
function update(Key32 key32, StateId state, bytes memory data)
|
62
|
+
public
|
63
|
+
onlyOwner
|
64
|
+
{
|
65
|
+
require(state.gtz(), "ERROR:KVS-020:STATE_UNDEFINED");
|
66
|
+
Metadata storage metadata = _value[key32].metadata;
|
67
|
+
StateId stateOld = metadata.state;
|
68
|
+
require(stateOld.gtz(), "ERROR:KVS-021:NOT_EXISTING");
|
69
|
+
|
70
|
+
// update data
|
71
|
+
_value[key32].data = data;
|
72
|
+
|
73
|
+
// update metadata (and state)
|
74
|
+
address updatedBy = msg.sender;
|
75
|
+
Blocknumber lastUpdatedIn = metadata.updatedIn;
|
76
|
+
metadata.state = state;
|
77
|
+
metadata.updatedBy = updatedBy;
|
78
|
+
metadata.updatedIn = blockBlocknumber();
|
79
|
+
|
80
|
+
// create log entries
|
81
|
+
Key memory key = toKey(key32);
|
82
|
+
// solhint-disable-next-line avoid-tx-origin
|
83
|
+
emit LogStateUpdated(key, state, stateOld, updatedBy, tx.origin, lastUpdatedIn);
|
84
|
+
// solhint-disable-next-line avoid-tx-origin
|
85
|
+
emit LogInfoUpdated(key, state, updatedBy, tx.origin, lastUpdatedIn);
|
86
|
+
}
|
87
|
+
|
88
|
+
function updateData(Key32 key32, bytes memory data)
|
89
|
+
public
|
90
|
+
onlyOwner
|
91
|
+
{
|
92
|
+
Metadata storage metadata = _value[key32].metadata;
|
93
|
+
StateId state = metadata.state;
|
94
|
+
require(state.gtz(), "ERROR:KVS-030:NOT_EXISTING");
|
95
|
+
|
96
|
+
// update data
|
97
|
+
_value[key32].data = data;
|
98
|
+
|
99
|
+
// update metadata
|
100
|
+
address updatedBy = msg.sender;
|
101
|
+
Blocknumber lastUpdatedIn = metadata.updatedIn;
|
102
|
+
metadata.updatedBy = updatedBy;
|
103
|
+
metadata.updatedIn = blockBlocknumber();
|
104
|
+
|
105
|
+
// create log entry
|
106
|
+
Key memory key = toKey(key32);
|
107
|
+
// solhint-disable-next-line avoid-tx-origin
|
108
|
+
emit LogInfoUpdated(key, state, updatedBy, tx.origin, lastUpdatedIn);
|
109
|
+
}
|
110
|
+
|
111
|
+
function updateState(Key32 key32, StateId state)
|
112
|
+
public
|
113
|
+
onlyOwner
|
114
|
+
{
|
115
|
+
require(state.gtz(), "ERROR:KVS-040:STATE_UNDEFINED");
|
116
|
+
Metadata storage metadata = _value[key32].metadata;
|
117
|
+
StateId stateOld = metadata.state;
|
118
|
+
require(stateOld.gtz(), "ERROR:KVS-041:NOT_EXISTING");
|
119
|
+
|
120
|
+
// update metadata (and state)
|
121
|
+
address updatedBy = msg.sender;
|
122
|
+
Blocknumber lastUpdatedIn = metadata.updatedIn;
|
123
|
+
metadata.state = state;
|
124
|
+
metadata.updatedBy = updatedBy;
|
125
|
+
metadata.updatedIn = blockBlocknumber();
|
126
|
+
|
127
|
+
// create log entry
|
128
|
+
Key memory key = toKey(key32);
|
129
|
+
// solhint-disable-next-line avoid-tx-origin
|
130
|
+
emit LogStateUpdated(key, state, stateOld, updatedBy, tx.origin, lastUpdatedIn);
|
131
|
+
}
|
132
|
+
|
133
|
+
function exists(Key32 key32) public view returns (bool) {
|
134
|
+
return _value[key32].metadata.state.gtz();
|
135
|
+
}
|
136
|
+
|
137
|
+
function get(Key32 key32) public view returns (Value memory value) {
|
138
|
+
return _value[key32];
|
139
|
+
}
|
140
|
+
|
141
|
+
function getMetadata(Key32 key32) public view returns (Metadata memory metadata) {
|
142
|
+
return _value[key32].metadata;
|
143
|
+
}
|
144
|
+
|
145
|
+
function getData(Key32 key32) public view returns (bytes memory data) {
|
146
|
+
return _value[key32].data;
|
147
|
+
}
|
148
|
+
|
149
|
+
function getState(Key32 key32) public view returns (StateId state) {
|
150
|
+
return _value[key32].metadata.state;
|
151
|
+
}
|
152
|
+
|
153
|
+
function toKey32(ObjectType objectType, KeyId id) external pure override returns(Key32) {
|
154
|
+
return Key32Lib.toKey32(objectType, id);
|
155
|
+
}
|
156
|
+
|
157
|
+
function toKey(Key32 key32) public pure override returns (Key memory key) {
|
158
|
+
(ObjectType objectType, KeyId id) = key32.toKey();
|
159
|
+
return Key(objectType, id);
|
160
|
+
}
|
161
|
+
}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.19;
|
3
3
|
|
4
|
-
import {NftId} from "
|
5
|
-
import {ObjectType,
|
6
|
-
import {StateId, ACTIVE, PAUSED, ARCHIVED, CLOSED, APPLIED, UNDERWRITTEN, REVOKED, DECLINED} from "
|
7
|
-
import {
|
4
|
+
import {NftId} from "../../types/NftId.sol";
|
5
|
+
import {ObjectType, COMPONENT, BUNDLE, POLICY, RISK} from "../../types/ObjectType.sol";
|
6
|
+
import {StateId, ACTIVE, PAUSED, ARCHIVED, CLOSED, APPLIED, UNDERWRITTEN, REVOKED, DECLINED} from "../../types/StateId.sol";
|
7
|
+
import {ILifecycle} from "./ILifecycle.sol";
|
8
8
|
|
9
|
-
contract
|
9
|
+
contract Lifecycle is ILifecycle {
|
10
10
|
mapping(ObjectType objectType => StateId initialState)
|
11
11
|
private _initialState;
|
12
12
|
|
@@ -14,46 +14,50 @@ contract LifecycleModule is ILifecycleModule {
|
|
14
14
|
private _isValidTransition;
|
15
15
|
|
16
16
|
constructor() {
|
17
|
-
_setupComponentLifecycle(PRODUCT());
|
18
|
-
_setupComponentLifecycle(ORACLE());
|
19
|
-
_setupComponentLifecycle(POOL());
|
20
|
-
|
21
17
|
_setupBundleLifecycle();
|
18
|
+
_setupComponentLifecycle();
|
22
19
|
_setupPolicyLifecycle();
|
20
|
+
_setupRiskLifecycle();
|
21
|
+
}
|
22
|
+
|
23
|
+
function hasLifecycle(
|
24
|
+
ObjectType objectType
|
25
|
+
)
|
26
|
+
public
|
27
|
+
view
|
28
|
+
override
|
29
|
+
returns (bool)
|
30
|
+
{
|
31
|
+
return _initialState[objectType].gtz();
|
32
|
+
}
|
33
|
+
|
34
|
+
function getInitialState(
|
35
|
+
ObjectType objectType
|
36
|
+
)
|
37
|
+
public
|
38
|
+
view
|
39
|
+
returns (StateId)
|
40
|
+
{
|
41
|
+
return _initialState[objectType];
|
23
42
|
}
|
24
43
|
|
25
|
-
function
|
26
|
-
NftId nftId,
|
44
|
+
function checkTransition(
|
27
45
|
ObjectType objectType,
|
28
46
|
StateId fromId,
|
29
47
|
StateId toId
|
30
|
-
)
|
48
|
+
)
|
49
|
+
public
|
50
|
+
view
|
31
51
|
{
|
32
|
-
if
|
33
|
-
|
52
|
+
// return if no life cycle support
|
53
|
+
if (_initialState[objectType].eqz()) {
|
54
|
+
return;
|
34
55
|
}
|
35
56
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
emit LogBundleStateChanged(nftId, fromId, toId);
|
40
|
-
} else if (
|
41
|
-
objectType == PRODUCT() ||
|
42
|
-
objectType == ORACLE() ||
|
43
|
-
objectType == POOL()
|
44
|
-
) {
|
45
|
-
emit LogComponentStateChanged(nftId, objectType, fromId, toId);
|
46
|
-
} else {
|
47
|
-
revert ErrorNoLifecycle(nftId, objectType);
|
57
|
+
// enforce valid state transition
|
58
|
+
if (!_isValidTransition[objectType][fromId][toId]) {
|
59
|
+
revert ErrorInvalidStateTransition(objectType, fromId, toId);
|
48
60
|
}
|
49
|
-
|
50
|
-
return toId;
|
51
|
-
}
|
52
|
-
|
53
|
-
function getInitialState(
|
54
|
-
ObjectType objectType
|
55
|
-
) public view returns (StateId) {
|
56
|
-
return _initialState[objectType];
|
57
61
|
}
|
58
62
|
|
59
63
|
function isValidTransition(
|
@@ -64,11 +68,11 @@ contract LifecycleModule is ILifecycleModule {
|
|
64
68
|
return _isValidTransition[objectType][fromId][toId];
|
65
69
|
}
|
66
70
|
|
67
|
-
function _setupComponentLifecycle(
|
68
|
-
_initialState[
|
69
|
-
_isValidTransition[
|
70
|
-
_isValidTransition[
|
71
|
-
_isValidTransition[
|
71
|
+
function _setupComponentLifecycle() internal {
|
72
|
+
_initialState[COMPONENT()] = ACTIVE();
|
73
|
+
_isValidTransition[COMPONENT()][ACTIVE()][PAUSED()] = true;
|
74
|
+
_isValidTransition[COMPONENT()][PAUSED()][ACTIVE()] = true;
|
75
|
+
_isValidTransition[COMPONENT()][PAUSED()][ARCHIVED()] = true;
|
72
76
|
}
|
73
77
|
|
74
78
|
function _setupBundleLifecycle() internal {
|
@@ -86,4 +90,11 @@ contract LifecycleModule is ILifecycleModule {
|
|
86
90
|
_isValidTransition[POLICY()][UNDERWRITTEN()][ACTIVE()] = true;
|
87
91
|
_isValidTransition[POLICY()][ACTIVE()][CLOSED()] = true;
|
88
92
|
}
|
93
|
+
|
94
|
+
function _setupRiskLifecycle() internal {
|
95
|
+
_initialState[RISK()] = ACTIVE();
|
96
|
+
_isValidTransition[RISK()][ACTIVE()][PAUSED()] = true;
|
97
|
+
_isValidTransition[RISK()][PAUSED()][ACTIVE()] = true;
|
98
|
+
_isValidTransition[RISK()][PAUSED()][ARCHIVED()] = true;
|
99
|
+
}
|
89
100
|
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
2
|
+
pragma solidity ^0.8.19;
|
3
|
+
|
4
|
+
import {IRegistry} from "../../registry/IRegistry.sol";
|
5
|
+
|
6
|
+
import {Blocknumber, blockNumber} from "../../types/Blocknumber.sol";
|
7
|
+
import {Key32, KeyId} from "../../types/Key32.sol";
|
8
|
+
import {LibNftIdSet} from "../../types/NftIdSet.sol";
|
9
|
+
import {NftId} from "../../types/NftId.sol";
|
10
|
+
import {ObjectType, PRODUCT, ORACLE, POOL, BUNDLE, POLICY} from "../../types/ObjectType.sol";
|
11
|
+
import {StateId, ACTIVE, PAUSED, ARCHIVED, CLOSED, APPLIED, REVOKED, DECLINED} from "../../types/StateId.sol";
|
12
|
+
import {Timestamp, blockTimestamp, zeroTimestamp} from "../../types/Timestamp.sol";
|
13
|
+
|
14
|
+
import {IKeyValueStore} from "./IKeyValueStore.sol";
|
15
|
+
|
16
|
+
abstract contract ModuleBase {
|
17
|
+
|
18
|
+
IKeyValueStore private _store;
|
19
|
+
|
20
|
+
function _initialize(IKeyValueStore keyValueStore) internal {
|
21
|
+
_store = keyValueStore;
|
22
|
+
}
|
23
|
+
|
24
|
+
function _create(ObjectType objectType, Key32 key, bytes memory data) internal {
|
25
|
+
_store.create(
|
26
|
+
key,
|
27
|
+
objectType,
|
28
|
+
data);
|
29
|
+
}
|
30
|
+
|
31
|
+
function _create(ObjectType objectType, NftId nftId, bytes memory data) internal {
|
32
|
+
_store.create(
|
33
|
+
nftId.toKey32(objectType),
|
34
|
+
objectType,
|
35
|
+
data);
|
36
|
+
}
|
37
|
+
|
38
|
+
function _updateData(ObjectType objectType, NftId nftId, bytes memory data) internal {
|
39
|
+
_store.updateData(nftId.toKey32(objectType), data);
|
40
|
+
}
|
41
|
+
|
42
|
+
function _updateState(ObjectType objectType, NftId nftId, StateId state) internal {
|
43
|
+
_store.updateState(nftId.toKey32(objectType), state);
|
44
|
+
}
|
45
|
+
|
46
|
+
function _exists(ObjectType objectType, NftId nftId) internal view returns (bool hasData) {
|
47
|
+
return _store.exists(nftId.toKey32(objectType));
|
48
|
+
}
|
49
|
+
|
50
|
+
function _getData(ObjectType objectType, NftId nftId) internal view returns(bytes memory data) {
|
51
|
+
return _store.getData(nftId.toKey32(objectType));
|
52
|
+
}
|
53
|
+
|
54
|
+
function _getState(ObjectType objectType, NftId nftId) internal view returns(StateId) {
|
55
|
+
return _store.getState(nftId.toKey32(objectType));
|
56
|
+
}
|
57
|
+
}
|
@@ -1,11 +1,9 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.19;
|
3
3
|
|
4
|
-
// import {IRegistry} from "../../registry/IRegistry.sol";
|
5
|
-
// import {ITreasury, ITreasuryModule, TokenHandler} from "../../instance/module/treasury/ITreasury.sol";
|
6
4
|
import {NftId, zeroNftId} from "../../types/NftId.sol";
|
7
5
|
import {ObjectType, SERVICE} from "../../types/ObjectType.sol";
|
8
|
-
import {Version, VersionPart
|
6
|
+
import {Version, VersionPart} from "../../types/Version.sol";
|
9
7
|
|
10
8
|
import {Registerable} from "../../shared/Registerable.sol";
|
11
9
|
import {IVersionable} from "../../shared/IVersionable.sol";
|
@@ -5,9 +5,9 @@ pragma solidity ^0.8.19;
|
|
5
5
|
// import {AccessControlEnumerable} from "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
|
6
6
|
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
|
7
7
|
|
8
|
-
import {RoleId,
|
9
|
-
import {
|
10
|
-
import {
|
8
|
+
import {RoleId, RoleIdLib} from "../../../types/RoleId.sol";
|
9
|
+
import {DISTRIBUTION_OWNER_ROLE, ORACLE_OWNER_ROLE, POOL_OWNER_ROLE, PRODUCT_OWNER_ROLE} from "../../../types/RoleId.sol";
|
10
|
+
import {DISTRIBUTION_OWNER_ROLE_NAME, ORACLE_OWNER_ROLE_NAME, POOL_OWNER_ROLE_NAME, PRODUCT_OWNER_ROLE_NAME} from "../../../types/RoleId.sol";
|
11
11
|
import {IAccessModule} from "./IAccess.sol";
|
12
12
|
|
13
13
|
abstract contract AccessModule is IAccessModule {
|
@@ -36,7 +36,7 @@ abstract contract AccessModule is IAccessModule {
|
|
36
36
|
}
|
37
37
|
|
38
38
|
constructor() {
|
39
|
-
_createRole(
|
39
|
+
_createRole(DISTRIBUTION_OWNER_ROLE(), DISTRIBUTION_OWNER_ROLE_NAME());
|
40
40
|
_createRole(ORACLE_OWNER_ROLE(), ORACLE_OWNER_ROLE_NAME());
|
41
41
|
_createRole(POOL_OWNER_ROLE(), POOL_OWNER_ROLE_NAME());
|
42
42
|
_createRole(PRODUCT_OWNER_ROLE(), PRODUCT_OWNER_ROLE_NAME());
|
@@ -45,7 +45,7 @@ abstract contract AccessModule is IAccessModule {
|
|
45
45
|
function createRole(
|
46
46
|
string memory roleName
|
47
47
|
) public override onlyAccessOwner returns (RoleId role) {
|
48
|
-
role = toRoleId(roleName);
|
48
|
+
role = RoleIdLib.toRoleId(roleName);
|
49
49
|
require(
|
50
50
|
!roleExists(role),
|
51
51
|
"ERROR:ACS-010:ROLE_ALREADY_EXISTS");
|
@@ -95,7 +95,7 @@ abstract contract AccessModule is IAccessModule {
|
|
95
95
|
}
|
96
96
|
|
97
97
|
function getRoleId(string memory roleName) external pure override returns (RoleId role) {
|
98
|
-
return toRoleId(roleName);
|
98
|
+
return RoleIdLib.toRoleId(roleName);
|
99
99
|
}
|
100
100
|
|
101
101
|
function getRoleInfo(
|