@etherisc/gif-next 0.0.2-4be7d72-071 → 0.0.2-4c19d89-776
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/IAccessManagedChecker.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- 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/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- 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/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +2 -2
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +2 -2
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +2 -2
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +2 -2
- 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/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 +2 -2
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +42 -50
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +35 -29
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +2 -2
- 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/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +2 -2
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +2 -2
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +2 -2
- 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/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +1 -1
- 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 +2 -2
- 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 +2 -2
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +2 -2
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +2 -2
- 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 +2 -2
- 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 +2 -2
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +2 -2
- 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 +2 -2
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +2 -2
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +2 -2
- 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/IRiskService.sol/IRiskService.json +10 -4
- 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 +2 -2
- 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 +50 -28
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +21 -13
- 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 +2 -2
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +2 -2
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +2 -2
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +2 -2
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +2 -2
- 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 +219 -76
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +42 -30
- 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/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 +136 -17
- 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/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- 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/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
- 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/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +2 -2
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +2 -2
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +2 -2
- 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 +2 -2
- 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/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- 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/Key32Set.sol/LibKey32Set.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +9 -4
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- 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/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/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
- package/contracts/examples/fire/FireProduct.sol +1 -2
- package/contracts/examples/unpermissioned/SimpleProduct.sol +4 -4
- package/contracts/product/IRiskService.sol +5 -8
- package/contracts/product/Product.sol +6 -15
- package/contracts/product/RiskService.sol +6 -7
- package/contracts/shared/ComponentService.sol +176 -114
- package/contracts/shared/IComponentService.sol +14 -5
- package/contracts/type/RiskId.sol +4 -3
- package/package.json +2 -2
|
@@ -42,6 +42,31 @@ contract ComponentService is
|
|
|
42
42
|
IRegistryService private _registryService;
|
|
43
43
|
IInstanceService private _instanceService;
|
|
44
44
|
|
|
45
|
+
modifier onlyComponent(address component) {
|
|
46
|
+
_checkSupportsInterface(component);
|
|
47
|
+
_;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
modifier onlyInstance() {
|
|
51
|
+
NftId instanceNftId = getRegistry().getNftIdForAddress(msg.sender);
|
|
52
|
+
if (instanceNftId.eqz()) {
|
|
53
|
+
revert ErrorComponentServiceNotRegistered(msg.sender);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
ObjectType objectType = getRegistry().getObjectInfo(instanceNftId).objectType;
|
|
57
|
+
if (objectType != INSTANCE()) {
|
|
58
|
+
revert ErrorComponentServiceNotInstance(msg.sender, objectType);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
VersionPart instanceVersion = IInstance(msg.sender).getRelease();
|
|
62
|
+
if (instanceVersion != getVersion().toMajorPart()) {
|
|
63
|
+
revert ErrorComponentServiceInstanceVersionMismatch(msg.sender, instanceVersion);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
_;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
|
|
45
70
|
function _initialize(
|
|
46
71
|
address owner,
|
|
47
72
|
bytes memory data
|
|
@@ -66,38 +91,28 @@ contract ComponentService is
|
|
|
66
91
|
|
|
67
92
|
//-------- component ----------------------------------------------------//
|
|
68
93
|
|
|
69
|
-
|
|
70
|
-
function registerComponent(address componentAddress)
|
|
94
|
+
function registerComponent(address component)
|
|
71
95
|
external
|
|
72
96
|
virtual
|
|
97
|
+
onlyComponent(component)
|
|
73
98
|
returns (NftId componentNftId)
|
|
74
99
|
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
(
|
|
78
|
-
IInstanceLinkedComponent component,
|
|
79
|
-
IRegistry.ObjectInfo memory componentInfo // initial component info
|
|
80
|
-
) = _getAndVerifyRegisterableComponent(
|
|
81
|
-
componentAddress,
|
|
82
|
-
productNftId);
|
|
83
|
-
ObjectType componentType = componentInfo.objectType;
|
|
84
|
-
|
|
100
|
+
// type specific registration
|
|
101
|
+
ObjectType componentType = IInstanceLinkedComponent(component).getInitialInfo().objectType;
|
|
85
102
|
if (componentType == POOL()) {
|
|
86
|
-
|
|
87
|
-
return _registerPool(instance, productNftId, pool, componentInfo);
|
|
103
|
+
return _registerPool(component);
|
|
88
104
|
}
|
|
89
105
|
if (componentType == DISTRIBUTION()) {
|
|
90
|
-
return _registerDistribution(
|
|
106
|
+
return _registerDistribution(component);
|
|
91
107
|
}
|
|
92
108
|
if (componentType == ORACLE()) {
|
|
93
|
-
return _registerOracle(
|
|
109
|
+
return _registerOracle(component);
|
|
94
110
|
}
|
|
95
111
|
|
|
96
112
|
// fail
|
|
97
|
-
revert
|
|
113
|
+
revert ErrorComponentServiceTypeNotSupported(component, componentType);
|
|
98
114
|
}
|
|
99
115
|
|
|
100
|
-
/// @inheritdoc IComponentService
|
|
101
116
|
function approveTokenHandler(
|
|
102
117
|
IERC20Metadata token,
|
|
103
118
|
Amount amount
|
|
@@ -132,10 +147,10 @@ contract ComponentService is
|
|
|
132
147
|
function setLockedFromInstance(address componentAddress, bool locked)
|
|
133
148
|
external
|
|
134
149
|
virtual
|
|
150
|
+
onlyInstance()
|
|
135
151
|
{
|
|
136
|
-
// TODO instance verification
|
|
137
|
-
//(NftId instanceNftId,, IInstance instance) = _getAndVerifyCallingInstance();
|
|
138
152
|
address instanceAddress = msg.sender;
|
|
153
|
+
// NftId instanceNftId = getRegistry().getNftIdForAddress(msg.sender);
|
|
139
154
|
IInstance instance = IInstance(instanceAddress);
|
|
140
155
|
_setLocked(instance.getInstanceAdmin(), componentAddress, locked);
|
|
141
156
|
}
|
|
@@ -144,6 +159,7 @@ contract ComponentService is
|
|
|
144
159
|
function setLockedFromComponent(address componentAddress, bool locked)
|
|
145
160
|
external
|
|
146
161
|
virtual
|
|
162
|
+
onlyComponent(msg.sender)
|
|
147
163
|
{
|
|
148
164
|
(, IInstance instance) = _getAndVerifyComponent(COMPONENT(), false);
|
|
149
165
|
_setLocked(instance.getInstanceAdmin(), componentAddress, locked);
|
|
@@ -182,7 +198,6 @@ contract ComponentService is
|
|
|
182
198
|
componentNftId,
|
|
183
199
|
withdrawnAmount);
|
|
184
200
|
|
|
185
|
-
// transfer amount to component owner
|
|
186
201
|
address componentOwner = getRegistry().ownerOf(componentNftId);
|
|
187
202
|
TokenHandler tokenHandler = instanceReader.getTokenHandler(componentNftId);
|
|
188
203
|
emit LogComponentServiceComponentFeesWithdrawn(
|
|
@@ -205,32 +220,19 @@ contract ComponentService is
|
|
|
205
220
|
external
|
|
206
221
|
virtual
|
|
207
222
|
nonReentrant()
|
|
223
|
+
onlyComponent(productAddress)
|
|
208
224
|
returns (NftId productNftId)
|
|
209
225
|
{
|
|
210
|
-
//
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
(
|
|
216
|
-
,
|
|
217
|
-
IRegistry.ObjectInfo memory productInfo // initial product info
|
|
218
|
-
) = _getAndVerifyRegisterableComponent(
|
|
226
|
+
// register/create component setup
|
|
227
|
+
InstanceAdmin instanceAdmin;
|
|
228
|
+
InstanceStore instanceStore;
|
|
229
|
+
(, instanceAdmin, instanceStore,, productNftId) = _register(
|
|
219
230
|
productAddress,
|
|
220
|
-
|
|
231
|
+
PRODUCT());
|
|
221
232
|
|
|
222
|
-
|
|
223
|
-
revert ErrorComponentServiceComponentTypeNotSupported(productAddress, productInfo.objectType);
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
InstanceAdmin instanceAdmin = instance.getInstanceAdmin();
|
|
227
|
-
InstanceStore instanceStore = instance.getInstanceStore();
|
|
228
|
-
|
|
229
|
-
// register/create component info
|
|
233
|
+
// get product
|
|
230
234
|
IProductComponent product = IProductComponent(productAddress);
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
// create product in instance instanceStore
|
|
235
|
+
|
|
234
236
|
IComponents.ProductInfo memory initialProductInfo = product.getInitialProductInfo();
|
|
235
237
|
// force initialization of linked components with empty values to
|
|
236
238
|
// ensure no components are linked upon initialization of the product
|
|
@@ -284,26 +286,23 @@ contract ComponentService is
|
|
|
284
286
|
//-------- distribution -------------------------------------------------//
|
|
285
287
|
|
|
286
288
|
/// @dev registers the sending component as a distribution component
|
|
287
|
-
function _registerDistribution(
|
|
288
|
-
IInstance instance,
|
|
289
|
-
NftId productNftId,
|
|
290
|
-
IInstanceLinkedComponent distribution,
|
|
291
|
-
IRegistry.ObjectInfo memory info
|
|
292
|
-
)
|
|
289
|
+
function _registerDistribution(address distributioAddress)
|
|
293
290
|
internal
|
|
294
291
|
virtual
|
|
295
292
|
nonReentrant()
|
|
296
293
|
returns (NftId distributionNftId)
|
|
297
294
|
{
|
|
298
|
-
InstanceReader reader = instance.getInstanceReader();
|
|
299
|
-
InstanceAdmin instanceAdmin = instance.getInstanceAdmin();
|
|
300
|
-
InstanceStore instanceStore = instance.getInstanceStore();
|
|
301
|
-
|
|
302
295
|
// register/create component info
|
|
303
|
-
|
|
296
|
+
InstanceReader instanceReader;
|
|
297
|
+
InstanceAdmin instanceAdmin;
|
|
298
|
+
InstanceStore instanceStore;
|
|
299
|
+
NftId productNftId;
|
|
300
|
+
(instanceReader, instanceAdmin, instanceStore, productNftId, distributionNftId) = _register(
|
|
301
|
+
distributioAddress,
|
|
302
|
+
DISTRIBUTION());
|
|
304
303
|
|
|
305
304
|
// check product is still expecting a distribution registration
|
|
306
|
-
IComponents.ProductInfo memory productInfo =
|
|
305
|
+
IComponents.ProductInfo memory productInfo = instanceReader.getProductInfo(productNftId);
|
|
307
306
|
if (!productInfo.hasDistribution) {
|
|
308
307
|
revert ErrorProductServiceNoDistributionExpected(productNftId);
|
|
309
308
|
}
|
|
@@ -351,25 +350,23 @@ contract ComponentService is
|
|
|
351
350
|
|
|
352
351
|
//-------- oracle -------------------------------------------------------//
|
|
353
352
|
|
|
354
|
-
function _registerOracle(
|
|
355
|
-
IInstance instance,
|
|
356
|
-
NftId productNftId,
|
|
357
|
-
IInstanceLinkedComponent oracle,
|
|
358
|
-
IRegistry.ObjectInfo memory info
|
|
359
|
-
)
|
|
353
|
+
function _registerOracle(address oracleAddress)
|
|
360
354
|
internal
|
|
361
355
|
virtual
|
|
362
356
|
returns (NftId oracleNftId)
|
|
363
357
|
{
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
358
|
+
// register/create component setup
|
|
359
|
+
InstanceReader instanceReader;
|
|
360
|
+
InstanceAdmin instanceAdmin;
|
|
361
|
+
InstanceStore instanceStore;
|
|
362
|
+
NftId productNftId;
|
|
367
363
|
|
|
368
|
-
|
|
369
|
-
|
|
364
|
+
(instanceReader, instanceAdmin, instanceStore, productNftId, oracleNftId) = _register(
|
|
365
|
+
oracleAddress,
|
|
366
|
+
ORACLE());
|
|
370
367
|
|
|
371
368
|
// check product is still expecting an oracle registration
|
|
372
|
-
IComponents.ProductInfo memory productInfo =
|
|
369
|
+
IComponents.ProductInfo memory productInfo = instanceReader.getProductInfo(productNftId);
|
|
373
370
|
if (productInfo.expectedNumberOfOracles == 0) {
|
|
374
371
|
revert ErrorProductServiceNoOraclesExpected(productNftId);
|
|
375
372
|
}
|
|
@@ -385,30 +382,29 @@ contract ComponentService is
|
|
|
385
382
|
|
|
386
383
|
//-------- pool ---------------------------------------------------------//
|
|
387
384
|
|
|
388
|
-
function _registerPool(
|
|
389
|
-
IInstance instance,
|
|
390
|
-
NftId productNftId,
|
|
391
|
-
IPoolComponent pool,
|
|
392
|
-
IRegistry.ObjectInfo memory info
|
|
393
|
-
)
|
|
385
|
+
function _registerPool(address poolAddress)
|
|
394
386
|
internal
|
|
395
387
|
virtual
|
|
396
388
|
returns (NftId poolNftId)
|
|
397
389
|
{
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
390
|
+
// register/create component setup
|
|
391
|
+
InstanceReader instanceReader;
|
|
392
|
+
InstanceAdmin instanceAdmin;
|
|
393
|
+
InstanceStore instanceStore;
|
|
394
|
+
NftId productNftId;
|
|
401
395
|
|
|
402
|
-
|
|
403
|
-
|
|
396
|
+
(instanceReader, instanceAdmin, instanceStore, productNftId, poolNftId) = _register(
|
|
397
|
+
poolAddress,
|
|
398
|
+
POOL());
|
|
404
399
|
|
|
405
400
|
// check product is still expecting a pool registration
|
|
406
|
-
IComponents.ProductInfo memory productInfo =
|
|
401
|
+
IComponents.ProductInfo memory productInfo = instanceReader.getProductInfo(productNftId);
|
|
407
402
|
if (productInfo.poolNftId.gtz()) {
|
|
408
403
|
revert ErrorProductServicePoolAlreadyRegistered(productNftId, productInfo.poolNftId);
|
|
409
404
|
}
|
|
410
405
|
|
|
411
406
|
// create info
|
|
407
|
+
IPoolComponent pool = IPoolComponent(poolAddress);
|
|
412
408
|
instanceStore.createPool(
|
|
413
409
|
poolNftId,
|
|
414
410
|
pool.getInitialPoolInfo());
|
|
@@ -462,23 +458,50 @@ contract ComponentService is
|
|
|
462
458
|
|
|
463
459
|
/// @dev Registers the component represented by the provided address.
|
|
464
460
|
function _register(
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
IInstanceLinkedComponent component,
|
|
468
|
-
IRegistry.ObjectInfo memory info
|
|
461
|
+
address componentAddress, // address of component to register
|
|
462
|
+
ObjectType requiredType // required type for component for registration
|
|
469
463
|
)
|
|
470
464
|
internal
|
|
471
465
|
virtual
|
|
472
|
-
returns (
|
|
466
|
+
returns (
|
|
467
|
+
InstanceReader instanceReader,
|
|
468
|
+
InstanceAdmin instanceAdmin,
|
|
469
|
+
InstanceStore instanceStore,
|
|
470
|
+
NftId parentNftId,
|
|
471
|
+
NftId componentNftId
|
|
472
|
+
)
|
|
473
473
|
{
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
474
|
+
NftId instanceNftId;
|
|
475
|
+
IInstance instance;
|
|
476
|
+
IInstanceLinkedComponent component;
|
|
477
|
+
address initialOwner;
|
|
478
|
+
|
|
479
|
+
(
|
|
480
|
+
instanceNftId,
|
|
481
|
+
instance,
|
|
482
|
+
parentNftId,
|
|
483
|
+
component,
|
|
484
|
+
initialOwner
|
|
485
|
+
) = _getAndVerifyRegisterableComponent(
|
|
486
|
+
getRegistry(),
|
|
487
|
+
componentAddress,
|
|
488
|
+
requiredType);
|
|
489
|
+
|
|
490
|
+
// get instance supporting contracts (as function return values)
|
|
491
|
+
instanceReader = instance.getInstanceReader();
|
|
492
|
+
instanceAdmin = instance.getInstanceAdmin();
|
|
493
|
+
instanceStore = instance.getInstanceStore();
|
|
494
|
+
|
|
495
|
+
// register with registry
|
|
496
|
+
if (requiredType == PRODUCT()) {
|
|
497
|
+
componentNftId = _registryService.registerProduct(
|
|
498
|
+
component, initialOwner).nftId;
|
|
499
|
+
} else {
|
|
500
|
+
componentNftId = _registryService.registerProductLinkedComponent(
|
|
501
|
+
component, requiredType, initialOwner).nftId;
|
|
502
|
+
}
|
|
479
503
|
|
|
480
504
|
// deploy and wire token handler
|
|
481
|
-
// TODO deploy token handler in instance contract ?!
|
|
482
505
|
IComponents.ComponentInfo memory componentInfo = component.getInitialComponentInfo();
|
|
483
506
|
IERC20Metadata token = componentInfo.token;
|
|
484
507
|
componentInfo.tokenHandler = TokenHandlerDeployerLib.deployTokenHandler(
|
|
@@ -498,12 +521,7 @@ contract ComponentService is
|
|
|
498
521
|
// authorize
|
|
499
522
|
instanceAdmin.initializeComponentAuthorization(component);
|
|
500
523
|
|
|
501
|
-
emit LogComponentServiceRegistered(
|
|
502
|
-
componentNftId,
|
|
503
|
-
info.objectType,
|
|
504
|
-
address(component),
|
|
505
|
-
address(token),
|
|
506
|
-
info.initialOwner);
|
|
524
|
+
emit LogComponentServiceRegistered(instanceNftId, componentNftId, requiredType, address(component), address(token), initialOwner);
|
|
507
525
|
}
|
|
508
526
|
|
|
509
527
|
|
|
@@ -537,47 +555,85 @@ contract ComponentService is
|
|
|
537
555
|
info = instanceReader.getFeeInfo(productNftId);
|
|
538
556
|
}
|
|
539
557
|
|
|
558
|
+
|
|
540
559
|
/// @dev Based on the provided component address required type the component
|
|
541
560
|
/// and related instance contract this function reverts iff:
|
|
561
|
+
/// - the sender is not registered
|
|
542
562
|
/// - the component contract does not support IInstanceLinkedComponent
|
|
543
|
-
/// - the component
|
|
544
|
-
/// - the component version does not match with the service release
|
|
563
|
+
/// - the component type does not match with the required type
|
|
545
564
|
/// - the component has already been registered
|
|
546
565
|
function _getAndVerifyRegisterableComponent(
|
|
566
|
+
IRegistry registry,
|
|
547
567
|
address componentAddress,
|
|
548
|
-
|
|
568
|
+
ObjectType requiredType
|
|
549
569
|
)
|
|
550
570
|
internal
|
|
551
571
|
view
|
|
552
572
|
returns (
|
|
573
|
+
NftId instanceNftId,
|
|
574
|
+
IInstance instance,
|
|
575
|
+
NftId parentNftId,
|
|
553
576
|
IInstanceLinkedComponent component,
|
|
554
|
-
|
|
577
|
+
address initialOwner
|
|
555
578
|
)
|
|
556
579
|
{
|
|
557
|
-
// check
|
|
558
|
-
|
|
559
|
-
|
|
580
|
+
// check sender (instance or product) is registered
|
|
581
|
+
IRegistry.ObjectInfo memory senderInfo = registry.getObjectInfo(msg.sender);
|
|
582
|
+
if (senderInfo.nftId.eqz()) {
|
|
583
|
+
revert ErrorComponentServiceSenderNotRegistered(msg.sender);
|
|
560
584
|
}
|
|
561
585
|
|
|
586
|
+
// the sender is the parent of the component to be registered
|
|
587
|
+
// an instance caller wanting to register a product - or -
|
|
588
|
+
// a product caller wantint go register a distribution, oracle or pool
|
|
589
|
+
parentNftId = senderInfo.nftId;
|
|
590
|
+
|
|
591
|
+
// check component is of required type
|
|
562
592
|
component = IInstanceLinkedComponent(componentAddress);
|
|
563
|
-
info = component.getInitialInfo();
|
|
593
|
+
IRegistry.ObjectInfo memory info = component.getInitialInfo();
|
|
594
|
+
if(info.objectType != requiredType) {
|
|
595
|
+
revert ErrorComponentServiceInvalidType(componentAddress, requiredType, info.objectType);
|
|
596
|
+
}
|
|
564
597
|
|
|
565
|
-
// check component
|
|
566
|
-
if(
|
|
567
|
-
revert
|
|
598
|
+
// check component has not already been registered
|
|
599
|
+
if (getRegistry().getNftIdForAddress(componentAddress).gtz()) {
|
|
600
|
+
revert ErrorComponentServiceAlreadyRegistered(componentAddress);
|
|
568
601
|
}
|
|
569
602
|
|
|
570
|
-
//
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
603
|
+
// component release matches servie release
|
|
604
|
+
address parentAddress = registry.getObjectAddress(parentNftId);
|
|
605
|
+
if (component.getRelease() != getRelease()) {
|
|
606
|
+
revert ErrorComponentServiceReleaseMismatch(componentAddress, component.getRelease(), getRelease());
|
|
607
|
+
// component release matches parent release
|
|
608
|
+
} else if (component.getRelease() != IRegisterable(parentAddress).getRelease()){
|
|
609
|
+
revert ErrorComponentServiceReleaseMismatch(componentAddress, component.getRelease(), IRegisterable(parentAddress).getRelease());
|
|
575
610
|
}
|
|
576
611
|
|
|
577
|
-
// check component
|
|
578
|
-
|
|
579
|
-
|
|
612
|
+
// check component belongs to same product cluster
|
|
613
|
+
// parent of product must be instance, parent of other componet types must be product
|
|
614
|
+
if (info.parentNftId != senderInfo.nftId) {
|
|
615
|
+
revert ErrorComponentServiceSenderNotComponentParent(senderInfo.nftId, info.parentNftId);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
// verify parent is registered instance
|
|
619
|
+
if (requiredType == PRODUCT()) {
|
|
620
|
+
if (senderInfo.objectType != INSTANCE()) {
|
|
621
|
+
revert ErrorComponentServiceParentNotInstance(senderInfo.nftId, senderInfo.objectType);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
instanceNftId = senderInfo.nftId;
|
|
625
|
+
// verify parent is registered product
|
|
626
|
+
} else {
|
|
627
|
+
if (senderInfo.objectType != PRODUCT()) {
|
|
628
|
+
revert ErrorComponentServiceParentNotProduct(senderInfo.nftId, senderInfo.objectType);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
instanceNftId = senderInfo.parentNftId;
|
|
580
632
|
}
|
|
633
|
+
|
|
634
|
+
// get initial owner and instance
|
|
635
|
+
initialOwner = info.initialOwner;
|
|
636
|
+
instance = IInstance(registry.getObjectAddress(instanceNftId));
|
|
581
637
|
}
|
|
582
638
|
|
|
583
639
|
function _setLocked(InstanceAdmin instanceAdmin, address componentAddress, bool locked) internal {
|
|
@@ -627,4 +683,10 @@ contract ComponentService is
|
|
|
627
683
|
function _getDomain() internal pure virtual override returns(ObjectType) {
|
|
628
684
|
return COMPONENT();
|
|
629
685
|
}
|
|
686
|
+
|
|
687
|
+
function _checkSupportsInterface(address component) internal view {
|
|
688
|
+
if (!ContractLib.supportsInterface(component, type(IInstanceLinkedComponent).interfaceId)) {
|
|
689
|
+
revert ErrorComponentServiceNotInstanceLinkedComponent(component);
|
|
690
|
+
}
|
|
691
|
+
}
|
|
630
692
|
}
|
|
@@ -17,10 +17,19 @@ interface IComponentService is
|
|
|
17
17
|
IService
|
|
18
18
|
{
|
|
19
19
|
error ErrorComponentServiceNotInstanceLinkedComponent(address component);
|
|
20
|
-
error
|
|
21
|
-
error
|
|
22
|
-
error
|
|
23
|
-
error
|
|
20
|
+
error ErrorComponentServiceSenderNotRegistered(address sender);
|
|
21
|
+
error ErrorComponentServiceNotComponent(address component);
|
|
22
|
+
error ErrorComponentServiceTypeNotSupported(address component, ObjectType invalidType);
|
|
23
|
+
error ErrorComponentServiceInvalidType(address component, ObjectType requiredType, ObjectType componentType);
|
|
24
|
+
error ErrorComponentServiceAlreadyRegistered(address component);
|
|
25
|
+
error ErrorComponentServiceReleaseMismatch(address component, VersionPart componentRelease, VersionPart parentRelease);
|
|
26
|
+
error ErrorComponentServiceSenderNotComponentParent(NftId senderNftId, NftId compnentParentNftId);
|
|
27
|
+
error ErrorComponentServiceParentNotInstance(NftId nftId, ObjectType objectType);
|
|
28
|
+
error ErrorComponentServiceParentNotProduct(NftId nftId, ObjectType objectType);
|
|
29
|
+
|
|
30
|
+
error ErrorComponentServiceNotRegistered(address instanceAddress);
|
|
31
|
+
error ErrorComponentServiceNotInstance(address instanceAddress, ObjectType objectType);
|
|
32
|
+
error ErrorComponentServiceInstanceVersionMismatch(address instanceAddress, VersionPart instanceVersion);
|
|
24
33
|
|
|
25
34
|
error ErrorProductServiceNoDistributionExpected(NftId productNftId);
|
|
26
35
|
error ErrorProductServiceDistributionAlreadyRegistered(NftId productNftId, NftId distributionNftId);
|
|
@@ -36,7 +45,7 @@ interface IComponentService is
|
|
|
36
45
|
error ErrorComponentServiceWithdrawAmountExceedsLimit(Amount withdrawnAmount, Amount withdrawLimit);
|
|
37
46
|
error ErrorComponentServiceWalletAllowanceTooSmall(address wallet, address spender, uint256 allowance, uint256 amount);
|
|
38
47
|
|
|
39
|
-
event LogComponentServiceRegistered(NftId componentNftId, ObjectType componentType, address component, address token, address initialOwner);
|
|
48
|
+
event LogComponentServiceRegistered(NftId instanceNftId, NftId componentNftId, ObjectType componentType, address component, address token, address initialOwner);
|
|
40
49
|
event LogComponentServiceWalletAddressChanged(NftId componentNftId, address currentWallet, address newWallet);
|
|
41
50
|
event LogComponentServiceWalletTokensTransferred(NftId componentNftId, address currentWallet, address newWallet, uint256 currentBalance);
|
|
42
51
|
event LogComponentServiceComponentFeesWithdrawn(NftId componentNftId, address recipient, address token, Amount withdrawnAmount);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
pragma solidity ^0.8.20;
|
|
3
3
|
|
|
4
4
|
import {Key32, KeyId, Key32Lib} from "./Key32.sol";
|
|
5
|
+
import {NftId} from "./NftId.sol";
|
|
5
6
|
import {RISK} from "./ObjectType.sol";
|
|
6
7
|
|
|
7
8
|
type RiskId is bytes8;
|
|
@@ -40,9 +41,9 @@ library RiskIdLib {
|
|
|
40
41
|
return uint64(RiskId.unwrap(riskId));
|
|
41
42
|
}
|
|
42
43
|
|
|
43
|
-
// @dev Converts a risk id string into a risk id.
|
|
44
|
-
function toRiskId(
|
|
45
|
-
return RiskId.wrap(bytes8(keccak256(abi.encode(risk))));
|
|
44
|
+
// @dev Converts a risk id string with a product NftId into a risk id.
|
|
45
|
+
function toRiskId(NftId productNftId, bytes32 risk) public pure returns (RiskId) {
|
|
46
|
+
return RiskId.wrap(bytes8(keccak256(abi.encode(productNftId, risk))));
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
/// @dev Returns the key32 value for the specified risk id.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etherisc/gif-next",
|
|
3
|
-
"version": "0.0.2-
|
|
3
|
+
"version": "0.0.2-4c19d89-776",
|
|
4
4
|
"description": "This is the repository for the next version of the Generic Insurance Framework (GIF) smart contracts. ",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@typescript-eslint/parser": "^8.1.0",
|
|
37
37
|
"antlr4ng-cli": "^2.0.0",
|
|
38
38
|
"dotenv": "^16.3.1",
|
|
39
|
-
"eslint": "^
|
|
39
|
+
"eslint": "^9.9.1",
|
|
40
40
|
"hardhat": "^2.17.2",
|
|
41
41
|
"prettier": "^3.0.3",
|
|
42
42
|
"prettier-plugin-solidity": "^1.1.3",
|