@etherisc/gif-next 0.0.2-9e6b423-414 → 0.0.2-9f51324-299
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +2 -2
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +2 -2
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +97 -267
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.json +24 -0
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.json +36 -652
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +2 -2
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +47 -222
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.json +27 -175
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +12 -85
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +16 -246
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +27 -420
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +3 -3
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +60 -221
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +114 -167
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +60 -72
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +0 -29
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +2 -2
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +59 -220
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +2 -2
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +59 -220
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +3 -3
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +59 -220
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +59 -220
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +59 -220
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +2 -2
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +32 -310
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +0 -182
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +72 -322
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +292 -605
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +56 -242
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +290 -478
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +26 -208
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +14 -14
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +2 -2
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +1 -1
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +2 -2
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +2 -2
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +2 -2
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +2 -2
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.json +2 -2
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
- package/artifacts/contracts/mock/Dip.sol/Dip.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +2 -2
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +56 -234
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +2 -2
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +2 -2
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +59 -220
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +108 -92
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +55 -31
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +26 -92
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +2 -2
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +2 -2
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +36 -60
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +19 -15
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +59 -220
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +78 -78
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +40 -40
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +2 -2
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +26 -82
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +2 -2
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +2 -2
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +2 -2
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +2 -2
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +2 -2
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRelease.sol/IRelease.dbg.json +1 -1
- 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 +2 -2
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +249 -378
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.json +68 -243
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +18 -18
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +10 -10
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +186 -384
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +2 -2
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +76 -128
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +26 -437
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +2 -2
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +54 -54
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +28 -28
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +45 -16
- package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.json +2 -2
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +2 -2
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +2 -2
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +2 -2
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +2 -2
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +2 -2
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +8 -8
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.json +2 -2
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +2 -2
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +5 -5
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +2 -2
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +2 -2
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +2 -2
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +2 -2
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +3 -3
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +2 -2
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +2 -2
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32.sol/Key32Lib.json +2 -2
- package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.dbg.json +1 -1
- package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.json +2 -2
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.json +2 -2
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.json +2 -2
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.json +6 -6
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +2 -2
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +2 -2
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +2 -2
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +2 -2
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +218 -39
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
- package/artifacts/contracts/type/String.sol/StrLib.json +2 -50
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +2 -2
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
- package/contracts/authorization/AccessAdmin.sol +185 -261
- package/contracts/authorization/AccessAdminLib.sol +7 -220
- package/contracts/authorization/Authorization.sol +229 -38
- package/contracts/authorization/IAccess.sol +4 -14
- package/contracts/authorization/IAccessAdmin.sol +45 -19
- package/contracts/authorization/IAuthorization.sol +56 -3
- package/contracts/authorization/IServiceAuthorization.sol +17 -55
- package/contracts/authorization/ServiceAuthorization.sol +33 -247
- package/contracts/distribution/BasicDistributionAuthorization.sol +4 -11
- package/contracts/distribution/Distribution.sol +1 -2
- package/contracts/distribution/DistributionService.sol +33 -75
- package/contracts/distribution/IDistributionComponent.sol +1 -3
- package/contracts/distribution/IDistributionService.sol +4 -10
- package/contracts/instance/IInstance.sol +4 -43
- package/contracts/instance/IInstanceService.sol +3 -28
- package/contracts/instance/Instance.sol +39 -80
- package/contracts/instance/InstanceAdmin.sol +229 -162
- package/contracts/instance/InstanceAuthorizationV3.sol +28 -58
- package/contracts/instance/InstanceReader.sol +389 -371
- package/contracts/instance/InstanceService.sol +53 -105
- package/contracts/oracle/BasicOracleAuthorization.sol +2 -18
- package/contracts/pool/BasicPoolAuthorization.sol +3 -9
- package/contracts/pool/BundleService.sol +9 -8
- package/contracts/pool/PoolLib.sol +0 -44
- package/contracts/product/ApplicationService.sol +26 -4
- package/contracts/product/BasicProductAuthorization.sol +4 -9
- package/contracts/product/ClaimService.sol +20 -11
- package/contracts/product/PolicyService.sol +2 -2
- package/contracts/product/PolicyServiceLib.sol +0 -20
- package/contracts/registry/RegistryAdmin.sol +97 -27
- package/contracts/registry/RegistryAuthorization.sol +25 -35
- package/contracts/registry/ReleaseAdmin.sol +100 -42
- package/contracts/registry/ReleaseRegistry.sol +9 -12
- package/contracts/registry/ServiceAuthorizationV3.sol +20 -32
- package/contracts/registry/TokenRegistry.sol +4 -2
- package/contracts/shared/ComponentService.sol +5 -22
- package/contracts/shared/ContractLib.sol +45 -9
- package/contracts/shared/IRegisterable.sol +1 -0
- package/contracts/shared/Service.sol +4 -6
- package/contracts/staking/Staking.sol +5 -4
- package/contracts/staking/TargetManagerLib.sol +1 -1
- package/contracts/type/ObjectType.sol +3 -16
- package/contracts/type/RoleId.sol +59 -57
- package/contracts/type/String.sol +0 -12
- package/contracts/upgradeability/ProxyManager.sol +2 -2
- package/contracts/upgradeability/Versionable.sol +1 -4
- package/package.json +1 -1
@@ -2,7 +2,7 @@
|
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {
|
5
|
-
ALL,
|
5
|
+
ALL, ACCOUNTING, REGISTRY, RISK, ORACLE, POOL, INSTANCE, COMPONENT, DISTRIBUTION, APPLICATION, POLICY, CLAIM, BUNDLE, STAKING, PRICE
|
6
6
|
} from "../../contracts/type/ObjectType.sol";
|
7
7
|
|
8
8
|
import {IAccess} from "../authorization/IAccess.sol";
|
@@ -19,7 +19,6 @@ import {IPoolService} from "../pool/IPoolService.sol";
|
|
19
19
|
import {IStakingService} from "../staking/IStakingService.sol";
|
20
20
|
import {IRegistryService} from "./IRegistryService.sol";
|
21
21
|
import {IRiskService} from "../product/IRiskService.sol";
|
22
|
-
|
23
22
|
import {ServiceAuthorization} from "../authorization/ServiceAuthorization.sol";
|
24
23
|
|
25
24
|
|
@@ -28,31 +27,27 @@ contract ServiceAuthorizationV3
|
|
28
27
|
{
|
29
28
|
|
30
29
|
constructor(string memory commitHash)
|
31
|
-
ServiceAuthorization(
|
32
|
-
"ReleaseAdmin",
|
33
|
-
RELEASE(),
|
34
|
-
3,
|
35
|
-
commitHash)
|
30
|
+
ServiceAuthorization(commitHash, 3)
|
36
31
|
{}
|
37
32
|
|
38
33
|
function _setupDomains()
|
39
34
|
internal
|
40
35
|
override
|
41
36
|
{
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
37
|
+
_authorizeDomain(REGISTRY(), address(1));
|
38
|
+
_authorizeDomain(STAKING(), address(2));
|
39
|
+
_authorizeDomain(INSTANCE(), address(3));
|
40
|
+
_authorizeDomain(ACCOUNTING(), address(4));
|
41
|
+
_authorizeDomain(COMPONENT(), address(5));
|
42
|
+
_authorizeDomain(DISTRIBUTION(), address(6));
|
43
|
+
_authorizeDomain(PRICE(), address(7));
|
44
|
+
_authorizeDomain(BUNDLE(), address(8));
|
45
|
+
_authorizeDomain(POOL(), address(9));
|
46
|
+
_authorizeDomain(ORACLE(), address(10));
|
47
|
+
_authorizeDomain(RISK(), address(11));
|
48
|
+
_authorizeDomain(POLICY(), address(12));
|
49
|
+
_authorizeDomain(CLAIM(), address(13));
|
50
|
+
_authorizeDomain(APPLICATION(), address(14));
|
56
51
|
}
|
57
52
|
|
58
53
|
|
@@ -60,9 +55,10 @@ contract ServiceAuthorizationV3
|
|
60
55
|
internal
|
61
56
|
override
|
62
57
|
{
|
63
|
-
|
58
|
+
_setupIRegistryServiceAuthorization();
|
64
59
|
_setupStakingServiceAuthorization();
|
65
60
|
_setupInstanceServiceAuthorization();
|
61
|
+
_setupInstanceServiceAuthorization();
|
66
62
|
_setupAccountingServiceAuthorization();
|
67
63
|
_setupComponentServiceAuthorization();
|
68
64
|
_setupClaimServiceAuthorization();
|
@@ -78,7 +74,7 @@ contract ServiceAuthorizationV3
|
|
78
74
|
|
79
75
|
/// @dev registry service authorization.
|
80
76
|
/// authorized functions MUST be implemented with a restricted modifier
|
81
|
-
function
|
77
|
+
function _setupIRegistryServiceAuthorization()
|
82
78
|
internal
|
83
79
|
{
|
84
80
|
IAccess.FunctionInfo[] storage functions;
|
@@ -135,16 +131,8 @@ contract ServiceAuthorizationV3
|
|
135
131
|
{
|
136
132
|
IAccess.FunctionInfo[] storage functions;
|
137
133
|
functions = _authorizeForService(INSTANCE(), ALL());
|
138
|
-
_authorize(functions, IInstanceService.createRole.selector, "createRole");
|
139
|
-
_authorize(functions, IInstanceService.setRoleActive.selector, "setRoleActive");
|
140
|
-
_authorize(functions, IInstanceService.grantRole.selector, "grantRole");
|
141
|
-
_authorize(functions, IInstanceService.revokeRole.selector, "revokeRole");
|
142
|
-
|
143
|
-
_authorize(functions, IInstanceService.createTarget.selector, "createTarget");
|
144
|
-
_authorize(functions, IInstanceService.authorizeFunctions.selector, "authorizeFunctions");
|
145
|
-
_authorize(functions, IInstanceService.unauthorizeFunctions.selector, "unauthorizeFunctions");
|
146
|
-
_authorize(functions, IInstanceService.setTargetLocked.selector, "setTargetLocked");
|
147
134
|
_authorize(functions, IInstanceService.setInstanceLocked.selector, "setInstanceLocked");
|
135
|
+
_authorize(functions, IInstanceService.setTargetLocked.selector, "setTargetLocked");
|
148
136
|
|
149
137
|
_authorize(functions, IInstanceService.createInstance.selector, "createInstance");
|
150
138
|
_authorize(functions, IInstanceService.upgradeInstanceReader.selector, "upgradeInstanceReader");
|
@@ -3,13 +3,15 @@ pragma solidity ^0.8.20;
|
|
3
3
|
|
4
4
|
import {AccessManaged} from "@openzeppelin/contracts/access/manager/AccessManaged.sol";
|
5
5
|
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
6
|
+
import {ERC165Checker} from "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol";
|
7
|
+
|
8
|
+
import {REGISTRY} from "../type/ObjectType.sol";
|
9
|
+
import {VersionPart} from "../type/Version.sol";
|
6
10
|
|
7
11
|
import {IRegistry} from "./IRegistry.sol";
|
8
12
|
import {IRegistryLinked} from "../shared/IRegistryLinked.sol";
|
9
|
-
|
10
13
|
import {ReleaseRegistry} from "./ReleaseRegistry.sol";
|
11
14
|
import {RegistryAdmin} from "./RegistryAdmin.sol";
|
12
|
-
import {VersionPart} from "../type/Version.sol";
|
13
15
|
|
14
16
|
/// @dev The TokenRegistry contract is used to whitelist/manage ERC-20 of tokens per major release.
|
15
17
|
/// Only whitelisted tokens can be used as default tokens for products, distribution and pools components.
|
@@ -79,7 +79,7 @@ contract ComponentService is
|
|
79
79
|
}
|
80
80
|
|
81
81
|
// check provided address is product contract
|
82
|
-
if (!
|
82
|
+
if (!ContractLib.isInstanceLinkedComponent(address(registry), componentAddress)) {
|
83
83
|
revert ErrorComponentServiceNotComponent(componentAddress);
|
84
84
|
}
|
85
85
|
|
@@ -214,7 +214,7 @@ contract ComponentService is
|
|
214
214
|
}
|
215
215
|
|
216
216
|
// check provided address is product contract
|
217
|
-
if (!
|
217
|
+
if (!ContractLib.isProduct(address(registry), productAddress)) {
|
218
218
|
revert ErrorComponentServiceNotProduct(productAddress);
|
219
219
|
}
|
220
220
|
|
@@ -227,24 +227,6 @@ contract ComponentService is
|
|
227
227
|
}
|
228
228
|
|
229
229
|
|
230
|
-
function _isProduct(address target) internal view virtual returns (bool) {
|
231
|
-
if (!_isInstanceLinkedComponent(target)) {
|
232
|
-
return false;
|
233
|
-
}
|
234
|
-
|
235
|
-
return IInstanceLinkedComponent(target).getInitialInfo().objectType == PRODUCT();
|
236
|
-
}
|
237
|
-
|
238
|
-
|
239
|
-
function _isInstanceLinkedComponent(address target) internal view virtual returns (bool) {
|
240
|
-
if (!ContractLib.isContract(target)) {
|
241
|
-
return false;
|
242
|
-
}
|
243
|
-
|
244
|
-
return ContractLib.supportsInterface(target, type(IInstanceLinkedComponent).interfaceId);
|
245
|
-
}
|
246
|
-
|
247
|
-
|
248
230
|
/// @inheritdoc IComponentService
|
249
231
|
function setProductFees(
|
250
232
|
Fee memory productFee, // product fee on net premium
|
@@ -283,7 +265,8 @@ contract ComponentService is
|
|
283
265
|
function _createProduct(
|
284
266
|
InstanceStore instanceStore,
|
285
267
|
NftId productNftId,
|
286
|
-
address productAddress
|
268
|
+
address productAddress,
|
269
|
+
address token
|
287
270
|
)
|
288
271
|
internal
|
289
272
|
virtual
|
@@ -496,7 +479,7 @@ contract ComponentService is
|
|
496
479
|
objectInfo.initialOwner).nftId;
|
497
480
|
|
498
481
|
// create product info in instance store
|
499
|
-
_createProduct(instanceStore, componentNftId, componentAddress);
|
482
|
+
_createProduct(instanceStore, componentNftId, componentAddress, token);
|
500
483
|
} else {
|
501
484
|
// register non product component with registry
|
502
485
|
componentNftId = _registryService.registerProductLinkedComponent(
|
@@ -5,12 +5,12 @@ import {ERC165Checker} from "@openzeppelin/contracts/utils/introspection/ERC165C
|
|
5
5
|
import {IAccessManager} from "@openzeppelin/contracts/access/manager/IAccessManager.sol";
|
6
6
|
import {IAccessManaged} from "@openzeppelin/contracts/access/manager/IAccessManaged.sol";
|
7
7
|
|
8
|
+
import {IInstanceLinkedComponent} from "../shared/IInstanceLinkedComponent.sol";
|
8
9
|
import {IPolicyHolder} from "../shared/IPolicyHolder.sol";
|
9
10
|
import {IRegistry} from "../registry/IRegistry.sol";
|
10
|
-
import {IService} from "../shared/IService.sol";
|
11
11
|
|
12
12
|
import {NftId} from "../type/NftId.sol";
|
13
|
-
import {ObjectType, INSTANCE, PRODUCT, DISTRIBUTION, ORACLE, POOL} from "../type/ObjectType.sol";
|
13
|
+
import {ObjectType, INSTANCE, PRODUCT, DISTRIBUTION, ORACLE, POOL, STAKING} from "../type/ObjectType.sol";
|
14
14
|
import {VersionPart} from "../type/Version.sol";
|
15
15
|
|
16
16
|
interface ITargetHelper {
|
@@ -98,6 +98,25 @@ library ContractLib {
|
|
98
98
|
}
|
99
99
|
|
100
100
|
|
101
|
+
// TODO cleanup
|
102
|
+
// function getAndVerifyStaking(
|
103
|
+
// IRegistry registry,
|
104
|
+
// address target
|
105
|
+
// )
|
106
|
+
// external
|
107
|
+
// view
|
108
|
+
// returns (IRegistry.ObjectInfo memory info)
|
109
|
+
// {
|
110
|
+
// // check target is component
|
111
|
+
// info = _getAndVerifyObjectInfo(registry, target);
|
112
|
+
// if(info.objectType != STAKING()) {
|
113
|
+
// revert ErrorContractLibNotStaking(
|
114
|
+
// info.nftId,
|
115
|
+
// info.objectType);
|
116
|
+
// }
|
117
|
+
// }
|
118
|
+
|
119
|
+
|
101
120
|
function getInstanceForComponent(
|
102
121
|
IRegistry registry,
|
103
122
|
NftId componentNftId
|
@@ -159,22 +178,39 @@ library ContractLib {
|
|
159
178
|
}
|
160
179
|
|
161
180
|
|
162
|
-
function
|
163
|
-
|
164
|
-
|
181
|
+
function isProduct(address registry, address target)
|
182
|
+
public
|
183
|
+
view
|
184
|
+
returns (bool)
|
185
|
+
{
|
186
|
+
if (!isInstanceLinkedComponent(registry, target)) {
|
165
187
|
return false;
|
166
188
|
}
|
167
189
|
|
168
|
-
return
|
190
|
+
return IInstanceLinkedComponent(target).getInitialInfo().objectType == PRODUCT();
|
169
191
|
}
|
170
192
|
|
171
193
|
|
172
|
-
function
|
173
|
-
|
194
|
+
function isInstanceLinkedComponent(address registry, address target)
|
195
|
+
public
|
196
|
+
view
|
197
|
+
returns (bool)
|
198
|
+
{
|
199
|
+
if (!isContract(target)) {
|
200
|
+
return false;
|
201
|
+
}
|
202
|
+
|
203
|
+
return supportsInterface(target, type(IInstanceLinkedComponent).interfaceId);
|
204
|
+
}
|
205
|
+
|
206
|
+
|
207
|
+
function isRegistered(address registry, address caller, ObjectType expectedType) public view returns (bool) {
|
208
|
+
NftId nftId = IRegistry(registry).getNftIdForAddress(caller);
|
209
|
+
if (nftId.eqz()) {
|
174
210
|
return false;
|
175
211
|
}
|
176
212
|
|
177
|
-
return
|
213
|
+
return IRegistry(registry).getObjectInfo(nftId).objectType == expectedType;
|
178
214
|
}
|
179
215
|
|
180
216
|
|
@@ -6,6 +6,7 @@ import {IAccessManaged} from "@openzeppelin/contracts/access/manager/IAccessMana
|
|
6
6
|
import {INftOwnable} from "./INftOwnable.sol";
|
7
7
|
import {IRelease} from "../registry/IRelease.sol";
|
8
8
|
import {IRegistry} from "../registry/IRegistry.sol";
|
9
|
+
import {VersionPart} from "../type/Version.sol";
|
9
10
|
|
10
11
|
/// @title IRegisterable
|
11
12
|
/// @dev Marks contracts that are intended to be registered in the registry.
|
@@ -1,15 +1,16 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
+
import {IAccessManaged} from "@openzeppelin/contracts/access/manager/IAccessManaged.sol";
|
4
5
|
import {ReentrancyGuardUpgradeable} from "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
|
5
6
|
|
6
7
|
import {IRegistry} from "../registry/IRegistry.sol";
|
7
8
|
import {IService} from "./IService.sol";
|
8
9
|
import {IVersionable} from "../upgradeability/IVersionable.sol";
|
9
|
-
import {ObjectType, SERVICE} from "../type/ObjectType.sol";
|
10
|
+
import {ObjectType, REGISTRY, SERVICE} from "../type/ObjectType.sol";
|
10
11
|
import {Registerable} from "./Registerable.sol";
|
11
12
|
import {RoleId, RoleIdLib} from "../type/RoleId.sol";
|
12
|
-
import {Version, VersionLib} from "../type/Version.sol";
|
13
|
+
import {Version, VersionLib, VersionPartLib} from "../type/Version.sol";
|
13
14
|
import {Versionable} from "../upgradeability/Versionable.sol";
|
14
15
|
|
15
16
|
|
@@ -52,15 +53,12 @@ abstract contract Service is
|
|
52
53
|
return VersionLib.toVersion(3, 0, 0);
|
53
54
|
}
|
54
55
|
|
55
|
-
|
56
56
|
function getRoleId() external virtual view returns(RoleId serviceRoleId) {
|
57
|
-
return RoleIdLib.
|
57
|
+
return RoleIdLib.roleForTypeAndVersion(_getDomain(), getRelease());
|
58
58
|
}
|
59
59
|
|
60
|
-
//--- internal functions --------------------------------------------------------//
|
61
60
|
function _getDomain() internal virtual pure returns (ObjectType);
|
62
61
|
|
63
|
-
|
64
62
|
function _getServiceAddress(ObjectType domain) internal view returns (address) {
|
65
63
|
return getRegistry().getServiceAddress(domain, getRelease());
|
66
64
|
}
|
@@ -243,7 +243,7 @@ contract Staking is
|
|
243
243
|
returns (Amount newBalance)
|
244
244
|
{
|
245
245
|
StakingStorage storage $ = _getStakingStorage();
|
246
|
-
|
246
|
+
uint chainId = $._reader.getTargetInfo(targetNftId).chainId;
|
247
247
|
UFixed stakingRate = $._reader.getStakingRate(chainId, token);
|
248
248
|
newBalance = $._store.increaseTotalValueLocked(targetNftId, stakingRate, token, amount);
|
249
249
|
}
|
@@ -256,7 +256,7 @@ contract Staking is
|
|
256
256
|
returns (Amount newBalance)
|
257
257
|
{
|
258
258
|
StakingStorage storage $ = _getStakingStorage();
|
259
|
-
|
259
|
+
uint chainId = $._reader.getTargetInfo(targetNftId).chainId;
|
260
260
|
UFixed stakingRate = $._reader.getStakingRate(chainId, token);
|
261
261
|
newBalance = $._store.decreaseTotalValueLocked(targetNftId, stakingRate, token, amount);
|
262
262
|
}
|
@@ -495,9 +495,8 @@ contract Staking is
|
|
495
495
|
}
|
496
496
|
|
497
497
|
|
498
|
-
/// @dev top level initializer (upgradable contract)
|
499
498
|
function _initialize(
|
500
|
-
address,
|
499
|
+
address owner,
|
501
500
|
bytes memory data
|
502
501
|
)
|
503
502
|
internal
|
@@ -514,6 +513,8 @@ contract Staking is
|
|
514
513
|
// only admin(authority) and dip token address are set in registry at this point
|
515
514
|
IRegistry registry = IRegistry(registryAddress);
|
516
515
|
address authority = registry.getAuthority();
|
516
|
+
TokenRegistry tokenRegistry = TokenRegistry(tokenRegistryAddress);
|
517
|
+
address dipTokenAddress = tokenRegistry.getDipTokenAddress();
|
517
518
|
|
518
519
|
// wiring to external contracts
|
519
520
|
StakingStorage storage $ = _getStakingStorage();
|
@@ -10,7 +10,6 @@ using {
|
|
10
10
|
eqObjectType as ==,
|
11
11
|
neObjectType as !=,
|
12
12
|
ObjectTypeLib.toInt,
|
13
|
-
ObjectTypeLib.toName,
|
14
13
|
ObjectTypeLib.eqz,
|
15
14
|
ObjectTypeLib.eq,
|
16
15
|
ObjectTypeLib.gtz
|
@@ -144,16 +143,7 @@ function REFERRAL() pure returns (ObjectType) {
|
|
144
143
|
return ObjectType.wrap(49);
|
145
144
|
}
|
146
145
|
|
147
|
-
/// @dev Object type for GIF core target roles.
|
148
|
-
function CORE() pure returns (ObjectType) {
|
149
|
-
return ObjectType.wrap(97);
|
150
|
-
}
|
151
146
|
|
152
|
-
/// @dev Object type for target roles of contracts outside the GIF framework.
|
153
|
-
/// Example: Custom supporting contracts for a product component.
|
154
|
-
function CUSTOM() pure returns (ObjectType) {
|
155
|
-
return ObjectType.wrap(98);
|
156
|
-
}
|
157
147
|
|
158
148
|
/// @dev Object type that includes any other object type.
|
159
149
|
/// Note that eq()/'==' does not take this property into account.
|
@@ -213,8 +203,6 @@ library ObjectTypeLib {
|
|
213
203
|
return "Registry";
|
214
204
|
} else if (objectType == STAKING()) {
|
215
205
|
return "Staking";
|
216
|
-
} else if (objectType == RELEASE()) {
|
217
|
-
return "Release";
|
218
206
|
} else if (objectType == INSTANCE()) {
|
219
207
|
return "Instance";
|
220
208
|
} else if (objectType == COMPONENT()) {
|
@@ -251,7 +239,6 @@ library ObjectTypeLib {
|
|
251
239
|
toInt(objectType))));
|
252
240
|
}
|
253
241
|
|
254
|
-
// TODO move to IService
|
255
242
|
function toVersionedName(
|
256
243
|
string memory name,
|
257
244
|
string memory suffix,
|
@@ -261,10 +248,10 @@ library ObjectTypeLib {
|
|
261
248
|
pure
|
262
249
|
returns (string memory versionedName)
|
263
250
|
{
|
264
|
-
string memory versionName = "
|
251
|
+
string memory versionName = "_v0";
|
265
252
|
|
266
253
|
if (release.toInt() >= 10) {
|
267
|
-
versionName = "
|
254
|
+
versionName = "_v";
|
268
255
|
}
|
269
256
|
|
270
257
|
versionedName = string(
|
@@ -290,7 +277,7 @@ library ObjectTypeLib {
|
|
290
277
|
}
|
291
278
|
|
292
279
|
bytes memory buffer = new bytes(digits);
|
293
|
-
|
280
|
+
uint index = digits - 1;
|
294
281
|
|
295
282
|
temp = value;
|
296
283
|
while (temp != 0) {
|
@@ -3,7 +3,7 @@ pragma solidity ^0.8.20;
|
|
3
3
|
|
4
4
|
import {Key32, KeyId, Key32Lib} from "./Key32.sol";
|
5
5
|
import {ObjectType, ROLE} from "./ObjectType.sol";
|
6
|
-
import {VersionPart
|
6
|
+
import {VersionPart} from "./Version.sol";
|
7
7
|
|
8
8
|
type RoleId is uint64;
|
9
9
|
|
@@ -12,9 +12,11 @@ using {
|
|
12
12
|
eqRoleId as ==,
|
13
13
|
neRoleId as !=,
|
14
14
|
RoleIdLib.toInt,
|
15
|
-
RoleIdLib.isServiceRole,
|
16
15
|
RoleIdLib.eqz,
|
17
|
-
RoleIdLib.gtz
|
16
|
+
RoleIdLib.gtz,
|
17
|
+
RoleIdLib.isComponentRole,
|
18
|
+
RoleIdLib.isCustomRole
|
19
|
+
// RoleIdLib.toKey32
|
18
20
|
} for RoleId global;
|
19
21
|
|
20
22
|
// general pure free functions
|
@@ -54,14 +56,9 @@ function GIF_MANAGER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(2)
|
|
54
56
|
/// @dev role for registering remote staking targets and reporting remote total value locked amounts.
|
55
57
|
function GIF_REMOTE_MANAGER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(3); }
|
56
58
|
|
57
|
-
// TODO check if/where this is really needed
|
58
59
|
/// @dev role assigned to release registry, release specfic to lock/unlock a release
|
59
60
|
function RELEASE_REGISTRY_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(4); }
|
60
61
|
|
61
|
-
/// @dev role assigned to every instance owner
|
62
|
-
function INSTANCE_OWNER_ROLE() pure returns (RoleId) { return RoleIdLib.toRoleId(5); }
|
63
|
-
|
64
|
-
// TODO upate role id ranges
|
65
62
|
//--- GIF core contract roles (range: 200 - 9'900) --------------------------//
|
66
63
|
// created and assigned during initial deployment for registry and staking
|
67
64
|
// granting for instances and components in instance service
|
@@ -100,72 +97,56 @@ function CUSTOM_ROLE_MIN() pure returns (RoleId) { return RoleIdLib.toRoleId(100
|
|
100
97
|
|
101
98
|
library RoleIdLib {
|
102
99
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
uint64 public constant
|
107
|
-
uint64 public constant
|
108
|
-
|
109
|
-
uint64 public constant SERVICE_ROLE_FACTOR = 1000;
|
100
|
+
uint64 public constant ALL_VERSIONS = 99;
|
101
|
+
uint64 public constant SERVICE_DOMAIN_ROLE_FACTOR = 100;
|
102
|
+
uint64 public constant COMPONENT_ROLE_FACTOR = 1000;
|
103
|
+
uint64 public constant COMPONENT_ROLE_MIN_INT = 12000;
|
104
|
+
uint64 public constant COMPONENT_ROLE_MAX_INT = 19000;
|
105
|
+
uint64 public constant CUSTOM_ROLE_MIN_INT = 1000000;
|
110
106
|
|
111
107
|
/// @dev Converts the RoleId to a uint.
|
112
108
|
function zero() public pure returns (RoleId) {
|
113
109
|
return RoleId.wrap(0);
|
114
110
|
}
|
115
111
|
|
116
|
-
|
117
112
|
/// @dev Converts an uint into a role id.
|
118
|
-
function toRoleId(
|
119
|
-
|
120
|
-
revert ErrorRoleIdTooBig(a);
|
121
|
-
}
|
122
|
-
|
123
|
-
return RoleId.wrap(uint64(a));
|
113
|
+
function toRoleId(uint64 a) public pure returns (RoleId) {
|
114
|
+
return RoleId.wrap(a);
|
124
115
|
}
|
125
116
|
|
126
|
-
|
127
|
-
function
|
128
|
-
|
129
|
-
pure
|
130
|
-
returns (bool)
|
131
|
-
{
|
132
|
-
uint256 roleIdInt = RoleId.unwrap(roleId);
|
133
|
-
return roleIdInt >= SERVICE_ROLE_MIN && roleIdInt <= SERVICE_ROLE_MAX;
|
117
|
+
/// @dev Converts an uint into a component role id.
|
118
|
+
function toComponentRoleId(ObjectType objectType, uint64 index) public pure returns (RoleId) {
|
119
|
+
return toRoleId(COMPONENT_ROLE_FACTOR * uint64(objectType.toInt()) + index);
|
134
120
|
}
|
135
121
|
|
122
|
+
/// @dev Converts an uint into a custom role id.
|
123
|
+
function toCustomRoleId(uint64 index) public pure returns (RoleId) {
|
124
|
+
return toRoleId(CUSTOM_ROLE_MIN_INT + index);
|
125
|
+
}
|
136
126
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
public
|
141
|
-
pure
|
142
|
-
returns (RoleId)
|
143
|
-
{
|
144
|
-
return toServiceRoleId(
|
145
|
-
objectType,
|
146
|
-
VersionPartLib.releaseMax());
|
127
|
+
/// @dev Converts the role id to a uint.
|
128
|
+
function toInt(RoleId a) public pure returns (uint64) {
|
129
|
+
return uint64(RoleId.unwrap(a));
|
147
130
|
}
|
148
131
|
|
132
|
+
/// @dev Converts an uint into a role id.
|
133
|
+
/// Used for GIF core contracts.
|
134
|
+
function roleForType(ObjectType objectType) public pure returns (RoleId) {
|
135
|
+
return RoleId.wrap(SERVICE_DOMAIN_ROLE_FACTOR * uint64(objectType.toInt()));
|
136
|
+
}
|
149
137
|
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
pure
|
156
|
-
returns (RoleId serviceRoleId)
|
157
|
-
{
|
158
|
-
uint256 serviceRoleIdInt =
|
159
|
-
SERVICE_ROLE_MIN
|
160
|
-
+ SERVICE_ROLE_FACTOR * (serviceDomain.toInt() - 1)
|
161
|
-
+ release.toInt();
|
162
|
-
|
163
|
-
return toRoleId(serviceRoleIdInt);
|
138
|
+
/// @dev Converts an uint into a RoleId.
|
139
|
+
/// Used for GIF core contracts.
|
140
|
+
function roleForTypeAndVersion(ObjectType objectType, VersionPart majorVersion) public pure returns (RoleId) {
|
141
|
+
return RoleId.wrap(
|
142
|
+
uint64(SERVICE_DOMAIN_ROLE_FACTOR * objectType.toInt() + majorVersion.toInt()));
|
164
143
|
}
|
165
144
|
|
166
|
-
/// @dev Converts
|
167
|
-
|
168
|
-
|
145
|
+
/// @dev Converts an uint into a RoleId.
|
146
|
+
/// Used for GIF core contracts.
|
147
|
+
function roleForTypeAndAllVersions(ObjectType objectType) public pure returns (RoleId) {
|
148
|
+
return RoleId.wrap(
|
149
|
+
uint64(SERVICE_DOMAIN_ROLE_FACTOR * objectType.toInt() + ALL_VERSIONS));
|
169
150
|
}
|
170
151
|
|
171
152
|
/// @dev Returns true if the value is non-zero (> 0).
|
@@ -177,4 +158,25 @@ library RoleIdLib {
|
|
177
158
|
function eqz(RoleId a) public pure returns (bool) {
|
178
159
|
return RoleId.unwrap(a) == 0;
|
179
160
|
}
|
161
|
+
|
162
|
+
/// @dev Returns true iff the role id is a component role.
|
163
|
+
function isComponentRole(RoleId roleId) public pure returns (bool) {
|
164
|
+
uint64 roleIdInt = RoleId.unwrap(roleId);
|
165
|
+
return roleIdInt >= COMPONENT_ROLE_MIN_INT && roleIdInt <= COMPONENT_ROLE_MAX_INT;
|
166
|
+
}
|
167
|
+
|
168
|
+
/// @dev Returns true iff the role id is a custom role.
|
169
|
+
function isCustomRole(RoleId roleId) public pure returns (bool) {
|
170
|
+
return RoleId.unwrap(roleId) >= CUSTOM_ROLE_MIN_INT;
|
171
|
+
}
|
172
|
+
|
173
|
+
/// @dev Returns the key32 value for the specified id and object type.
|
174
|
+
function toKey32(RoleId a) public pure returns (Key32 key) {
|
175
|
+
return Key32Lib.toKey32(ROLE(), toKeyId(a));
|
176
|
+
}
|
177
|
+
|
178
|
+
/// @dev Returns the key id value for the specified id
|
179
|
+
function toKeyId(RoleId a) public pure returns (KeyId keyId) {
|
180
|
+
return KeyId.wrap(bytes31(uint248(RoleId.unwrap(a))));
|
181
|
+
}
|
180
182
|
}
|
@@ -12,12 +12,10 @@ using {
|
|
12
12
|
StrLib.length
|
13
13
|
} for Str global;
|
14
14
|
|
15
|
-
// pure free function needed for the operator overloading
|
16
15
|
function StrEq(Str s1, Str s2) pure returns (bool) {
|
17
16
|
return StrLib.eq(s1, s2);
|
18
17
|
}
|
19
18
|
|
20
|
-
// pure free function needed for the operator overloading
|
21
19
|
function StrNe(Str s1, Str s2) pure returns (bool) {
|
22
20
|
return StrLib.ne(s1, s2);
|
23
21
|
}
|
@@ -41,16 +39,6 @@ library StrLib {
|
|
41
39
|
return Str.unwrap(s1) != Str.unwrap(s2);
|
42
40
|
}
|
43
41
|
|
44
|
-
/// @dev return true iff s1 equals from s2
|
45
|
-
function eq(string memory s1, string memory s2) public pure returns (bool) {
|
46
|
-
return keccak256(bytes(s1)) == keccak256(bytes(s2));
|
47
|
-
}
|
48
|
-
|
49
|
-
/// @dev return true iff s1 differs s2
|
50
|
-
function ne(string memory s1, string memory s2) public pure returns (bool) {
|
51
|
-
return !eq(s1, s2);
|
52
|
-
}
|
53
|
-
|
54
42
|
/// @dev converts the provided short string into a string.
|
55
43
|
/// uses ShortStrings.toString
|
56
44
|
function toString(Str str) public pure returns (string memory) {
|
@@ -39,8 +39,8 @@ contract ProxyManager is
|
|
39
39
|
UpgradableProxyWithAdmin internal _proxy;
|
40
40
|
|
41
41
|
// state to keep version history
|
42
|
-
mapping(Version version => VersionInfo info)
|
43
|
-
Version []
|
42
|
+
mapping(Version version => VersionInfo info) _versionHistory;
|
43
|
+
Version [] _versions;
|
44
44
|
|
45
45
|
/// @dev convencience initializer
|
46
46
|
function initialize(
|
@@ -39,10 +39,7 @@ abstract contract Versionable is
|
|
39
39
|
// IMPORTANT each version must implement this function
|
40
40
|
// each implementation MUST use onlyInitialising modifier
|
41
41
|
// each implementation MUST call intializers of all base contracts...
|
42
|
-
function _initialize(
|
43
|
-
address, // owner
|
44
|
-
bytes memory // data
|
45
|
-
)
|
42
|
+
function _initialize(address owner, bytes memory data)
|
46
43
|
internal
|
47
44
|
onlyInitializing()
|
48
45
|
virtual
|
package/package.json
CHANGED