@etherisc/gif-next 0.0.2-7c8d286-020 → 0.0.2-7d488b3-675
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +32 -48
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +26 -34
- 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 +246 -361
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +39 -8
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +23 -96
- 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 +184 -278
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +0 -32
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +2 -2
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +109 -33
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +41 -96
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +65 -0
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +106 -142
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +53 -61
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +65 -0
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +20 -40
- 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 +17 -33
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +41 -96
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +59 -75
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +41 -96
- 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 +118 -42
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +41 -96
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +23 -23
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +27 -43
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +41 -96
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +29 -45
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +41 -96
- 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 +7 -85
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +11 -54
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +25 -95
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +405 -512
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +41 -96
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +2 -2
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +63 -86
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +36 -26
- 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 +14 -14
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +30 -93
- 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 +42 -58
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +31 -39
- 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 +41 -96
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +58 -74
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +39 -47
- 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 +22 -38
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +74 -106
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +47 -63
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +26 -71
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +23 -35
- 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 +41 -96
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +80 -96
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +50 -58
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +0 -21
- 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/IPricingService.sol/IPricingService.json +0 -21
- 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/IRiskService.sol/IRiskService.json +0 -21
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +86 -94
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +18 -452
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +53 -57
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +52 -89
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +36 -44
- 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 +26 -55
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +23 -27
- 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 +350 -440
- 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 +19 -19
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +368 -473
- 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 +124 -128
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +6 -6
- 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 +102 -63
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +49 -41
- 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 +4 -60
- 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/IComponentService.sol/IComponentService.json +24 -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/InitializableERC165.sol/InitializableERC165.json +2 -2
- 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/IStaking.sol/IStaking.json +9 -74
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +3 -74
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +4 -0
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +440 -0
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +57 -141
- 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 +34 -50
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +57 -30
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +29 -124
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +23 -35
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +128 -142
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +14 -24
- 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 +31 -33
- 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 +2 -2
- 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/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/VersionLib.json +2 -2
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.json +2 -56
- 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 +4 -4
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
- package/contracts/accounting/AccountingService.sol +3 -2
- package/contracts/authorization/AccessAdmin.sol +186 -201
- package/contracts/authorization/AccessManagerCloneable.sol +31 -40
- package/contracts/authorization/Authorization.sol +33 -61
- package/contracts/authorization/IAccessAdmin.sol +36 -63
- package/contracts/authorization/IAuthorization.sol +0 -6
- package/contracts/distribution/BasicDistribution.sol +3 -5
- package/contracts/distribution/BasicDistributionAuthorization.sol +1 -1
- package/contracts/distribution/Distribution.sol +47 -4
- package/contracts/distribution/DistributionService.sol +6 -10
- package/contracts/distribution/IDistributionComponent.sol +9 -0
- package/contracts/distribution/IDistributionService.sol +5 -3
- package/contracts/instance/IInstance.sol +8 -43
- package/contracts/instance/IInstanceService.sol +2 -14
- package/contracts/instance/Instance.sol +13 -62
- package/contracts/instance/InstanceAdmin.sol +107 -120
- package/contracts/instance/InstanceAuthorizationV3.sol +21 -43
- package/contracts/instance/InstanceReader.sol +1 -1
- package/contracts/instance/InstanceService.sol +60 -118
- package/contracts/oracle/BasicOracleAuthorization.sol +1 -1
- package/contracts/oracle/OracleService.sol +4 -4
- package/contracts/pool/BasicPoolAuthorization.sol +1 -1
- package/contracts/pool/PoolLib.sol +1 -94
- package/contracts/pool/PoolService.sol +89 -91
- package/contracts/product/ApplicationService.sol +1 -10
- package/contracts/product/BasicProductAuthorization.sol +1 -1
- package/contracts/product/ClaimService.sol +0 -8
- package/contracts/product/IApplicationService.sol +0 -2
- package/contracts/product/IPricingService.sol +0 -1
- package/contracts/product/IRiskService.sol +0 -3
- package/contracts/product/PolicyService.sol +53 -35
- package/contracts/product/PolicyServiceLib.sol +1 -55
- package/contracts/product/PricingService.sol +0 -5
- package/contracts/product/RiskService.sol +0 -10
- package/contracts/registry/RegistryAdmin.sol +229 -133
- package/contracts/registry/ReleaseAdmin.sol +22 -30
- package/contracts/registry/ReleaseRegistry.sol +33 -39
- package/contracts/registry/ServiceAuthorizationV3.sol +3 -88
- package/contracts/shared/Component.sol +6 -6
- package/contracts/shared/ComponentService.sol +29 -33
- package/contracts/shared/ContractLib.sol +0 -28
- package/contracts/shared/IComponentService.sol +6 -4
- package/contracts/shared/InitializableERC165.sol +1 -9
- package/contracts/shared/NftOwnable.sol +1 -2
- package/contracts/shared/Registerable.sol +4 -1
- package/contracts/shared/TokenHandler.sol +4 -5
- package/contracts/staking/IStaking.sol +2 -12
- package/contracts/staking/IStakingService.sol +1 -11
- package/contracts/staking/{StakingLib.sol → StakeManagerLib.sol} +22 -79
- package/contracts/staking/Staking.sol +13 -33
- package/contracts/staking/StakingReader.sol +15 -5
- package/contracts/staking/StakingService.sol +2 -39
- package/contracts/staking/StakingStore.sol +1 -2
- package/contracts/type/ObjectType.sol +14 -5
- package/contracts/type/Version.sol +0 -39
- package/package.json +1 -1
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.dbg.json +0 -4
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.json +0 -673
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.dbg.json +0 -4
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.json +0 -878
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.dbg.json +0 -4
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.json +0 -469
- package/contracts/authorization/AccessAdminLib.sol +0 -183
- package/contracts/registry/RegistryAuthorization.sol +0 -267
@@ -71,7 +71,6 @@ contract DistributionService is
|
|
71
71
|
bytes memory data
|
72
72
|
)
|
73
73
|
external
|
74
|
-
restricted()
|
75
74
|
returns (DistributorType distributorType)
|
76
75
|
{
|
77
76
|
(NftId distributionNftId,, IInstance instance) = _getAndVerifyActiveComponent(DISTRIBUTION());
|
@@ -117,7 +116,6 @@ contract DistributionService is
|
|
117
116
|
)
|
118
117
|
external
|
119
118
|
virtual
|
120
|
-
restricted()
|
121
119
|
returns (NftId distributorNftId)
|
122
120
|
{
|
123
121
|
(NftId distributionNftId,, IInstance instance) = _getAndVerifyActiveComponent(DISTRIBUTION());
|
@@ -145,19 +143,18 @@ contract DistributionService is
|
|
145
143
|
|
146
144
|
function changeDistributorType(
|
147
145
|
NftId distributorNftId,
|
148
|
-
DistributorType
|
146
|
+
DistributorType distributorType,
|
149
147
|
bytes memory data
|
150
148
|
)
|
151
149
|
external
|
152
150
|
virtual
|
153
|
-
restricted()
|
154
151
|
{
|
155
152
|
_checkNftType(distributorNftId, DISTRIBUTOR());
|
156
153
|
(NftId distributionNftId,, IInstance instance) = _getAndVerifyActiveComponent(DISTRIBUTION());
|
157
|
-
_checkDistributionType(instance.getInstanceReader(),
|
154
|
+
_checkDistributionType(instance.getInstanceReader(), distributorType, distributionNftId);
|
158
155
|
|
159
156
|
IDistribution.DistributorInfo memory distributorInfo = instance.getInstanceReader().getDistributorInfo(distributorNftId);
|
160
|
-
distributorInfo.distributorType =
|
157
|
+
distributorInfo.distributorType = distributorType;
|
161
158
|
distributorInfo.data = data;
|
162
159
|
instance.getInstanceStore().updateDistributor(distributorNftId, distributorInfo, KEEP_STATE());
|
163
160
|
}
|
@@ -173,7 +170,6 @@ contract DistributionService is
|
|
173
170
|
)
|
174
171
|
external
|
175
172
|
virtual
|
176
|
-
restricted()
|
177
173
|
onlyNftOfType(distributorNftId, DISTRIBUTOR())
|
178
174
|
returns (ReferralId referralId)
|
179
175
|
{
|
@@ -188,7 +184,7 @@ contract DistributionService is
|
|
188
184
|
|
189
185
|
NftId distributorDistributionNftId = getRegistry().getParentNftId(distributorNftId);
|
190
186
|
if (distributorDistributionNftId != distributionNftId) {
|
191
|
-
revert
|
187
|
+
revert ErrorDistributionServiceInvalidDistributor(distributorNftId);
|
192
188
|
}
|
193
189
|
|
194
190
|
{
|
@@ -294,7 +290,7 @@ contract DistributionService is
|
|
294
290
|
function withdrawCommission(NftId distributorNftId, Amount amount)
|
295
291
|
public
|
296
292
|
virtual
|
297
|
-
restricted()
|
293
|
+
// TODO: restricted() (once #462 is done)
|
298
294
|
onlyNftOfType(distributorNftId, DISTRIBUTOR())
|
299
295
|
returns (Amount withdrawnAmount)
|
300
296
|
{
|
@@ -369,7 +365,7 @@ contract DistributionService is
|
|
369
365
|
NftId distributorTypeDistributionNftId = instanceReader.getDistributorTypeInfo(distributorType).distributionNftId;
|
370
366
|
|
371
367
|
if (distributorTypeDistributionNftId != expectedDistributionNftId) {
|
372
|
-
revert
|
368
|
+
revert ErrorDistributionServiceInvalidDistributorType(distributorType);
|
373
369
|
}
|
374
370
|
}
|
375
371
|
|
@@ -9,8 +9,17 @@ import {UFixed} from "../type/UFixed.sol";
|
|
9
9
|
|
10
10
|
interface IDistributionComponent is IInstanceLinkedComponent {
|
11
11
|
|
12
|
+
error ErrorDistributionNotDistributor(address distributor);
|
13
|
+
error ErrorDistributionAlreadyDistributor(address distributor, NftId distributorNftId);
|
14
|
+
|
12
15
|
event LogDistributorUpdated(address to, address operator);
|
13
16
|
|
17
|
+
/// @dev Returns true iff the provided address is registered as a distributor with this distribution component.
|
18
|
+
function isDistributor(address candidate) external view returns (bool);
|
19
|
+
|
20
|
+
/// @dev Returns the distributor Nft Id for the provided address
|
21
|
+
function getDistributorNftId(address distributor) external view returns (NftId distributorNftId);
|
22
|
+
|
14
23
|
function getDiscountPercentage(
|
15
24
|
string memory referralCode
|
16
25
|
) external view returns (UFixed discountPercentage, ReferralStatus status);
|
@@ -13,6 +13,10 @@ import {Timestamp} from "../type/Timestamp.sol";
|
|
13
13
|
|
14
14
|
|
15
15
|
interface IDistributionService is IService {
|
16
|
+
// TODO: rename
|
17
|
+
error ErrorDistributionServiceInvalidDistributorType(DistributorType distributorType);
|
18
|
+
// TODO: rename
|
19
|
+
error ErrorDistributionServiceInvalidDistributor(NftId distributorNftId);
|
16
20
|
error ErrorDistributionServiceCallerNotRegistered(address caller);
|
17
21
|
error ErrorDistributionServiceParentNftIdNotInstance(NftId nftId, NftId parentNftId);
|
18
22
|
error ErrorDistributionServiceCallerNotDistributor(address caller);
|
@@ -25,8 +29,6 @@ interface IDistributionService is IService {
|
|
25
29
|
error ErrorDistributionServiceExpirationInvalid(Timestamp expiryAt);
|
26
30
|
error ErrorDistributionServiceCommissionTooHigh(uint256 commissionPercentage, uint256 maxCommissionPercentage);
|
27
31
|
error ErrorDistributionServiceMinFeeTooHigh(uint256 minFee, uint256 limit);
|
28
|
-
error ErrorDistributionServiceDistributorTypeDistributionMismatch(DistributorType distributorType, NftId distributorTypeDistributionNftId, NftId distributionNftId);
|
29
|
-
error ErrorDistributionServiceDistributorDistributionMismatch(NftId distributorNftId, NftId distributorDistributionNftId, NftId distributionNftId);
|
30
32
|
|
31
33
|
error ErrorDistributionServiceCommissionWithdrawAmountExceedsLimit(Amount amount, Amount limit);
|
32
34
|
|
@@ -61,7 +63,7 @@ interface IDistributionService is IService {
|
|
61
63
|
|
62
64
|
function changeDistributorType(
|
63
65
|
NftId distributorNftId,
|
64
|
-
DistributorType
|
66
|
+
DistributorType distributorType,
|
65
67
|
bytes memory data
|
66
68
|
) external;
|
67
69
|
|
@@ -18,7 +18,7 @@ interface IInstance is
|
|
18
18
|
IRegisterable
|
19
19
|
{
|
20
20
|
error ErrorInstanceInstanceAdminZero();
|
21
|
-
error ErrorInstanceInstanceAdminAlreadySet(address
|
21
|
+
error ErrorInstanceInstanceAdminAlreadySet(address InstanceAdmin);
|
22
22
|
error ErrorInstanceInstanceAdminAuthorityMismatch(address instanceAuthority);
|
23
23
|
|
24
24
|
error ErrorInstanceBundleSetAlreadySet(address instanceBundleSet);
|
@@ -38,59 +38,24 @@ interface IInstance is
|
|
38
38
|
uint64 requestsCount;
|
39
39
|
}
|
40
40
|
|
41
|
-
///--- instance ---------------------------------------------------------//
|
42
|
-
|
43
|
-
/// @dev Locks/unlocks the complete instance, including all its components.
|
44
|
-
function setInstanceLocked(bool locked) external;
|
45
|
-
|
46
|
-
/// @dev Upgrades the instance reader to the specified target.
|
47
|
-
function upgradeInstanceReader() external;
|
48
|
-
|
49
|
-
/// @dev Sets the instance reader for the instance.
|
50
|
-
/// Permissioned: only the instance service may call this function.
|
51
|
-
function setInstanceReader(InstanceReader instanceReader) external;
|
52
|
-
|
53
|
-
///--- staking ----------------------------------------------------------//
|
54
|
-
|
55
|
-
/// @dev Sets the duration for locking new stakes on this instance..
|
56
|
-
function setStakingLockingPeriod(Seconds stakeLockingPeriod) external;
|
57
|
-
|
58
|
-
/// @dev Sets the staking reward rate [apr] for this instance.
|
59
|
-
function setStakingRewardRate(UFixed rewardRate) external;
|
60
|
-
|
61
|
-
/// @dev Sets the maximum staked amount for this instance.
|
62
|
-
function setStakingMaxAmount(Amount maxStakedAmount) external;
|
63
|
-
|
64
|
-
/// @dev Refills the staking reward reserves for the specified target.
|
65
|
-
function refillStakingRewardReserves(Amount dipAmount) external;
|
66
|
-
|
67
|
-
/// @dev Defunds the staking reward reserves for the specified target.
|
68
|
-
function withdrawStakingRewardReserves(Amount dipAmount) external returns (Amount newBalance);
|
69
|
-
|
70
|
-
///--- product/component ------------------------------------------------//
|
71
|
-
|
72
|
-
/// @dev Locks/unlocks the specified target.
|
73
|
-
function setTargetLocked(address target, bool locked) external;
|
74
|
-
|
75
41
|
/// @dev Register a product with the instance.
|
76
42
|
function registerProduct(address product) external returns (NftId productNftId);
|
77
43
|
|
78
|
-
///--- authz ------------------------------------------------------------//
|
79
|
-
|
80
44
|
function createRole(string memory roleName, string memory adminName) external returns (RoleId roleId, RoleId admin);
|
81
45
|
function grantRole(RoleId roleId, address account) external;
|
82
46
|
function revokeRole(RoleId roleId, address account) external;
|
83
47
|
|
84
48
|
function createTarget(address target, string memory name) external;
|
85
49
|
function setTargetFunctionRole(string memory targetName, bytes4[] calldata selectors, RoleId roleId) external;
|
50
|
+
function setLocked(address target, bool locked) external;
|
86
51
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
function isInstanceLocked() external view returns (bool isLocked);
|
52
|
+
function setStakingLockingPeriod(Seconds stakeLockingPeriod) external;
|
53
|
+
function setStakingRewardRate(UFixed rewardRate) external;
|
54
|
+
function refillStakingRewardReserves(Amount dipAmount) external;
|
91
55
|
|
92
|
-
/// @dev
|
93
|
-
|
56
|
+
/// @dev Defunds the staking reward reserves for the specified target.
|
57
|
+
/// Permissioned: only the target owner may call this function.
|
58
|
+
function withdrawStakingRewardReserves(Amount dipAmount) external returns (Amount newBalance);
|
94
59
|
|
95
60
|
// get products
|
96
61
|
function products() external view returns (uint256 productCount);
|
@@ -15,7 +15,7 @@ interface IInstanceService is IService {
|
|
15
15
|
// onlyInstance
|
16
16
|
error ErrorInstanceServiceNotRegistered(address instance);
|
17
17
|
error ErrorInstanceServiceNotInstance(address instance, ObjectType objectType);
|
18
|
-
error ErrorInstanceServiceInstanceVersionMismatch(
|
18
|
+
error ErrorInstanceServiceInstanceVersionMismatch(address instance, VersionPart instanceVersion);
|
19
19
|
|
20
20
|
error ErrorInstanceServiceComponentNotInstanceLinked(address component);
|
21
21
|
|
@@ -53,17 +53,6 @@ interface IInstanceService is IService {
|
|
53
53
|
|
54
54
|
event LogInstanceCloned(NftId instanceNftId, address instance);
|
55
55
|
|
56
|
-
/// @dev Locks the complete instance, including all its components.
|
57
|
-
function setInstanceLocked(bool locked) external;
|
58
|
-
|
59
|
-
/// @dev Locks/unlocks the specified target constrolled by the corresponding instance admin.
|
60
|
-
function setTargetLocked(address target, bool locked) external;
|
61
|
-
|
62
|
-
/// @dev Creates a new instance.
|
63
|
-
/// The caller becomes the owner of the new instance.
|
64
|
-
/// Creation of a new instance is achieved by this service through the creation and registration
|
65
|
-
/// of a new clone of the master instance and then setting up the initial wiring and authorization
|
66
|
-
/// of the necessary components.
|
67
56
|
function createInstance()
|
68
57
|
external
|
69
58
|
returns (
|
@@ -71,12 +60,11 @@ interface IInstanceService is IService {
|
|
71
60
|
NftId instanceNftId
|
72
61
|
);
|
73
62
|
|
74
|
-
function upgradeInstanceReader() external;
|
63
|
+
function upgradeInstanceReader(NftId instanceNftId) external;
|
75
64
|
function upgradeMasterInstanceReader(address instanceReaderAddress) external;
|
76
65
|
|
77
66
|
function setStakingLockingPeriod(Seconds stakeLockingPeriod) external;
|
78
67
|
function setStakingRewardRate(UFixed rewardRate) external;
|
79
|
-
function setStakingMaxAmount(Amount maxStakedAmount) external;
|
80
68
|
function refillStakingRewardReserves(address rewardProvider, Amount dipAmount) external;
|
81
69
|
|
82
70
|
/// @dev Defunds the staking reward reserves for the specified target.
|
@@ -1,24 +1,22 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IInstance} from "./IInstance.sol";
|
5
|
-
import {IComponentService} from "../shared/IComponentService.sol";
|
6
|
-
import {IInstanceService} from "./IInstanceService.sol";
|
7
|
-
import {IRegistry} from "../registry/IRegistry.sol";
|
8
|
-
|
9
4
|
import {Amount} from "../type/Amount.sol";
|
10
5
|
import {BundleSet} from "./BundleSet.sol";
|
11
6
|
import {RiskSet} from "./RiskSet.sol";
|
12
7
|
import {COMPONENT, INSTANCE} from "../type/ObjectType.sol";
|
8
|
+
import {IInstance} from "./IInstance.sol";
|
9
|
+
import {IComponentService} from "../shared/IComponentService.sol";
|
10
|
+
import {IInstanceService} from "./IInstanceService.sol";
|
13
11
|
import {InstanceReader} from "./InstanceReader.sol";
|
14
12
|
import {InstanceAdmin} from "./InstanceAdmin.sol";
|
15
13
|
import {InstanceStore} from "./InstanceStore.sol";
|
14
|
+
import {IRegistry} from "../registry/IRegistry.sol";
|
16
15
|
import {NftId} from "../type/NftId.sol";
|
17
16
|
import {Registerable} from "../shared/Registerable.sol";
|
18
17
|
import {RoleId} from "../type/RoleId.sol";
|
19
18
|
import {Seconds} from "../type/Seconds.sol";
|
20
19
|
import {UFixed} from "../type/UFixed.sol";
|
21
|
-
import {VersionPart} from "../type/Version.sol";
|
22
20
|
|
23
21
|
contract Instance is
|
24
22
|
IInstance,
|
@@ -50,7 +48,6 @@ contract Instance is
|
|
50
48
|
RiskSet riskSet,
|
51
49
|
InstanceReader instanceReader,
|
52
50
|
IRegistry registry,
|
53
|
-
VersionPart release,
|
54
51
|
address initialOwner
|
55
52
|
)
|
56
53
|
external
|
@@ -87,40 +84,20 @@ contract Instance is
|
|
87
84
|
_componentService = IComponentService(
|
88
85
|
getRegistry().getServiceAddress(
|
89
86
|
COMPONENT(),
|
90
|
-
|
87
|
+
getRelease()));
|
91
88
|
|
92
89
|
_instanceService = IInstanceService(
|
93
90
|
getRegistry().getServiceAddress(
|
94
91
|
INSTANCE(),
|
95
|
-
|
92
|
+
getRelease()));
|
96
93
|
|
97
94
|
_registerInterface(type(IInstance).interfaceId);
|
98
95
|
}
|
99
96
|
|
100
|
-
|
101
|
-
function setInstanceLocked(bool locked)
|
102
|
-
external
|
103
|
-
// not restricted(): need to be able to unlock a locked instance
|
104
|
-
onlyOwner()
|
105
|
-
{
|
106
|
-
_instanceService.setInstanceLocked(locked);
|
107
|
-
}
|
108
|
-
|
109
|
-
|
110
|
-
function upgradeInstanceReader()
|
111
|
-
external
|
112
|
-
restricted()
|
113
|
-
onlyOwner()
|
114
|
-
{
|
115
|
-
_instanceService.upgradeInstanceReader();
|
116
|
-
}
|
117
|
-
|
118
|
-
|
119
97
|
//--- ProductRegistration ----------------------------------------------//
|
120
98
|
|
121
99
|
function registerProduct(address product)
|
122
100
|
external
|
123
|
-
restricted()
|
124
101
|
onlyOwner()
|
125
102
|
returns (NftId productNftId)
|
126
103
|
{
|
@@ -132,7 +109,6 @@ contract Instance is
|
|
132
109
|
|
133
110
|
function setStakingLockingPeriod(Seconds stakeLockingPeriod)
|
134
111
|
external
|
135
|
-
restricted()
|
136
112
|
onlyOwner()
|
137
113
|
{
|
138
114
|
_instanceService.setStakingLockingPeriod(stakeLockingPeriod);
|
@@ -140,22 +116,13 @@ contract Instance is
|
|
140
116
|
|
141
117
|
function setStakingRewardRate(UFixed rewardRate)
|
142
118
|
external
|
143
|
-
restricted()
|
144
119
|
onlyOwner()
|
145
120
|
{
|
146
121
|
_instanceService.setStakingRewardRate(rewardRate);
|
147
122
|
}
|
148
123
|
|
149
|
-
function setStakingMaxAmount(Amount maxStakedAmount)
|
150
|
-
external
|
151
|
-
onlyOwner()
|
152
|
-
{
|
153
|
-
_instanceService.setStakingMaxAmount(maxStakedAmount);
|
154
|
-
}
|
155
|
-
|
156
124
|
function refillStakingRewardReserves(Amount dipAmount)
|
157
125
|
external
|
158
|
-
restricted()
|
159
126
|
onlyOwner()
|
160
127
|
{
|
161
128
|
address instanceOwner = msg.sender;
|
@@ -164,7 +131,6 @@ contract Instance is
|
|
164
131
|
|
165
132
|
function withdrawStakingRewardReserves(Amount dipAmount)
|
166
133
|
external
|
167
|
-
restricted()
|
168
134
|
onlyOwner()
|
169
135
|
returns (Amount newBalance)
|
170
136
|
{
|
@@ -175,7 +141,6 @@ contract Instance is
|
|
175
141
|
|
176
142
|
function createRole(string memory roleName, string memory adminName)
|
177
143
|
external
|
178
|
-
restricted()
|
179
144
|
onlyOwner()
|
180
145
|
returns (RoleId roleId, RoleId admin)
|
181
146
|
{
|
@@ -185,7 +150,6 @@ contract Instance is
|
|
185
150
|
|
186
151
|
function grantRole(RoleId roleId, address account)
|
187
152
|
external
|
188
|
-
restricted()
|
189
153
|
onlyOwner()
|
190
154
|
{
|
191
155
|
_instanceAdmin.grantRole(roleId, account);
|
@@ -193,7 +157,6 @@ contract Instance is
|
|
193
157
|
|
194
158
|
function revokeRole(RoleId roleId, address account)
|
195
159
|
external
|
196
|
-
restricted()
|
197
160
|
onlyOwner()
|
198
161
|
{
|
199
162
|
// TODO refactor
|
@@ -202,18 +165,8 @@ contract Instance is
|
|
202
165
|
|
203
166
|
//--- Targets ------------------------------------------------------------//
|
204
167
|
|
205
|
-
|
206
|
-
function setTargetLocked(address target, bool locked)
|
207
|
-
external
|
208
|
-
// not restricted(): instance owner may need to be able to unlock targets on an locked instance
|
209
|
-
onlyOwner()
|
210
|
-
{
|
211
|
-
_instanceService.setTargetLocked(target, locked);
|
212
|
-
}
|
213
|
-
|
214
168
|
function createTarget(address target, string memory name)
|
215
169
|
external
|
216
|
-
restricted()
|
217
170
|
onlyOwner()
|
218
171
|
{
|
219
172
|
// TODO refactor
|
@@ -226,13 +179,19 @@ contract Instance is
|
|
226
179
|
RoleId roleId
|
227
180
|
)
|
228
181
|
external
|
229
|
-
restricted()
|
230
182
|
onlyOwner()
|
231
183
|
{
|
232
184
|
// TODO refactor
|
233
185
|
// _instanceAdmin.setTargetFunctionRoleByInstance(targetName, selectors, roleId);
|
234
186
|
}
|
235
187
|
|
188
|
+
function setLocked(address target, bool locked)
|
189
|
+
external
|
190
|
+
onlyOwner()
|
191
|
+
{
|
192
|
+
_componentService.setLockedFromInstance(target, locked);
|
193
|
+
}
|
194
|
+
|
236
195
|
//--- ITransferInterceptor ----------------------------------------------//
|
237
196
|
|
238
197
|
function nftTransferFrom(address from, address to, uint256 tokenId, address operator) external onlyChainNft {
|
@@ -256,14 +215,6 @@ contract Instance is
|
|
256
215
|
|
257
216
|
//--- external view functions -------------------------------------------//
|
258
217
|
|
259
|
-
function isInstanceLocked() external view returns (bool) {
|
260
|
-
return _instanceAdmin.isLocked();
|
261
|
-
}
|
262
|
-
|
263
|
-
function isTargetLocked(address target) external view returns (bool) {
|
264
|
-
return _instanceAdmin.isTargetLocked(target);
|
265
|
-
}
|
266
|
-
|
267
218
|
function products() external view returns (uint256 productCount) {
|
268
219
|
return _products.length;
|
269
220
|
}
|