@etherisc/gif-next 0.0.2-e802d97-251 → 0.0.2-e81f152-917
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +49 -4
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +1253 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +1206 -0
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +358 -0
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.json +10 -0
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.json +1032 -0
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +258 -0
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IModuleAuthorization.sol/IModuleAuthorization.json +290 -0
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +148 -0
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/ModuleAuthorization.sol/ModuleAuthorization.json +390 -0
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +190 -0
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +4 -0
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +1500 -0
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +4 -0
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +410 -0
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +46 -292
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +248 -95
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +81 -57
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +91 -149
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +116 -16
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +4 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +703 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +64 -84
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +152 -45
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +78 -146
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +1208 -290
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +601 -0
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +132 -140
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +215 -108
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +49 -49
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +90 -263
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +2 -2
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.json +0 -53
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +182 -0
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +181 -0
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
- package/artifacts/contracts/mock/Dip.sol/Dip.dbg.json +1 -1
- package/artifacts/contracts/mock/Dip.sol/Dip.json +2 -2
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +4 -0
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +1137 -0
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +418 -0
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.json +43 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +43 -26
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +13 -0
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +40 -157
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +66 -29
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +44 -32
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +4 -0
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +1406 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +410 -0
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +424 -63
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +115 -43
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +218 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +44 -278
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +171 -54
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +44 -417
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +252 -95
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +58 -38
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +67 -49
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +42 -42
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +4 -0
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +1254 -0
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +410 -0
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +122 -69
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +64 -52
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +18 -0
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +29 -0
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +201 -108
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +13 -0
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +32 -68
- package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/product/IProductService.sol/IProductService.json +13 -0
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +294 -164
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +69 -41
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +97 -63
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +57 -49
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +32 -217
- package/artifacts/contracts/product/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/product/ProductService.sol/ProductService.json +54 -25
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +38 -30
- 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 +50 -46
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +13 -183
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +101 -73
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +1506 -167
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +50 -13
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +37 -25
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +164 -0
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +1159 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +4 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +214 -0
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +4 -4
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +0 -64
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +347 -85
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +108 -60
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +13 -0
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +0 -26
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +166 -0
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +32 -26
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.json +11 -5
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.json +0 -5
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.json +13 -0
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +4 -0
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.json +73 -0
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +32 -117
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.json +15 -89
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.json +4 -65
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +4 -0
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.json +306 -0
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +6 -6
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +6 -6
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +8 -8
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/Service.sol/Service.json +13 -0
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +330 -11
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +0 -26
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +49 -7
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +52 -109
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +114 -146
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +164 -0
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +78 -58
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +6 -6
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +92 -73
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +39 -47
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +201 -148
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +27 -22
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.json +2 -2
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.json +37 -8
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.json +2 -2
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +4 -4
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +4 -4
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.json +17 -12
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32.sol/Key32Lib.json +2 -2
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.json +4 -4
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.json +2 -2
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.json +136 -2
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +4 -4
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +4 -4
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +4 -4
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +4 -4
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +219 -6
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +26 -2
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +4 -0
- package/artifacts/contracts/type/Selector.sol/SelectorLib.json +129 -0
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +4 -0
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.json +10 -0
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.json +2 -2
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +4 -0
- package/artifacts/contracts/type/String.sol/StrLib.json +132 -0
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +23 -4
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/MathLib.json +9 -3
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +58 -2
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.json +2 -2
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.json +21 -2
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/IVersionable.sol/IVersionable.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +617 -0
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/Versionable.sol/Versionable.json +1 -1
- package/contracts/authorization/AccessAdmin.sol +591 -0
- package/contracts/authorization/AccessManagerCloneable.sol +16 -0
- package/contracts/authorization/Authorization.sol +217 -0
- package/contracts/authorization/IAccess.sol +48 -0
- package/contracts/authorization/IAccessAdmin.sol +136 -0
- package/contracts/authorization/IAuthorization.sol +54 -0
- package/contracts/authorization/IModuleAuthorization.sol +21 -0
- package/contracts/authorization/IServiceAuthorization.sol +38 -0
- package/contracts/authorization/ModuleAuthorization.sol +78 -0
- package/contracts/authorization/ServiceAuthorization.sol +90 -0
- package/contracts/distribution/BasicDistribution.sol +138 -0
- package/contracts/distribution/BasicDistributionAuthorization.sol +47 -0
- package/contracts/distribution/Distribution.sol +144 -110
- package/contracts/distribution/DistributionService.sol +60 -36
- package/contracts/distribution/DistributionServiceManager.sol +2 -5
- package/contracts/distribution/IDistributionComponent.sol +25 -39
- package/contracts/distribution/IDistributionService.sol +15 -1
- package/contracts/instance/{BundleManager.sol → BundleSet.sol} +23 -23
- package/contracts/instance/IInstance.sol +16 -12
- package/contracts/instance/IInstanceService.sol +34 -23
- package/contracts/instance/Instance.sol +106 -88
- package/contracts/instance/InstanceAdmin.sol +221 -267
- package/contracts/instance/InstanceAuthorizationV3.sol +204 -0
- package/contracts/instance/InstanceReader.sol +34 -16
- package/contracts/instance/InstanceService.sol +189 -84
- package/contracts/instance/InstanceServiceManager.sol +2 -6
- package/contracts/instance/InstanceStore.sol +16 -20
- package/contracts/instance/base/BalanceStore.sol +11 -6
- package/contracts/instance/base/Cloneable.sol +2 -25
- package/contracts/instance/base/ObjectLifecycle.sol +105 -0
- package/contracts/instance/base/{ObjectManager.sol → ObjectSet.sol} +11 -14
- package/contracts/instance/module/IBundle.sol +1 -1
- package/contracts/instance/module/IComponents.sol +1 -7
- package/contracts/instance/module/IDistribution.sol +0 -1
- package/contracts/instance/module/IPolicy.sol +1 -1
- package/contracts/mock/Dip.sol +1 -1
- package/contracts/oracle/BasicOracle.sol +48 -0
- package/contracts/oracle/BasicOracleAuthorization.sol +46 -0
- package/contracts/oracle/IOracle.sol +16 -0
- package/contracts/oracle/IOracleComponent.sol +2 -1
- package/contracts/oracle/Oracle.sol +72 -51
- package/contracts/oracle/OracleService.sol +5 -4
- package/contracts/oracle/OracleServiceManager.sol +2 -5
- package/contracts/pool/BasicPool.sol +166 -0
- package/contracts/pool/BasicPoolAuthorization.sol +58 -0
- package/contracts/pool/BundleService.sol +199 -59
- package/contracts/pool/BundleServiceManager.sol +2 -5
- package/contracts/pool/IBundleService.sol +33 -5
- package/contracts/pool/IPoolComponent.sol +6 -60
- package/contracts/pool/IPoolService.sol +14 -17
- package/contracts/pool/Pool.sol +166 -137
- package/contracts/pool/PoolService.sol +158 -93
- package/contracts/pool/PoolServiceManager.sol +2 -5
- package/contracts/product/ApplicationService.sol +54 -58
- package/contracts/product/ApplicationServiceManager.sol +2 -2
- package/contracts/product/BasicProduct.sol +52 -0
- package/contracts/product/BasicProductAuthorization.sol +43 -0
- package/contracts/product/ClaimService.sol +18 -44
- package/contracts/product/ClaimServiceManager.sol +2 -2
- package/contracts/product/IApplicationService.sol +1 -0
- package/contracts/product/IClaimService.sol +1 -0
- package/contracts/product/IPolicyService.sol +23 -17
- package/contracts/product/IProductComponent.sol +7 -9
- package/contracts/product/IProductService.sol +1 -0
- package/contracts/product/PolicyService.sol +247 -136
- package/contracts/product/PolicyServiceManager.sol +2 -5
- package/contracts/product/PricingService.sol +9 -6
- package/contracts/product/PricingServiceManager.sol +2 -5
- package/contracts/product/Product.sol +128 -92
- package/contracts/product/ProductService.sol +12 -37
- package/contracts/product/ProductServiceManager.sol +2 -5
- package/contracts/registry/IRegistry.sol +26 -16
- package/contracts/registry/IRegistryService.sol +6 -6
- package/contracts/registry/Registry.sol +85 -85
- package/contracts/registry/RegistryAdmin.sol +292 -155
- package/contracts/registry/RegistryService.sol +9 -23
- package/contracts/registry/RegistryServiceManager.sol +2 -7
- package/contracts/registry/ReleaseLifecycle.sol +27 -0
- package/contracts/registry/ReleaseRegistry.sol +485 -0
- package/contracts/registry/ServiceAuthorizationV3.sol +200 -0
- package/contracts/registry/TokenRegistry.sol +2 -2
- package/contracts/shared/Component.sol +24 -37
- package/contracts/shared/ComponentService.sol +99 -76
- package/contracts/shared/ComponentServiceManager.sol +2 -2
- package/contracts/shared/ComponentVerifyingService.sol +1 -1
- package/contracts/shared/IComponent.sol +4 -4
- package/contracts/shared/IComponentService.sol +15 -9
- package/contracts/shared/IInstanceLinkedComponent.sol +10 -0
- package/contracts/shared/IKeyValueStore.sol +1 -0
- package/contracts/shared/ILifecycle.sol +1 -2
- package/contracts/shared/IService.sol +8 -1
- package/contracts/shared/{ERC165.sol → InitializableERC165.sol} +1 -1
- package/contracts/shared/InstanceLinkedComponent.sol +47 -19
- package/contracts/shared/KeyValueStore.sol +6 -2
- package/contracts/shared/Lifecycle.sol +16 -69
- package/contracts/shared/{NftIdSetManager.sol → NftIdSet.sol} +1 -1
- package/contracts/shared/NftOwnable.sol +2 -2
- package/contracts/shared/PolicyHolder.sol +2 -5
- package/contracts/shared/Service.sol +27 -22
- package/contracts/shared/TokenHandler.sol +100 -19
- package/contracts/staking/IStaking.sol +1 -2
- package/contracts/staking/IStakingService.sol +22 -11
- package/contracts/staking/StakeManagerLib.sol +52 -25
- package/contracts/staking/Staking.sol +77 -132
- package/contracts/staking/StakingLifecycle.sol +23 -0
- package/contracts/staking/StakingManager.sol +2 -6
- package/contracts/staking/StakingReader.sol +12 -16
- package/contracts/staking/StakingService.sol +66 -65
- package/contracts/staking/StakingServiceManager.sol +2 -3
- package/contracts/staking/StakingStore.sol +93 -60
- package/contracts/type/Amount.sol +12 -5
- package/contracts/type/Blocknumber.sol +7 -1
- package/contracts/type/ObjectType.sol +167 -64
- package/contracts/type/Referral.sol +1 -0
- package/contracts/type/RoleId.sol +103 -75
- package/contracts/type/Seconds.sol +13 -1
- package/contracts/type/Selector.sol +102 -0
- package/contracts/type/String.sol +53 -0
- package/contracts/type/Timestamp.sol +11 -1
- package/contracts/type/UFixed.sol +34 -9
- package/contracts/type/Version.sol +3 -1
- package/contracts/{shared → upgradeability}/ProxyManager.sol +3 -4
- package/contracts/{shared → upgradeability}/UpgradableProxyWithAdmin.sol +1 -3
- package/package.json +6 -3
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +0 -4
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +0 -778
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.dbg.json +0 -4
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.json +0 -228
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.dbg.json +0 -4
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.json +0 -256
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +0 -1292
- package/artifacts/contracts/registry/ServiceAuthorizationsLib.sol/ServiceAuthorizationsLib.dbg.json +0 -4
- package/artifacts/contracts/registry/ServiceAuthorizationsLib.sol/ServiceAuthorizationsLib.json +0 -137
- package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.json +0 -1193
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.json +0 -1715
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.json +0 -1728
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.json +0 -1806
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.json +0 -1824
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +0 -4
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +0 -73
- package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.json +0 -1562
- package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.json +0 -1600
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +0 -4
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.dbg.json +0 -4
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.json +0 -306
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +0 -4
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +0 -617
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +0 -4
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +0 -129
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +0 -4
- package/contracts/instance/InstanceAuthorizationsLib.sol +0 -377
- package/contracts/registry/ReleaseManager.sol +0 -600
- package/contracts/registry/ServiceAuthorizationsLib.sol +0 -173
- package/contracts/shared/AccessManagerCustom.sol +0 -736
- package/contracts/shared/AccessManagerExtended.sol +0 -470
- package/contracts/shared/AccessManagerExtendedInitializeable.sol +0 -13
- package/contracts/shared/AccessManagerExtendedWithDisable.sol +0 -137
- package/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol +0 -14
- package/contracts/shared/IAccessManagerExtended.sol +0 -74
- package/contracts/shared/IAccessManagerExtendedWithDisable.sol +0 -18
- /package/contracts/{shared → upgradeability}/IVersionable.sol +0 -0
- /package/contracts/{shared → upgradeability}/Versionable.sol +0 -0
@@ -12,140 +12,138 @@ using {
|
|
12
12
|
ObjectTypeLib.gtz
|
13
13
|
} for ObjectType global;
|
14
14
|
|
15
|
-
// general pure free functions
|
16
15
|
|
17
|
-
|
18
|
-
return toObjectType(1);
|
19
|
-
}
|
16
|
+
//--- GIF object types/domains (rage: 1 - 99) -------------------------------//
|
20
17
|
|
21
18
|
function PROTOCOL() pure returns (ObjectType) {
|
22
|
-
return
|
23
|
-
}
|
24
|
-
|
25
|
-
function ROLE() pure returns (ObjectType) {
|
26
|
-
return toObjectType(20);
|
27
|
-
}
|
28
|
-
|
29
|
-
function TARGET() pure returns (ObjectType) {
|
30
|
-
return toObjectType(30);
|
19
|
+
return ObjectType.wrap(1);
|
31
20
|
}
|
32
21
|
|
33
22
|
function REGISTRY() pure returns (ObjectType) {
|
34
|
-
return
|
23
|
+
return ObjectType.wrap(2);
|
35
24
|
}
|
36
25
|
|
37
26
|
function STAKING() pure returns (ObjectType) {
|
38
|
-
return
|
27
|
+
return ObjectType.wrap(3);
|
39
28
|
}
|
40
29
|
|
41
|
-
function
|
42
|
-
return
|
30
|
+
function RELEASE() pure returns (ObjectType) {
|
31
|
+
return ObjectType.wrap(6);
|
32
|
+
}
|
33
|
+
|
34
|
+
function ROLE() pure returns (ObjectType) {
|
35
|
+
return ObjectType.wrap(7);
|
43
36
|
}
|
44
37
|
|
45
38
|
function SERVICE() pure returns (ObjectType) {
|
46
|
-
return
|
39
|
+
return ObjectType.wrap(8);
|
47
40
|
}
|
48
41
|
|
49
42
|
function INSTANCE() pure returns (ObjectType) {
|
50
|
-
return
|
43
|
+
return ObjectType.wrap(10);
|
51
44
|
}
|
52
45
|
|
53
|
-
function
|
54
|
-
return
|
46
|
+
function COMPONENT() pure returns (ObjectType) {
|
47
|
+
return ObjectType.wrap(11);
|
55
48
|
}
|
56
49
|
|
57
|
-
function
|
58
|
-
return
|
50
|
+
function PRODUCT() pure returns (ObjectType) {
|
51
|
+
return ObjectType.wrap(12);
|
59
52
|
}
|
60
53
|
|
61
|
-
function
|
62
|
-
return
|
54
|
+
function ORACLE() pure returns (ObjectType) {
|
55
|
+
return ObjectType.wrap(13);
|
63
56
|
}
|
64
57
|
|
65
|
-
function
|
66
|
-
return
|
58
|
+
function DISTRIBUTION() pure returns (ObjectType) {
|
59
|
+
return ObjectType.wrap(14);
|
67
60
|
}
|
68
61
|
|
69
|
-
function
|
70
|
-
return
|
62
|
+
function POOL() pure returns (ObjectType) {
|
63
|
+
return ObjectType.wrap(15);
|
71
64
|
}
|
72
65
|
|
73
|
-
function
|
74
|
-
return
|
66
|
+
function APPLICATION() pure returns (ObjectType) {
|
67
|
+
return ObjectType.wrap(20);
|
75
68
|
}
|
76
69
|
|
77
|
-
function
|
78
|
-
return
|
70
|
+
function POLICY() pure returns (ObjectType) {
|
71
|
+
return ObjectType.wrap(21);
|
79
72
|
}
|
80
73
|
|
81
|
-
function
|
82
|
-
return
|
74
|
+
function CLAIM() pure returns (ObjectType) {
|
75
|
+
return ObjectType.wrap(22);
|
83
76
|
}
|
84
77
|
|
85
|
-
function
|
86
|
-
return
|
78
|
+
function PAYOUT() pure returns (ObjectType) {
|
79
|
+
return ObjectType.wrap(23);
|
87
80
|
}
|
88
81
|
|
89
|
-
function
|
90
|
-
return
|
82
|
+
function RISK() pure returns (ObjectType) {
|
83
|
+
return ObjectType.wrap(24);
|
91
84
|
}
|
92
85
|
|
93
|
-
function
|
94
|
-
return
|
86
|
+
function PRICE() pure returns (ObjectType) {
|
87
|
+
return ObjectType.wrap(25);
|
95
88
|
}
|
96
89
|
|
97
|
-
function
|
98
|
-
return
|
90
|
+
function REQUEST() pure returns (ObjectType) {
|
91
|
+
return ObjectType.wrap(26);
|
99
92
|
}
|
100
93
|
|
101
|
-
function
|
102
|
-
return
|
94
|
+
function DISTRIBUTOR_TYPE() pure returns (ObjectType) {
|
95
|
+
return ObjectType.wrap(27);
|
103
96
|
}
|
104
97
|
|
105
|
-
function
|
106
|
-
return
|
98
|
+
function DISTRIBUTOR() pure returns (ObjectType) {
|
99
|
+
return ObjectType.wrap(28);
|
107
100
|
}
|
108
101
|
|
109
|
-
function
|
110
|
-
return
|
102
|
+
function REFERRAL() pure returns (ObjectType) {
|
103
|
+
return ObjectType.wrap(29);
|
111
104
|
}
|
112
105
|
|
113
|
-
function
|
114
|
-
return
|
106
|
+
function BUNDLE() pure returns (ObjectType) {
|
107
|
+
return ObjectType.wrap(30);
|
115
108
|
}
|
116
109
|
|
117
|
-
function
|
118
|
-
return
|
110
|
+
function TARGET() pure returns (ObjectType) {
|
111
|
+
return ObjectType.wrap(31);
|
119
112
|
}
|
120
113
|
|
121
|
-
function
|
122
|
-
return
|
114
|
+
function STAKE() pure returns (ObjectType) {
|
115
|
+
return ObjectType.wrap(32);
|
123
116
|
}
|
124
117
|
|
125
|
-
/// @dev
|
126
|
-
|
127
|
-
|
118
|
+
/// @dev Object type that includes any other object type.
|
119
|
+
/// Note that eq()/'==' does not take this property into account.
|
120
|
+
function ALL() pure returns (ObjectType) {
|
121
|
+
return ObjectType.wrap(99);
|
128
122
|
}
|
129
123
|
|
130
|
-
// pure free functions for operators
|
124
|
+
// other pure free functions for operators
|
131
125
|
function eqObjectType(ObjectType a, ObjectType b) pure returns (bool isSame) {
|
132
126
|
return ObjectType.unwrap(a) == ObjectType.unwrap(b);
|
133
127
|
}
|
134
128
|
|
135
|
-
function neObjectType(
|
136
|
-
ObjectType a,
|
137
|
-
ObjectType b
|
138
|
-
) pure returns (bool isDifferent) {
|
129
|
+
function neObjectType(ObjectType a, ObjectType b) pure returns (bool isSame) {
|
139
130
|
return ObjectType.unwrap(a) != ObjectType.unwrap(b);
|
140
131
|
}
|
141
132
|
|
142
133
|
// library functions that operate on user defined type
|
143
134
|
library ObjectTypeLib {
|
144
135
|
|
136
|
+
error ErrorVersionTooBig(uint256 version);
|
137
|
+
|
145
138
|
function zero() public pure returns (ObjectType) {
|
146
139
|
return ObjectType.wrap(0);
|
147
140
|
}
|
148
141
|
|
142
|
+
/// @dev Converts the uint256 into ObjectType.
|
143
|
+
function toObjectType(uint256 objectType) public pure returns (ObjectType) {
|
144
|
+
return ObjectType.wrap(uint8(objectType));
|
145
|
+
}
|
146
|
+
|
149
147
|
/// @dev Converts the NftId to a uint256.
|
150
148
|
function toInt(ObjectType objectType) public pure returns (uint96) {
|
151
149
|
return uint96(ObjectType.unwrap(objectType));
|
@@ -163,6 +161,111 @@ library ObjectTypeLib {
|
|
163
161
|
|
164
162
|
/// @dev Returns true if the values are equal (==).
|
165
163
|
function eq(ObjectType a, ObjectType b) public pure returns (bool isSame) {
|
166
|
-
return
|
164
|
+
return ObjectType.unwrap(a) == ObjectType.unwrap(b);
|
165
|
+
}
|
166
|
+
|
167
|
+
/// @dev Returns true if the values are not equal (!=).
|
168
|
+
function ne(ObjectType a, ObjectType b) public pure returns (bool isSame) {
|
169
|
+
return ObjectType.unwrap(a) != ObjectType.unwrap(b);
|
170
|
+
}
|
171
|
+
|
172
|
+
/// @dev Returns the type/domain name for the provided object type
|
173
|
+
function toName(ObjectType objectType) public pure returns (string memory name) {
|
174
|
+
if (objectType == REGISTRY()) {
|
175
|
+
return "Registry";
|
176
|
+
} else if (objectType == STAKING()) {
|
177
|
+
return "Staking";
|
178
|
+
} else if (objectType == INSTANCE()) {
|
179
|
+
return "Instance";
|
180
|
+
} else if (objectType == COMPONENT()) {
|
181
|
+
return "Component";
|
182
|
+
} else if (objectType == PRODUCT()) {
|
183
|
+
return "Product";
|
184
|
+
} else if (objectType == ORACLE()) {
|
185
|
+
return "Oracle";
|
186
|
+
} else if (objectType == DISTRIBUTION()) {
|
187
|
+
return "Distribution";
|
188
|
+
} else if (objectType == POOL()) {
|
189
|
+
return "Pool";
|
190
|
+
} else if (objectType == APPLICATION()) {
|
191
|
+
return "Application";
|
192
|
+
} else if (objectType == POLICY()) {
|
193
|
+
return "Policy";
|
194
|
+
} else if (objectType == CLAIM()) {
|
195
|
+
return "Claim";
|
196
|
+
} else if (objectType == PRICE()) {
|
197
|
+
return "Price";
|
198
|
+
} else if (objectType == BUNDLE()) {
|
199
|
+
return "Bundle";
|
200
|
+
}
|
201
|
+
|
202
|
+
// fallback: ObjectType<obect-type-int>
|
203
|
+
return string(
|
204
|
+
abi.encodePacked(
|
205
|
+
"ObjectType",
|
206
|
+
toString(
|
207
|
+
toInt(objectType))));
|
208
|
+
}
|
209
|
+
|
210
|
+
function toVersionedName(
|
211
|
+
string memory name,
|
212
|
+
string memory suffix,
|
213
|
+
uint256 version
|
214
|
+
)
|
215
|
+
external
|
216
|
+
pure
|
217
|
+
returns (string memory versionedName)
|
218
|
+
{
|
219
|
+
if (version > maxNumReleases()) {
|
220
|
+
revert ErrorVersionTooBig(version);
|
221
|
+
}
|
222
|
+
|
223
|
+
string memory versionName = "_v0";
|
224
|
+
|
225
|
+
if (version >= 10) {
|
226
|
+
versionName = "_v";
|
227
|
+
}
|
228
|
+
|
229
|
+
versionedName = string(
|
230
|
+
abi.encodePacked(
|
231
|
+
name,
|
232
|
+
suffix,
|
233
|
+
versionName,
|
234
|
+
toString(version)));
|
235
|
+
}
|
236
|
+
|
237
|
+
/// @dev returns the max number of releases (major versions) this gif setup can handle.
|
238
|
+
function maxNumReleases() public pure returns (uint8) {
|
239
|
+
return 99;
|
240
|
+
}
|
241
|
+
|
242
|
+
/// @dev returns the provied int as a string
|
243
|
+
function toString(uint256 value) public pure returns (string memory name) {
|
244
|
+
|
245
|
+
if (value == 0) {
|
246
|
+
return "0";
|
247
|
+
}
|
248
|
+
|
249
|
+
uint256 temp = value;
|
250
|
+
uint256 digits = 0;
|
251
|
+
while (temp != 0) {
|
252
|
+
digits++;
|
253
|
+
temp /= 10;
|
254
|
+
}
|
255
|
+
|
256
|
+
bytes memory buffer = new bytes(digits);
|
257
|
+
uint index = digits - 1;
|
258
|
+
|
259
|
+
temp = value;
|
260
|
+
while (temp != 0) {
|
261
|
+
buffer[index] = bytes1(uint8(48 + temp % 10));
|
262
|
+
temp /= 10;
|
263
|
+
|
264
|
+
if (index > 0) {
|
265
|
+
index--;
|
266
|
+
}
|
267
|
+
}
|
268
|
+
|
269
|
+
return string(buffer);
|
167
270
|
}
|
168
271
|
}
|
@@ -2,7 +2,8 @@
|
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {Key32, KeyId, Key32Lib} from "./Key32.sol";
|
5
|
-
import {ROLE} from "./ObjectType.sol";
|
5
|
+
import {ObjectType, ROLE} from "./ObjectType.sol";
|
6
|
+
import {VersionPart} from "./Version.sol";
|
6
7
|
|
7
8
|
type RoleId is uint64;
|
8
9
|
|
@@ -12,116 +13,143 @@ using {
|
|
12
13
|
neRoleId as !=,
|
13
14
|
RoleIdLib.eqz,
|
14
15
|
RoleIdLib.gtz,
|
15
|
-
RoleIdLib.toInt
|
16
|
-
RoleIdLib.toKey32
|
16
|
+
RoleIdLib.toInt
|
17
|
+
// RoleIdLib.toKey32
|
17
18
|
} for RoleId global;
|
18
19
|
|
20
|
+
// general pure free functions
|
21
|
+
|
22
|
+
// @dev Returns true iff role ids a and b are identical
|
23
|
+
function eqRoleId(RoleId a, RoleId b) pure returns (bool isSame) {
|
24
|
+
return RoleId.unwrap(a) == RoleId.unwrap(b);
|
25
|
+
}
|
26
|
+
|
27
|
+
// @dev Returns true iff role ids a and b are different
|
28
|
+
function neRoleId(RoleId a, RoleId b) pure returns (bool isDifferent) {
|
29
|
+
return RoleId.unwrap(a) != RoleId.unwrap(b);
|
30
|
+
}
|
19
31
|
|
20
|
-
|
32
|
+
//--- OpenZeppelin provided roles -------------------------------------------//
|
33
|
+
|
34
|
+
/// @dev Role ID needs to match with oz AccessManager.ADMIN_ROLE
|
21
35
|
function ADMIN_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(type(uint64).min); }
|
22
36
|
|
23
|
-
/// @dev
|
37
|
+
/// @dev Role ID needs to match with oz AccessManager.PUBLIC_ROLE
|
24
38
|
function PUBLIC_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(type(uint64).max); }
|
25
39
|
|
26
|
-
|
40
|
+
//--- GIF roles (range: 1-99) ----------------------------------------------//
|
27
41
|
|
28
42
|
/// @dev cental role for gif release management.
|
29
43
|
/// this role is necessary to call ReleaseManager.createNextRelease/activateNextRelease
|
30
44
|
/// the actual deployment of a release requires the GIF_MANAGER_ROLE.
|
31
45
|
/// GIF_ADMIN_ROLE is the admin of the GIF_MANAGER_ROLE.
|
32
46
|
/// only a single holder may hold this role at any time
|
33
|
-
function GIF_ADMIN_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(
|
47
|
+
function GIF_ADMIN_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(1); }
|
34
48
|
|
35
49
|
/// @dev role for token whith/blacklisting, deploying and registering the services for a new major release
|
36
50
|
/// registering services for a new major release is only possible after a new initial release has been created by the GIF_ADMIN_ROLE
|
37
51
|
/// token white/blacklisting is possible for any active release
|
38
|
-
function GIF_MANAGER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(
|
39
|
-
|
40
|
-
/// @dev instance specific role to register/own a distribution component
|
41
|
-
function DISTRIBUTION_OWNER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(2); }
|
42
|
-
|
43
|
-
/// @dev instance specific role to register/own an oracle component
|
44
|
-
function ORACLE_OWNER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(3); }
|
52
|
+
function GIF_MANAGER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(2); }
|
45
53
|
|
46
|
-
/// @dev
|
47
|
-
function
|
54
|
+
/// @dev role for registering remote staking targets and reporting remote total value locked amounts.
|
55
|
+
function GIF_REMOTE_MANAGER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(3); }
|
48
56
|
|
49
57
|
/// @dev instance specific role to register/own a product component
|
50
|
-
function PRODUCT_OWNER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(
|
51
|
-
|
52
|
-
/// @dev role associated with an instance contract
|
53
|
-
/// this role is the admin role for the INSTANCE_OWNER_ROLE
|
54
|
-
function INSTANCE_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(2600); }
|
55
|
-
|
56
|
-
/// @dev required role to register/own an instance
|
57
|
-
/// allows instance specific target, role and access management
|
58
|
-
function INSTANCE_OWNER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(1900); }
|
59
|
-
|
60
|
-
function REGISTRY_SERVICE_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(1800); }
|
58
|
+
function PRODUCT_OWNER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(11); }
|
61
59
|
|
62
|
-
/// @dev instance specific
|
63
|
-
function
|
64
|
-
|
65
|
-
/// @dev role for creating gif target on instance service
|
66
|
-
function CAN_CREATE_GIF_TARGET__ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(1700); }
|
67
|
-
|
68
|
-
/// @dev role for registering gif components
|
69
|
-
function COMPONENT_SERVICE_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(2001); }
|
70
|
-
|
71
|
-
/// @dev instance specific role for distribution service
|
72
|
-
function DISTRIBUTION_SERVICE_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(2100); }
|
73
|
-
|
74
|
-
/// @dev instance specific role for oracle service
|
75
|
-
function ORACLE_SERVICE_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(2150); }
|
76
|
-
|
77
|
-
/// @dev instance specific role for pool service
|
78
|
-
function POOL_SERVICE_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(2200); }
|
60
|
+
/// @dev instance specific role to register/own an oracle component
|
61
|
+
function ORACLE_OWNER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(12); }
|
79
62
|
|
80
|
-
/// @dev instance specific role
|
81
|
-
function
|
63
|
+
/// @dev instance specific role to register/own a distribution component
|
64
|
+
function DISTRIBUTION_OWNER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(13); }
|
82
65
|
|
83
|
-
/// @dev instance specific
|
84
|
-
function
|
66
|
+
/// @dev instance specific role to register/own a pool component
|
67
|
+
function POOL_OWNER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(14); }
|
68
|
+
|
69
|
+
//--- GIF core contract roles (range: 200 - 9'900) --------------------------//
|
70
|
+
// created and assigned during initial deployment for registry and staking
|
71
|
+
// granting for instances and components in instance service
|
72
|
+
// object type * 100 + 0, examples:
|
73
|
+
// - registry contract role: 200
|
74
|
+
// - staking contract role: 300
|
75
|
+
// - instance contract role: 1000
|
76
|
+
|
77
|
+
//--- GIF service roles (range 201 - 9'9xx) ---------------------------------//
|
78
|
+
// created and assigned by release manager contract
|
79
|
+
// object type * 100 + 1/major version, examples:
|
80
|
+
// - registry service role (any version): 299
|
81
|
+
// - registry service role (version 3): 203
|
82
|
+
// - registry service role (any version): 399
|
83
|
+
// - staking service role: (version 3): 303
|
84
|
+
// - application service role (version 3): 2003
|
85
|
+
|
86
|
+
//--- GIF component contract roles (range 12'001 - 19'099) ------------------//
|
87
|
+
// assigned at component registration time
|
88
|
+
// object type * 1000 + instane specific component counter
|
89
|
+
// on any instance a maximum number of 999 components may be deployed
|
90
|
+
// examples:
|
91
|
+
// - 1st pool on instance: 15001
|
92
|
+
// - 1st distribution on instance: 14002
|
93
|
+
// - 1st product on instance: 12003
|
94
|
+
// - 2nd pool on instance: 15004
|
95
|
+
// - 2nd distribution on instance: 14005
|
96
|
+
// - 2nd product on instance: 12006
|
97
|
+
|
98
|
+
|
99
|
+
//--- Custom roles (range >= 1'000'000) -------------------------------------//
|
100
|
+
|
101
|
+
function CUSTOM_ROLE_MIN() pure returns (RoleId) { return RoleIdLib.toRoleId(1000000); }
|
85
102
|
|
86
|
-
|
87
|
-
function POLICY_SERVICE_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(2410); }
|
103
|
+
library RoleIdLib {
|
88
104
|
|
89
|
-
|
90
|
-
|
105
|
+
uint64 public constant ALL_VERSIONS = 99;
|
106
|
+
uint64 public constant SERVICE_DOMAIN_ROLE_FACTOR = 100;
|
107
|
+
uint64 public constant COMPONENT_ROLE_FACTOR = 100;
|
108
|
+
uint64 public constant CUSTOM_ROLE_MIN = 1000000;
|
91
109
|
|
92
|
-
/// @dev
|
93
|
-
function
|
110
|
+
/// @dev Converts the RoleId to a uint.
|
111
|
+
function zero() public pure returns (RoleId) {
|
112
|
+
return RoleId.wrap(0);
|
113
|
+
}
|
94
114
|
|
95
|
-
/// @dev
|
96
|
-
function
|
115
|
+
/// @dev Converts an uint into a role id.
|
116
|
+
function toRoleId(uint64 a) public pure returns (RoleId) {
|
117
|
+
return RoleId.wrap(a);
|
118
|
+
}
|
97
119
|
|
98
|
-
/// @dev
|
99
|
-
function
|
120
|
+
/// @dev Converts an uint into a component role id.
|
121
|
+
function toComponentRoleId(ObjectType objectType, uint64 index) public pure returns (RoleId) {
|
122
|
+
return toRoleId(COMPONENT_ROLE_FACTOR * uint64(objectType.toInt()) + index);
|
123
|
+
}
|
100
124
|
|
101
|
-
|
102
|
-
function
|
103
|
-
|
104
|
-
}
|
125
|
+
/// @dev Converts an uint into a custom role id.
|
126
|
+
function toCustomRoleId(uint64 index) public pure returns (RoleId) {
|
127
|
+
return toRoleId(CUSTOM_ROLE_MIN + index);
|
128
|
+
}
|
105
129
|
|
106
|
-
|
107
|
-
function
|
108
|
-
|
109
|
-
}
|
130
|
+
/// @dev Converts the role id to a uint.
|
131
|
+
function toInt(RoleId a) public pure returns (uint64) {
|
132
|
+
return uint64(RoleId.unwrap(a));
|
133
|
+
}
|
110
134
|
|
111
|
-
|
112
|
-
///
|
113
|
-
function
|
114
|
-
return RoleId.wrap(
|
135
|
+
/// @dev Converts an uint into a role id.
|
136
|
+
/// Used for GIF core contracts.
|
137
|
+
function roleForType(ObjectType objectType) public pure returns (RoleId) {
|
138
|
+
return RoleId.wrap(SERVICE_DOMAIN_ROLE_FACTOR * uint64(objectType.toInt()));
|
115
139
|
}
|
116
140
|
|
117
141
|
/// @dev Converts an uint into a RoleId.
|
118
|
-
|
119
|
-
|
142
|
+
/// Used for GIF core contracts.
|
143
|
+
function roleForTypeAndVersion(ObjectType objectType, VersionPart majorVersion) public pure returns (RoleId) {
|
144
|
+
return RoleId.wrap(
|
145
|
+
uint64(SERVICE_DOMAIN_ROLE_FACTOR * objectType.toInt() + majorVersion.toInt()));
|
120
146
|
}
|
121
147
|
|
122
|
-
/// @dev Converts
|
123
|
-
|
124
|
-
|
148
|
+
/// @dev Converts an uint into a RoleId.
|
149
|
+
/// Used for GIF core contracts.
|
150
|
+
function roleForTypeAndAllVersions(ObjectType objectType) public pure returns (RoleId) {
|
151
|
+
return RoleId.wrap(
|
152
|
+
uint64(SERVICE_DOMAIN_ROLE_FACTOR * objectType.toInt() + ALL_VERSIONS));
|
125
153
|
}
|
126
154
|
|
127
155
|
/// @dev Returns true if the value is non-zero (> 0).
|
@@ -6,9 +6,11 @@ type Seconds is uint40;
|
|
6
6
|
using {
|
7
7
|
SecondsEq as ==,
|
8
8
|
SecondsGt as >,
|
9
|
+
SecondsAdd as +,
|
9
10
|
SecondsLib.eqz,
|
10
11
|
SecondsLib.gtz,
|
11
|
-
SecondsLib.toInt
|
12
|
+
SecondsLib.toInt,
|
13
|
+
SecondsLib.add
|
12
14
|
} for Seconds global;
|
13
15
|
|
14
16
|
function SecondsEq(Seconds duration1, Seconds duration2) pure returns (bool) {
|
@@ -19,6 +21,11 @@ function SecondsGt(Seconds duration1, Seconds duration2) pure returns (bool) {
|
|
19
21
|
return SecondsLib.gt(duration1, duration2);
|
20
22
|
}
|
21
23
|
|
24
|
+
function SecondsAdd(Seconds duration1, Seconds duration2) pure returns (Seconds) {
|
25
|
+
return SecondsLib.add(duration1, duration2);
|
26
|
+
}
|
27
|
+
|
28
|
+
|
22
29
|
library SecondsLib {
|
23
30
|
|
24
31
|
error ErrorSecondsLibDurationTooBig(uint256 duration);
|
@@ -70,6 +77,11 @@ library SecondsLib {
|
|
70
77
|
return Seconds.unwrap(duration1) > Seconds.unwrap(duration2);
|
71
78
|
}
|
72
79
|
|
80
|
+
/// @dev return add duration1 and duration2
|
81
|
+
function add(Seconds duration1, Seconds duration2) public pure returns (Seconds) {
|
82
|
+
return Seconds.wrap(Seconds.unwrap(duration1) + Seconds.unwrap(duration2));
|
83
|
+
}
|
84
|
+
|
73
85
|
function toInt(Seconds duration) public pure returns (uint256) {
|
74
86
|
return uint256(uint40(Seconds.unwrap(duration)));
|
75
87
|
}
|