@etherisc/gif-next 3.0.0-1b49bd6-565 → 3.0.0-1c2086e-623
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 +9 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +83 -164
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +119 -117
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +46 -91
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +145 -168
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.json +150 -126
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +101 -43
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +55 -31
- 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 +85 -83
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +1 -1
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +42 -18
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +77 -222
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +65 -41
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +59 -168
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +252 -238
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +154 -144
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +58 -180
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +145 -111
- package/artifacts/contracts/examples/crop/AccountingToken.sol/AccountingToken.dbg.json +4 -0
- package/artifacts/contracts/examples/crop/AccountingToken.sol/AccountingToken.json +376 -0
- package/artifacts/contracts/examples/crop/CropPool.sol/CropPool.dbg.json +4 -0
- package/artifacts/contracts/examples/crop/CropPool.sol/CropPool.json +1391 -0
- package/artifacts/contracts/examples/crop/CropPoolAuthorization.sol/CropPoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/crop/CropPoolAuthorization.sol/CropPoolAuthorization.json +844 -0
- package/artifacts/contracts/examples/crop/CropProduct.sol/CropProduct.dbg.json +4 -0
- package/artifacts/contracts/examples/crop/CropProduct.sol/CropProduct.json +2433 -0
- package/artifacts/contracts/examples/crop/CropProductAuthorization.sol/CropProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/crop/CropProductAuthorization.sol/CropProductAuthorization.json +891 -0
- package/artifacts/contracts/examples/crop/Location.sol/LocationLib.dbg.json +4 -0
- package/artifacts/contracts/examples/crop/Location.sol/LocationLib.json +199 -0
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.json +2 -2
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +108 -245
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +65 -41
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +141 -283
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +65 -41
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.json +2 -2
- package/artifacts/contracts/examples/flight/FlightLib.sol/FlightLib.dbg.json +1 -1
- package/artifacts/contracts/examples/flight/FlightLib.sol/FlightLib.json +221 -86
- package/artifacts/contracts/examples/flight/FlightMessageVerifier.sol/FlightMessageVerifier.dbg.json +1 -1
- package/artifacts/contracts/examples/flight/FlightMessageVerifier.sol/FlightMessageVerifier.json +2 -2
- package/artifacts/contracts/examples/flight/FlightNft.sol/FlightNft.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/FlightNft.sol/FlightNft.json +801 -0
- package/artifacts/contracts/examples/flight/FlightOracle.sol/FlightOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/flight/FlightOracle.sol/FlightOracle.json +253 -275
- package/artifacts/contracts/examples/flight/FlightOracleAuthorization.sol/FlightOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/flight/FlightOracleAuthorization.sol/FlightOracleAuthorization.json +112 -41
- package/artifacts/contracts/examples/flight/FlightPool.sol/FlightPool.dbg.json +1 -1
- package/artifacts/contracts/examples/flight/FlightPool.sol/FlightPool.json +112 -249
- package/artifacts/contracts/examples/flight/FlightPoolAuthorization.sol/FlightPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/flight/FlightPoolAuthorization.sol/FlightPoolAuthorization.json +65 -41
- package/artifacts/contracts/examples/flight/FlightProduct.sol/FlightProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/flight/FlightProduct.sol/FlightProduct.json +461 -866
- package/artifacts/contracts/examples/flight/FlightProductAuthorization.sol/FlightProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/flight/FlightProductAuthorization.sol/FlightProductAuthorization.json +113 -42
- package/artifacts/contracts/examples/flight/FlightProductManager.sol/FlightProductManager.dbg.json +4 -0
- package/artifacts/contracts/examples/flight/FlightProductManager.sol/FlightProductManager.json +711 -0
- package/artifacts/contracts/examples/flight/FlightUSD.sol/FlightUSD.dbg.json +1 -1
- package/artifacts/contracts/examples/flight/FlightUSD.sol/FlightUSD.json +2 -2
- package/artifacts/contracts/examples/flight/originalV1.sol/FlightDelayChainlink.dbg.json +1 -1
- package/artifacts/contracts/examples/flight/originalV1.sol/FlightDelayChainlink.json +2 -2
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +104 -255
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +65 -41
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +177 -226
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +124 -256
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +65 -41
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +124 -261
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +65 -41
- package/artifacts/contracts/instance/BaseStore.sol/BaseStore.dbg.json +1 -1
- package/artifacts/contracts/instance/BaseStore.sol/BaseStore.json +50 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +69 -77
- package/artifacts/contracts/instance/IBaseStore.sol/IBaseStore.dbg.json +1 -1
- package/artifacts/contracts/instance/IBaseStore.sol/IBaseStore.json +50 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +52 -91
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +152 -92
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +82 -158
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +226 -248
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +67 -43
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +186 -44
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +201 -149
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +116 -108
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +171 -121
- package/artifacts/contracts/instance/ProductStore.sol/ProductStore.dbg.json +1 -1
- package/artifacts/contracts/instance/ProductStore.sol/ProductStore.json +166 -107
- package/artifacts/contracts/instance/RequestSet.sol/RequestSet.dbg.json +4 -0
- package/artifacts/contracts/instance/RequestSet.sol/RequestSet.json +466 -0
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +1 -1
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +98 -106
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +9 -9
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.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 +9 -4
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.json +40 -4
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
- package/artifacts/contracts/mock/Dip.sol/Dip.dbg.json +1 -1
- package/artifacts/contracts/mock/Dip.sol/Dip.json +2 -2
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +152 -195
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +65 -41
- 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/IOracleComponent.sol/IOracleComponent.json +132 -152
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +102 -93
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +138 -145
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +167 -162
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +133 -115
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +77 -167
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +65 -41
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +149 -203
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +143 -133
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +64 -98
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +75 -178
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +136 -132
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +77 -167
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +244 -26
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +215 -271
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +134 -144
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +81 -156
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +116 -114
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +61 -151
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +65 -41
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +139 -200
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +142 -136
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +50 -89
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +56 -89
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +85 -91
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +47 -86
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +60 -163
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +1 -1
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.json +63 -120
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +148 -182
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +25 -17
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +132 -126
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +98 -165
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +126 -120
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +61 -151
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +88 -205
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +110 -120
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +58 -8
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +86 -179
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +218 -204
- package/artifacts/contracts/registry/IRelease.sol/IRelease.dbg.json +1 -1
- package/artifacts/contracts/registry/IRelease.sol/IRelease.json +15 -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 +176 -328
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +221 -242
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.json +77 -82
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +246 -287
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +114 -119
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +236 -245
- 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 +219 -158
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +56 -32
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +38 -22
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +41 -161
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +552 -180
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +145 -119
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +169 -421
- package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.json +24 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.json +40 -0
- package/artifacts/contracts/shared/IAuthorizedComponent.sol/IAuthorizedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IAuthorizedComponent.sol/IAuthorizedComponent.json +40 -173
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +40 -173
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +455 -95
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +58 -161
- 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/INftOwnable.sol/INftOwnable.json +30 -3
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +12 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +27 -79
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.json +12 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.json +34 -73
- 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/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +59 -149
- 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 +36 -17
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +14 -3
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +26 -78
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +37 -3
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/Service.sol/Service.json +33 -72
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +42 -82
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +30 -70
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +34 -34
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +147 -248
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +51 -296
- package/artifacts/contracts/staking/ITargetLimitHandler.sol/ITargetLimitHandler.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +200 -317
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.json +31 -31
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +128 -116
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +22 -5
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +80 -353
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +115 -109
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +234 -242
- package/artifacts/contracts/staking/TargetHandler.sol/TargetHandler.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetHandler.sol/TargetHandler.json +20 -33
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +16 -21
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.json +2 -2
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.json +2 -7
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.json +2 -2
- package/artifacts/contracts/type/ChainId.sol/ChainIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/ChainId.sol/ChainIdLib.json +2 -2
- 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/Fee.sol/FeeLib.json +2 -7
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32.sol/Key32Lib.json +2 -2
- package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.dbg.json +1 -1
- package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.json +2 -2
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.json +2 -2
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.json +2 -2
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.json +6 -6
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +2 -2
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +2 -2
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +23 -4
- package/artifacts/contracts/type/RequestIdSet.sol/LibRequestIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/RequestIdSet.sol/LibRequestIdSet.json +2 -2
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +17 -22
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +4 -4
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +2 -2
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.json +2 -2
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.json +2 -2
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.json +2 -2
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
- package/artifacts/contracts/type/String.sol/StrLib.json +2 -2
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +2 -2
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +2 -7
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.json +10 -10
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.json +6 -19
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/{IUpgradeable.sol/IUpgradeable.json → IVersionable.sol/IVersionable.json} +4 -54
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +90 -67
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +3 -3
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/{Upgradeable.sol/Upgradeable.json → Versionable.sol/Versionable.json} +4 -54
- package/contracts/accounting/AccountingService.sol +22 -33
- package/contracts/accounting/AccountingServiceManager.sol +6 -4
- package/contracts/accounting/IAccountingService.sol +7 -8
- package/contracts/authorization/AccessAdmin.sol +35 -55
- package/contracts/authorization/AccessAdminLib.sol +27 -13
- package/contracts/authorization/AccessManagerCloneable.sol +52 -24
- package/contracts/authorization/Authorization.sol +2 -2
- package/contracts/authorization/IAccessAdmin.sol +11 -10
- package/contracts/authorization/IServiceAuthorization.sol +1 -1
- package/contracts/authorization/ServiceAuthorization.sol +4 -4
- package/contracts/distribution/BasicDistribution.sol +2 -0
- package/contracts/distribution/BasicDistributionAuthorization.sol +4 -5
- package/contracts/distribution/Distribution.sol +2 -0
- package/contracts/distribution/DistributionService.sol +44 -43
- package/contracts/distribution/DistributionServiceManager.sol +6 -4
- package/contracts/distribution/IDistributionComponent.sol +0 -2
- package/contracts/distribution/IDistributionService.sol +8 -7
- package/contracts/examples/crop/AccountingToken.sol +26 -0
- package/contracts/examples/crop/CropPool.sol +89 -0
- package/contracts/examples/crop/CropPoolAuthorization.sol +37 -0
- package/contracts/examples/crop/CropProduct.sol +512 -0
- package/contracts/examples/crop/CropProductAuthorization.sol +69 -0
- package/contracts/examples/crop/Location.sol +50 -0
- package/contracts/examples/fire/FirePool.sol +4 -0
- package/contracts/examples/fire/FireProduct.sol +5 -1
- package/contracts/examples/flight/FlightLib.sol +95 -108
- package/contracts/examples/flight/FlightNft.sol +234 -0
- package/contracts/examples/flight/FlightOracle.sol +26 -60
- package/contracts/examples/flight/FlightOracleAuthorization.sol +27 -5
- package/contracts/examples/flight/FlightPool.sol +5 -1
- package/contracts/examples/flight/FlightProduct.sol +292 -252
- package/contracts/examples/flight/FlightProductAuthorization.sol +35 -10
- package/contracts/examples/flight/FlightProductManager.sol +49 -0
- package/contracts/examples/unpermissioned/SimpleDistribution.sol +4 -0
- package/contracts/examples/unpermissioned/SimpleOracle.sol +4 -0
- package/contracts/examples/unpermissioned/SimplePool.sol +4 -0
- package/contracts/examples/unpermissioned/SimpleProduct.sol +5 -5
- package/contracts/instance/BaseStore.sol +4 -0
- package/contracts/instance/BundleSet.sol +7 -8
- package/contracts/instance/IBaseStore.sol +8 -0
- package/contracts/instance/IInstance.sol +10 -7
- package/contracts/instance/IInstanceService.sol +11 -4
- package/contracts/instance/Instance.sol +19 -7
- package/contracts/instance/InstanceAdmin.sol +18 -11
- package/contracts/instance/InstanceAuthorizationV3.sol +17 -5
- package/contracts/instance/InstanceReader.sol +70 -23
- package/contracts/instance/InstanceService.sol +88 -54
- package/contracts/instance/InstanceServiceManager.sol +6 -4
- package/contracts/instance/InstanceStore.sol +14 -14
- package/contracts/instance/ProductStore.sol +16 -15
- package/contracts/instance/RequestSet.sol +63 -0
- package/contracts/instance/RiskSet.sol +6 -7
- package/contracts/instance/TargetNames.sol +1 -0
- package/contracts/instance/base/BalanceStore.sol +7 -7
- package/contracts/instance/base/Cloneable.sol +10 -4
- package/contracts/instance/base/ObjectCounter.sol +7 -5
- package/contracts/instance/base/ObjectSet.sol +11 -3
- package/contracts/instance/base/ObjectSetHelperLib.sol +5 -1
- package/contracts/oracle/BasicOracle.sol +3 -0
- package/contracts/oracle/BasicOracleAuthorization.sol +1 -3
- package/contracts/oracle/IOracleComponent.sol +10 -0
- package/contracts/oracle/IOracleService.sol +9 -5
- package/contracts/oracle/Oracle.sol +54 -29
- package/contracts/oracle/OracleService.sol +89 -56
- package/contracts/oracle/OracleServiceManager.sol +6 -4
- package/contracts/pool/BasicPool.sol +4 -2
- package/contracts/pool/BasicPoolAuthorization.sol +4 -5
- package/contracts/pool/BundleService.sol +22 -28
- package/contracts/pool/BundleServiceManager.sol +7 -5
- package/contracts/pool/IBundleService.sol +9 -10
- package/contracts/pool/IPoolComponent.sol +1 -1
- package/contracts/pool/IPoolService.sol +14 -13
- package/contracts/pool/Pool.sol +3 -1
- package/contracts/pool/PoolLib.sol +102 -5
- package/contracts/pool/PoolService.sol +101 -67
- package/contracts/pool/PoolServiceManager.sol +6 -4
- package/contracts/product/ApplicationService.sol +34 -13
- package/contracts/product/ApplicationServiceManager.sol +6 -4
- package/contracts/product/BasicProduct.sol +2 -0
- package/contracts/product/BasicProductAuthorization.sol +4 -5
- package/contracts/product/ClaimService.sol +35 -11
- package/contracts/product/ClaimServiceManager.sol +7 -5
- package/contracts/product/IApplicationService.sol +8 -8
- package/contracts/product/IClaimService.sol +9 -9
- package/contracts/product/IPolicyService.sol +8 -7
- package/contracts/product/IRiskService.sol +4 -6
- package/contracts/product/PolicyService.sol +58 -45
- package/contracts/product/PolicyServiceLib.sol +5 -3
- package/contracts/product/PolicyServiceManager.sol +6 -4
- package/contracts/product/PricingService.sol +8 -7
- package/contracts/product/PricingServiceManager.sol +6 -4
- package/contracts/product/Product.sol +3 -5
- package/contracts/product/RiskService.sol +43 -16
- package/contracts/product/RiskServiceManager.sol +6 -4
- package/contracts/registry/ChainNft.sol +10 -9
- package/contracts/registry/IRegistry.sol +23 -28
- package/contracts/registry/IRegistryService.sol +14 -10
- package/contracts/registry/IRelease.sol +3 -0
- package/contracts/registry/Registry.sol +93 -136
- package/contracts/registry/RegistryAdmin.sol +29 -12
- package/contracts/registry/RegistryAuthorization.sol +3 -6
- package/contracts/registry/RegistryService.sol +82 -99
- package/contracts/registry/RegistryServiceManager.sol +11 -4
- package/contracts/registry/ReleaseAdmin.sol +27 -13
- package/contracts/registry/ReleaseRegistry.sol +81 -72
- package/contracts/registry/ServiceAuthorizationV3.sol +3 -4
- package/contracts/registry/TokenRegistry.sol +18 -9
- package/contracts/shared/Component.sol +22 -27
- package/contracts/shared/ComponentService.sol +168 -49
- package/contracts/shared/ComponentServiceManager.sol +7 -5
- package/contracts/shared/ContractLib.sol +93 -359
- package/contracts/shared/IComponent.sol +3 -9
- package/contracts/shared/IComponentService.sol +44 -8
- package/contracts/shared/IInstanceLinkedComponent.sol +7 -3
- package/contracts/shared/INftOwnable.sol +3 -1
- package/contracts/shared/IRegisterable.sol +3 -14
- package/contracts/shared/IRegistryLinked.sol +3 -1
- package/contracts/shared/IService.sol +2 -2
- package/contracts/shared/InstanceLinkedComponent.sol +65 -30
- package/contracts/shared/NftOwnable.sol +22 -9
- package/contracts/shared/PolicyHolder.sol +4 -2
- package/contracts/shared/Registerable.sol +20 -37
- package/contracts/shared/RegistryLinked.sol +23 -4
- package/contracts/shared/Service.sol +9 -8
- package/contracts/shared/TokenHandler.sol +6 -9
- package/contracts/staking/IStaking.sol +35 -33
- package/contracts/staking/IStakingService.sol +7 -16
- package/contracts/staking/Staking.sol +38 -32
- package/contracts/staking/StakingLib.sol +1 -3
- package/contracts/staking/StakingManager.sol +6 -3
- package/contracts/staking/StakingReader.sol +17 -9
- package/contracts/staking/StakingService.sol +15 -19
- package/contracts/staking/StakingServiceManager.sol +8 -4
- package/contracts/staking/StakingStore.sol +11 -11
- package/contracts/staking/TargetHandler.sol +7 -6
- package/contracts/type/RequestId.sol +6 -0
- package/contracts/type/RiskId.sol +8 -8
- package/contracts/type/Version.sol +16 -15
- package/contracts/upgradeability/{IUpgradeable.sol → IVersionable.sol} +19 -13
- package/contracts/upgradeability/ProxyManager.sol +54 -46
- package/contracts/upgradeability/{Upgradeable.sol → Versionable.sol} +14 -25
- package/package.json +3 -3
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +0 -4
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +0 -74
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +0 -4
- package/artifacts/contracts/shared/Versionable.sol/Versionable.json +0 -74
- package/artifacts/contracts/upgradeability/IUpgradeable.sol/IUpgradeable.dbg.json +0 -4
- package/artifacts/contracts/upgradeability/Upgradeable.sol/Upgradeable.dbg.json +0 -4
- package/contracts/shared/IVersionable.sol +0 -19
- package/contracts/shared/Versionable.sol +0 -47
@@ -18,42 +18,38 @@ import {IRisk} from "../instance/module/IRisk.sol";
|
|
18
18
|
import {AccessAdminLib} from "../authorization/AccessAdminLib.sol";
|
19
19
|
import {Amount} from "../type/Amount.sol";
|
20
20
|
import {BundleSet} from "./BundleSet.sol";
|
21
|
-
import {BUNDLE, COMPONENT, DISTRIBUTION, PREMIUM, POLICY} from "../type/ObjectType.sol";
|
21
|
+
import {BUNDLE, COMPONENT, DISTRIBUTION, PREMIUM, POLICY, PRODUCT, FEE, RISK, CLAIM, PAYOUT, ObjectType} from "../type/ObjectType.sol";
|
22
22
|
import {ClaimId, ClaimIdLib} from "../type/ClaimId.sol";
|
23
23
|
import {DistributorType} from "../type/DistributorType.sol";
|
24
24
|
import {InstanceAdmin} from "./InstanceAdmin.sol";
|
25
25
|
import {InstanceStore} from "./InstanceStore.sol";
|
26
|
-
import {Key32} from "../type/Key32.sol";
|
26
|
+
import {Key32, Key32Lib} from "../type/Key32.sol";
|
27
27
|
import {NftId} from "../type/NftId.sol";
|
28
28
|
import {PayoutId, PayoutIdLib} from "../type/PayoutId.sol";
|
29
29
|
import {PolicyServiceLib} from "../product/PolicyServiceLib.sol";
|
30
30
|
import {ProductStore} from "./ProductStore.sol";
|
31
|
-
import {RegistryLinked} from "../shared/RegistryLinked.sol";
|
32
31
|
import {ReferralId, ReferralStatus, ReferralLib} from "../type/Referral.sol";
|
33
32
|
import {RequestId} from "../type/RequestId.sol";
|
33
|
+
import {RequestSet} from "./RequestSet.sol";
|
34
34
|
import {RiskId} from "../type/RiskId.sol";
|
35
35
|
import {RiskSet} from "./RiskSet.sol";
|
36
36
|
import {RoleId, INSTANCE_OWNER_ROLE} from "../type/RoleId.sol";
|
37
37
|
import {StateId} from "../type/StateId.sol";
|
38
|
+
import {Str, StrLib} from "../type/String.sol";
|
38
39
|
import {TokenHandler} from "../shared/TokenHandler.sol";
|
39
40
|
import {UFixed, UFixedLib} from "../type/UFixed.sol";
|
40
41
|
|
41
42
|
|
42
43
|
/// @dev Central reader contract for a specific instance.
|
43
44
|
/// Provides reading functions for all instance data and related component data.
|
44
|
-
contract InstanceReader
|
45
|
-
RegistryLinked
|
46
|
-
{
|
45
|
+
contract InstanceReader {
|
47
46
|
|
48
47
|
error ErrorInstanceReaderAlreadyInitialized();
|
49
48
|
error ErrorInstanceReaderInstanceAddressZero();
|
50
|
-
|
51
|
-
// 1. instance receives reader through setInstanceReader()
|
52
|
-
// 2. this way instance initialization is not depends on reader
|
53
|
-
// 3. and reader is simple contract with constructor
|
54
|
-
// 4. no _initialized in storage, the rest is immutable
|
49
|
+
|
55
50
|
bool private _initialized = false;
|
56
51
|
|
52
|
+
IRegistry internal _registry;
|
57
53
|
IInstance internal _instance;
|
58
54
|
InstanceAdmin internal _instanceAdmin;
|
59
55
|
|
@@ -61,6 +57,7 @@ contract InstanceReader is
|
|
61
57
|
ProductStore internal _productStore;
|
62
58
|
BundleSet internal _bundleSet;
|
63
59
|
RiskSet internal _riskSet;
|
60
|
+
RequestSet internal _requestSet;
|
64
61
|
IDistributionService internal _distributionService;
|
65
62
|
|
66
63
|
/// @dev This initializer needs to be called from the instance itself.
|
@@ -84,24 +81,28 @@ contract InstanceReader is
|
|
84
81
|
_initialized = true;
|
85
82
|
_instance = IInstance(instanceAddress);
|
86
83
|
_instanceAdmin = _instance.getInstanceAdmin();
|
84
|
+
_registry = _instance.getRegistry();
|
87
85
|
|
88
86
|
_store = _instance.getInstanceStore();
|
89
87
|
_productStore = _instance.getProductStore();
|
90
88
|
_bundleSet = _instance.getBundleSet();
|
91
89
|
_riskSet = _instance.getRiskSet();
|
92
|
-
|
93
|
-
_distributionService = IDistributionService(
|
94
|
-
_getRegistry().getServiceAddress(DISTRIBUTION(), _instance.getRelease()));
|
90
|
+
_requestSet = _instance.getRequestSet();
|
91
|
+
_distributionService = IDistributionService(_registry.getServiceAddress(DISTRIBUTION(), _instance.getRelease()));
|
95
92
|
}
|
96
93
|
|
97
94
|
|
98
95
|
//--- instance functions ---------------------------------------------------------//
|
99
96
|
|
97
|
+
/// @dev Returns the registry this instance is registered in.
|
98
|
+
function getRegistry() public view returns (IRegistry registry) {
|
99
|
+
return _registry;
|
100
|
+
}
|
100
101
|
|
101
102
|
|
102
103
|
/// @dev Returns the instance NFT ID.
|
103
104
|
function getInstanceNftId() public view returns (NftId instanceNftid) {
|
104
|
-
return
|
105
|
+
return _registry.getNftIdForAddress(address(_instance));
|
105
106
|
}
|
106
107
|
|
107
108
|
|
@@ -166,7 +167,9 @@ contract InstanceReader is
|
|
166
167
|
|
167
168
|
|
168
169
|
/// @dev Returns the currently locked amount for the given NFT ID.
|
169
|
-
///
|
170
|
+
/// Locked amounts are only tracked for bundles, not for pool. To get the
|
171
|
+
/// pool locked amount, then locked amounts of the bundles contained in the
|
172
|
+
/// pool must be summed up. The target NFT ID may only a bundle.
|
170
173
|
function getLockedAmount(NftId targetNftId) external view returns (Amount) {
|
171
174
|
return _store.getLockedAmount(targetNftId);
|
172
175
|
}
|
@@ -366,6 +369,18 @@ contract InstanceReader is
|
|
366
369
|
return getState(requestId.toKey32());
|
367
370
|
}
|
368
371
|
|
372
|
+
function getActiveRequests(NftId oracleNftId) external view returns(uint256 numberOfRequests) {
|
373
|
+
return _requestSet.activeRequests(oracleNftId);
|
374
|
+
}
|
375
|
+
|
376
|
+
function getActiveRequestAt(NftId oracleNftId, uint256 idx) external view returns(RequestId requestId) {
|
377
|
+
return _requestSet.activeRequestAt(oracleNftId, idx);
|
378
|
+
}
|
379
|
+
|
380
|
+
function isRequestActive(NftId oracleNftId, RequestId requestId) external view returns(bool isActive) {
|
381
|
+
return _requestSet.contains(oracleNftId, requestId);
|
382
|
+
}
|
383
|
+
|
369
384
|
//--- pool functions -----------------------------------------------------------//
|
370
385
|
|
371
386
|
/// @dev Returns the pool info for the given pool NFT ID.
|
@@ -438,7 +453,7 @@ contract InstanceReader is
|
|
438
453
|
return _store.getReferralInfo(referralId);
|
439
454
|
}
|
440
455
|
|
441
|
-
|
456
|
+
|
442
457
|
function getDiscountPercentage(ReferralId referralId)
|
443
458
|
public
|
444
459
|
view
|
@@ -447,7 +462,10 @@ contract InstanceReader is
|
|
447
462
|
ReferralStatus status
|
448
463
|
)
|
449
464
|
{
|
450
|
-
return
|
465
|
+
return IDistributionService(
|
466
|
+
_registry.getServiceAddress(
|
467
|
+
DISTRIBUTION(),
|
468
|
+
_instance.getRelease())).getDiscountPercentage(
|
451
469
|
this, // instance reader
|
452
470
|
referralId);
|
453
471
|
}
|
@@ -466,6 +484,12 @@ contract InstanceReader is
|
|
466
484
|
}
|
467
485
|
|
468
486
|
|
487
|
+
/// @dev Returns the role ID for the given index.
|
488
|
+
function getRoleForName(string memory name) public view returns (RoleId roleId, bool exists) {
|
489
|
+
return _instanceAdmin.getRoleForName(name);
|
490
|
+
}
|
491
|
+
|
492
|
+
|
469
493
|
/// @dev Returns the role ID for the instance owner role.
|
470
494
|
/// This role may be used as a "root" admin role for other custom roles defined for this instance.
|
471
495
|
function getInstanceOwnerRole() public pure returns (RoleId roleId) {
|
@@ -586,7 +610,25 @@ contract InstanceReader is
|
|
586
610
|
|
587
611
|
|
588
612
|
function getMetadata(Key32 key) public view returns (IBaseStore.Metadata memory metadata) {
|
589
|
-
|
613
|
+
ObjectType objectType = Key32Lib.toObjectType(key);
|
614
|
+
|
615
|
+
if (objectType == PRODUCT()) {
|
616
|
+
return _productStore.getMetadata(key);
|
617
|
+
} else if (objectType == FEE()) {
|
618
|
+
return _productStore.getMetadata(key);
|
619
|
+
} else if (objectType == RISK()) {
|
620
|
+
return _productStore.getMetadata(key);
|
621
|
+
} else if (objectType == POLICY()) {
|
622
|
+
return _productStore.getMetadata(key);
|
623
|
+
} else if (objectType == PREMIUM()) {
|
624
|
+
return _productStore.getMetadata(key);
|
625
|
+
} else if (objectType == CLAIM()) {
|
626
|
+
return _productStore.getMetadata(key);
|
627
|
+
} else if (objectType == PAYOUT()) {
|
628
|
+
return _productStore.getMetadata(key);
|
629
|
+
} else {
|
630
|
+
return _store.getMetadata(key);
|
631
|
+
}
|
590
632
|
}
|
591
633
|
|
592
634
|
|
@@ -595,13 +637,18 @@ contract InstanceReader is
|
|
595
637
|
}
|
596
638
|
|
597
639
|
|
598
|
-
function
|
599
|
-
return UFixedLib.
|
640
|
+
function toInt(UFixed value) public pure returns (uint256) {
|
641
|
+
return UFixedLib.toInt(value);
|
600
642
|
}
|
601
643
|
|
602
644
|
|
603
|
-
function
|
604
|
-
return
|
645
|
+
function toString(Str str) public pure returns (string memory) {
|
646
|
+
return StrLib.toString(str);
|
647
|
+
}
|
648
|
+
|
649
|
+
|
650
|
+
function toUFixed(uint256 value, int8 exp) public pure returns (UFixed) {
|
651
|
+
return UFixedLib.toUFixed(value, exp);
|
605
652
|
}
|
606
653
|
|
607
654
|
//--- internal functions ----------------------------------------------------//
|
@@ -22,6 +22,7 @@ import {InstanceStore} from "./InstanceStore.sol";
|
|
22
22
|
import {NftId} from "../type/NftId.sol";
|
23
23
|
import {ObjectType, INSTANCE, COMPONENT, INSTANCE, REGISTRY, STAKING} from "../type/ObjectType.sol";
|
24
24
|
import {ProductStore} from "./ProductStore.sol";
|
25
|
+
import {RequestSet} from "./RequestSet.sol";
|
25
26
|
import {RiskSet} from "./RiskSet.sol";
|
26
27
|
import {RoleId} from "../type/RoleId.sol";
|
27
28
|
import {Seconds} from "../type/Seconds.sol";
|
@@ -49,6 +50,7 @@ contract InstanceService is
|
|
49
50
|
address internal _masterInstanceReader;
|
50
51
|
address internal _masterInstanceBundleSet;
|
51
52
|
address internal _masterInstanceRiskSet;
|
53
|
+
address internal _masterInstanceRequestSet;
|
52
54
|
address internal _masterInstanceStore;
|
53
55
|
address internal _masterProductStore;
|
54
56
|
|
@@ -175,7 +177,7 @@ contract InstanceService is
|
|
175
177
|
IInstance(instanceAddress).getInstanceAdmin().setInstanceLocked(locked);
|
176
178
|
|
177
179
|
emit LogInstanceServiceInstanceLocked(
|
178
|
-
|
180
|
+
getRegistry().getNftIdForAddress(instanceAddress),
|
179
181
|
locked);
|
180
182
|
}
|
181
183
|
|
@@ -204,11 +206,13 @@ contract InstanceService is
|
|
204
206
|
// MUST be set after instance is set up and registered
|
205
207
|
IAuthorization instanceAuthorization = InstanceAdmin(_masterInstanceAdmin).getInstanceAuthorization();
|
206
208
|
instanceAdmin.completeSetup(
|
209
|
+
address(getRegistry()),
|
207
210
|
address(instanceAuthorization),
|
211
|
+
getRelease(),
|
208
212
|
address(instance));
|
209
213
|
|
210
214
|
// hard checks for newly cloned instance
|
211
|
-
|
215
|
+
assert(address(instance.getRegistry()) == address(getRegistry()));
|
212
216
|
assert(instance.getRelease() == getRelease());
|
213
217
|
|
214
218
|
// register cloned instance as staking target
|
@@ -229,7 +233,7 @@ contract InstanceService is
|
|
229
233
|
restricted()
|
230
234
|
onlyInstance()
|
231
235
|
{
|
232
|
-
NftId instanceNftId =
|
236
|
+
NftId instanceNftId = getRegistry().getNftIdForAddress(msg.sender);
|
233
237
|
_stakingService.setInstanceLockingPeriod(
|
234
238
|
instanceNftId,
|
235
239
|
stakeLockingPeriod);
|
@@ -242,7 +246,7 @@ contract InstanceService is
|
|
242
246
|
restricted()
|
243
247
|
onlyInstance()
|
244
248
|
{
|
245
|
-
NftId instanceNftId =
|
249
|
+
NftId instanceNftId = getRegistry().getNftIdForAddress(msg.sender);
|
246
250
|
_stakingService.setInstanceRewardRate(
|
247
251
|
instanceNftId,
|
248
252
|
rewardRate);
|
@@ -254,7 +258,7 @@ contract InstanceService is
|
|
254
258
|
restricted()
|
255
259
|
onlyInstance()
|
256
260
|
{
|
257
|
-
NftId instanceNftId =
|
261
|
+
NftId instanceNftId = getRegistry().getNftIdForAddress(msg.sender);
|
258
262
|
_stakingService.setInstanceMaxStakedAmount(
|
259
263
|
instanceNftId,
|
260
264
|
maxStakedAmount);
|
@@ -268,7 +272,7 @@ contract InstanceService is
|
|
268
272
|
onlyInstance()
|
269
273
|
returns (Amount newBalance)
|
270
274
|
{
|
271
|
-
NftId instanceNftId =
|
275
|
+
NftId instanceNftId = getRegistry().getNftIdForAddress(msg.sender);
|
272
276
|
newBalance = _stakingService.refillInstanceRewardReserves(
|
273
277
|
instanceNftId,
|
274
278
|
rewardProvider,
|
@@ -283,7 +287,7 @@ contract InstanceService is
|
|
283
287
|
onlyInstance()
|
284
288
|
returns (Amount newBalance)
|
285
289
|
{
|
286
|
-
NftId instanceNftId =
|
290
|
+
NftId instanceNftId = getRegistry().getNftIdForAddress(msg.sender);
|
287
291
|
newBalance = _stakingService.withdrawInstanceRewardReserves(
|
288
292
|
instanceNftId,
|
289
293
|
dipAmount);
|
@@ -302,11 +306,13 @@ contract InstanceService is
|
|
302
306
|
InstanceReader upgradedInstanceReaderClone = InstanceReader(
|
303
307
|
Clones.clone(address(_masterInstanceReader)));
|
304
308
|
|
309
|
+
address oldInstanceReaderAddress = address(instance.getInstanceReader());
|
305
310
|
upgradedInstanceReaderClone.initializeWithInstance(instanceAddress);
|
306
311
|
instance.setInstanceReader(upgradedInstanceReaderClone);
|
307
312
|
|
308
313
|
emit LogInstanceServiceInstanceReaderUpgraded(
|
309
|
-
|
314
|
+
getRegistry().getNftIdForAddress(instanceAddress),
|
315
|
+
oldInstanceReaderAddress,
|
310
316
|
address(upgradedInstanceReaderClone));
|
311
317
|
}
|
312
318
|
|
@@ -321,56 +327,80 @@ contract InstanceService is
|
|
321
327
|
if(_masterInstanceAdmin != address(0)) { revert ErrorInstanceServiceMasterInstanceAdminAlreadySet(); }
|
322
328
|
if(_masterInstanceBundleSet != address(0)) { revert ErrorInstanceServiceMasterBundleSetAlreadySet(); }
|
323
329
|
if(_masterInstanceRiskSet != address(0)) { revert ErrorInstanceServiceMasterRiskSetAlreadySet(); }
|
330
|
+
if(_masterInstanceRequestSet != address(0)) { revert ErrorInstanceServiceMasterRequestSetAlreadySet(); }
|
324
331
|
if(instanceAddress == address(0)) { revert ErrorInstanceServiceInstanceAddressZero(); }
|
325
332
|
|
326
333
|
{
|
327
334
|
IInstance instance = IInstance(instanceAddress);
|
328
335
|
address accessManagerAddress = instance.authority();
|
329
336
|
InstanceAdmin instanceAdmin = instance.getInstanceAdmin();
|
330
|
-
address instanceAdminAddress = address(instanceAdmin);
|
331
|
-
InstanceReader instanceReader = instance.getInstanceReader();
|
332
|
-
address instanceReaderAddress = address(instanceReader);
|
333
|
-
BundleSet bundleSet = instance.getBundleSet();
|
334
|
-
address bundleSetAddress = address(bundleSet);
|
335
|
-
RiskSet riskSet = instance.getRiskSet();
|
336
|
-
address riskSetAddress = address(riskSet);
|
337
|
-
InstanceStore instanceStore = instance.getInstanceStore();
|
338
|
-
address instanceStoreAddress = address(instanceStore);
|
339
|
-
ProductStore productStore = instance.getProductStore();
|
340
|
-
address productStoreAddress = address(productStore);
|
341
|
-
|
342
|
-
if(accessManagerAddress == address(0)) { revert ErrorInstanceServiceAccessManagerZero(); }
|
343
|
-
if(instanceAdminAddress == address(0)) { revert ErrorInstanceServiceInstanceAdminZero(); }
|
344
|
-
if(instanceReaderAddress == address(0)) { revert ErrorInstanceServiceInstanceReaderZero(); }
|
345
|
-
if(bundleSetAddress == address(0)) { revert ErrorInstanceServiceBundleSetZero(); }
|
346
|
-
if(riskSetAddress == address(0)) { revert ErrorInstanceServiceRiskSetZero(); }
|
347
|
-
if(instanceStoreAddress == address(0)) { revert ErrorInstanceServiceInstanceStoreZero(); }
|
348
|
-
if(productStoreAddress == address(0)) { revert ErrorInstanceServiceProductStoreZero(); } // TODO: rename exception
|
349
337
|
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
338
|
+
{
|
339
|
+
address instanceAdminAddress = address(instanceAdmin);
|
340
|
+
InstanceReader instanceReader = instance.getInstanceReader();
|
341
|
+
address instanceReaderAddress = address(instanceReader);
|
342
|
+
|
343
|
+
if(accessManagerAddress == address(0)) { revert ErrorInstanceServiceAccessManagerZero(); }
|
344
|
+
if(instanceAdminAddress == address(0)) { revert ErrorInstanceServiceInstanceAdminZero(); }
|
345
|
+
if(instanceReaderAddress == address(0)) { revert ErrorInstanceServiceInstanceReaderZero(); }
|
346
|
+
|
347
|
+
if(instance.authority() != instanceAdmin.authority()) { revert ErrorInstanceServiceInstanceAuthorityMismatch(); }
|
348
|
+
if(instanceReader.getInstance() != instance) { revert ErrorInstanceServiceInstanceReaderInstanceMismatch2(); }
|
349
|
+
|
350
|
+
_masterAccessManager = accessManagerAddress;
|
351
|
+
_masterInstanceAdmin = instanceAdminAddress;
|
352
|
+
_masterInstance = instanceAddress;
|
353
|
+
_masterInstanceReader = instanceReaderAddress;
|
354
|
+
}
|
355
|
+
|
356
|
+
{
|
357
|
+
BundleSet bundleSet = instance.getBundleSet();
|
358
|
+
address bundleSetAddress = address(bundleSet);
|
359
|
+
RiskSet riskSet = instance.getRiskSet();
|
360
|
+
address riskSetAddress = address(riskSet);
|
361
|
+
RequestSet requestSet = instance.getRequestSet();
|
362
|
+
address requestSetAddress = address(requestSet);
|
363
|
+
|
364
|
+
if(bundleSetAddress == address(0)) { revert ErrorInstanceServiceBundleSetZero(); }
|
365
|
+
if(riskSetAddress == address(0)) { revert ErrorInstanceServiceRiskSetZero(); }
|
366
|
+
if(requestSetAddress == address(0)) { revert ErrorInstanceServiceRequestSetZero(); }
|
367
|
+
if(bundleSet.authority() != instanceAdmin.authority()) { revert ErrorInstanceServiceBundleSetAuthorityMismatch(); }
|
368
|
+
if(riskSet.authority() != instanceAdmin.authority()) { revert ErrorInstanceServiceRiskSetAuthorityMismatch(); }
|
369
|
+
if(requestSet.authority() != instanceAdmin.authority()) { revert ErrorInstanceServiceRequestSetAuthorityMismatch(); }
|
370
|
+
if(bundleSet.getInstanceAddress() != address(instance)) { revert ErrorInstanceServiceBundleSetInstanceMismatch(); }
|
371
|
+
if(riskSet.getInstanceAddress() != address(instance)) { revert ErrorInstanceServiceRiskSetInstanceMismatch(); }
|
372
|
+
if(requestSet.getInstanceAddress() != address(instance)) { revert ErrorInstanceServiceRequestSetInstanceMismatch(); }
|
373
|
+
|
374
|
+
_masterInstanceBundleSet = bundleSetAddress;
|
375
|
+
_masterInstanceRiskSet = riskSetAddress;
|
376
|
+
_masterInstanceRequestSet = requestSetAddress;
|
377
|
+
}
|
378
|
+
|
379
|
+
{
|
380
|
+
InstanceStore instanceStore = instance.getInstanceStore();
|
381
|
+
address instanceStoreAddress = address(instanceStore);
|
382
|
+
ProductStore productStore = instance.getProductStore();
|
383
|
+
address productStoreAddress = address(productStore);
|
384
|
+
|
385
|
+
if(instanceStoreAddress == address(0)) { revert ErrorInstanceServiceInstanceStoreZero(); }
|
386
|
+
if(productStoreAddress == address(0)) { revert ErrorInstanceServiceProductStoreZero(); } // TODO: rename exception
|
387
|
+
|
388
|
+
if(instanceStore.authority() != instanceAdmin.authority()) { revert ErrorInstanceServiceInstanceStoreAuthorityMismatch(); }
|
389
|
+
if(productStore.authority() != instanceAdmin.authority()) { revert ErrorInstanceServiceProductStoreAuthorityMismatch(); }
|
390
|
+
|
391
|
+
_masterInstanceStore = instanceStoreAddress;
|
392
|
+
_masterProductStore = productStoreAddress;
|
393
|
+
}
|
368
394
|
}
|
369
395
|
|
370
396
|
{
|
371
397
|
IInstance masterInstance = IInstance(_masterInstance);
|
372
398
|
IRegistry.ObjectInfo memory info = _registryService.registerInstance(masterInstance, getOwner());
|
373
399
|
masterInstanceNftId = info.nftId;
|
400
|
+
|
401
|
+
emit LogInstanceServiceMasterInstanceRegistered(
|
402
|
+
masterInstanceNftId, _masterInstance, _masterInstanceAdmin, _masterAccessManager,
|
403
|
+
_masterInstanceReader, _masterInstanceBundleSet, _masterInstanceRiskSet, _masterInstanceRequestSet, _masterInstanceStore, _masterProductStore);
|
374
404
|
}
|
375
405
|
}
|
376
406
|
|
@@ -387,10 +417,12 @@ contract InstanceService is
|
|
387
417
|
InstanceReader instanceReader = InstanceReader(instanceReaderAddress);
|
388
418
|
if(instanceReader.getInstance() != IInstance(_masterInstance)) { revert ErrorInstanceServiceInstanceReaderInstanceMismatch(); }
|
389
419
|
|
420
|
+
address oldMasterInstanceReaderAddress = _masterInstanceReader;
|
390
421
|
_masterInstanceReader = instanceReaderAddress;
|
391
422
|
|
392
423
|
emit LogInstanceServiceMasterInstanceReaderUpgraded(
|
393
|
-
|
424
|
+
getRegistry().getNftIdForAddress(_masterInstance),
|
425
|
+
oldMasterInstanceReaderAddress,
|
394
426
|
instanceReaderAddress);
|
395
427
|
}
|
396
428
|
|
@@ -418,8 +450,7 @@ contract InstanceService is
|
|
418
450
|
|
419
451
|
clonedAdmin.initialize(
|
420
452
|
address(clonedAccessManager),
|
421
|
-
"InstanceAdmin"
|
422
|
-
getRelease());
|
453
|
+
"InstanceAdmin");
|
423
454
|
}
|
424
455
|
|
425
456
|
|
@@ -443,8 +474,11 @@ contract InstanceService is
|
|
443
474
|
productStore: ProductStore(Clones.clone(address(_masterProductStore))),
|
444
475
|
bundleSet: BundleSet(Clones.clone(_masterInstanceBundleSet)),
|
445
476
|
riskSet: RiskSet(Clones.clone(_masterInstanceRiskSet)),
|
477
|
+
requestSet: RequestSet(Clones.clone(address(_masterInstanceRequestSet))),
|
446
478
|
instanceReader: InstanceReader(Clones.clone(address(_masterInstanceReader)))
|
447
479
|
}),
|
480
|
+
getRegistry(),
|
481
|
+
getRelease(),
|
448
482
|
instanceOwner,
|
449
483
|
allowAnyToken);
|
450
484
|
|
@@ -459,13 +493,14 @@ contract InstanceService is
|
|
459
493
|
)
|
460
494
|
internal
|
461
495
|
virtual override
|
462
|
-
|
496
|
+
initializer()
|
463
497
|
{
|
464
498
|
(
|
465
|
-
address authority
|
466
|
-
|
499
|
+
address authority,
|
500
|
+
address registry
|
501
|
+
) = abi.decode(data, (address, address));
|
467
502
|
|
468
|
-
__Service_init(authority, owner);
|
503
|
+
__Service_init(authority, registry, owner);
|
469
504
|
|
470
505
|
_registryService = IRegistryService(_getServiceAddress(REGISTRY()));
|
471
506
|
_stakingService = IStakingService(_getServiceAddress(STAKING()));
|
@@ -483,8 +518,7 @@ contract InstanceService is
|
|
483
518
|
virtual
|
484
519
|
view
|
485
520
|
{
|
486
|
-
|
487
|
-
IRegistry registry = _getRegistry();
|
521
|
+
IRegistry registry = getRegistry();
|
488
522
|
|
489
523
|
NftId instanceNftId = registry.getNftIdForAddress(instanceAddress);
|
490
524
|
if (instanceNftId.eqz()) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {
|
4
|
+
import {IVersionable} from "../upgradeability/IVersionable.sol";
|
5
5
|
import {ProxyManager} from "../upgradeability/ProxyManager.sol";
|
6
6
|
import {InstanceService} from "./InstanceService.sol";
|
7
7
|
|
@@ -12,17 +12,19 @@ contract InstanceServiceManager is ProxyManager {
|
|
12
12
|
/// @dev initializes proxy manager with instance service implementation
|
13
13
|
constructor(
|
14
14
|
address authority,
|
15
|
+
address registry,
|
15
16
|
bytes32 salt
|
16
17
|
)
|
17
18
|
{
|
18
19
|
InstanceService svc = new InstanceService{salt: salt}();
|
19
|
-
bytes memory data = abi.encode(authority);
|
20
|
-
|
20
|
+
bytes memory data = abi.encode(authority, registry);
|
21
|
+
IVersionable versionable = initialize(
|
22
|
+
registry,
|
21
23
|
address(svc),
|
22
24
|
data,
|
23
25
|
salt);
|
24
26
|
|
25
|
-
_instanceService = InstanceService(address(
|
27
|
+
_instanceService = InstanceService(address(versionable));
|
26
28
|
}
|
27
29
|
|
28
30
|
//--- view functions ----------------------------------------------------//
|
@@ -34,20 +34,20 @@ contract InstanceStore is
|
|
34
34
|
BaseStore
|
35
35
|
{
|
36
36
|
|
37
|
-
event LogProductStoreComponentInfoCreated(NftId componentNftId, StateId state, address createdby, address txOrigin);
|
38
|
-
event LogProductStoreComponentInfoUpdated(NftId componentNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
39
|
-
event LogProductStorePoolInfoCreated(NftId poolNftId, StateId state, address createdBy, address txOrigin);
|
40
|
-
event LogProductStorePoolInfoUpdated(NftId poolNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
41
|
-
event LogProductStoreDistributorTypeInfoCreated(DistributorType distributorType, StateId state, address createdBy, address txOrigin);
|
42
|
-
event LogProductStoreDistributorTypeInfoUpdated(DistributorType distributorType, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
43
|
-
event LogProductStoreDistributorInfoCreated(NftId distributorNftId, StateId state, address createdBy, address txOrigin);
|
44
|
-
event LogProductStoreDistributorInfoUpdated(NftId distributorNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
45
|
-
event LogProductStoreReferralInfoCreated(ReferralId referralId, StateId state, address createdBy, address txOrigin);
|
46
|
-
event LogProductStoreReferralInfoUpdated(ReferralId referralId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
47
|
-
event LogProductStoreBundleInfoCreated(NftId bundleNftId, StateId state, address createdBy, address txOrigin);
|
48
|
-
event LogProductStoreBundleInfoUpdated(NftId bundleNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
49
|
-
event LogProductStoreRequestInfoCreated(RequestId requestId, StateId state, address createdBy, address txOrigin);
|
50
|
-
event LogProductStoreRequestInfoUpdated(RequestId requestId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
37
|
+
event LogProductStoreComponentInfoCreated(NftId indexed componentNftId, StateId indexed state, address indexed createdby, address txOrigin);
|
38
|
+
event LogProductStoreComponentInfoUpdated(NftId indexed componentNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
39
|
+
event LogProductStorePoolInfoCreated(NftId indexed poolNftId, StateId indexed state, address indexed createdBy, address txOrigin);
|
40
|
+
event LogProductStorePoolInfoUpdated(NftId indexed poolNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
41
|
+
event LogProductStoreDistributorTypeInfoCreated(DistributorType indexed distributorType, StateId indexed state, address indexed createdBy, address txOrigin);
|
42
|
+
event LogProductStoreDistributorTypeInfoUpdated(DistributorType indexed distributorType, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
43
|
+
event LogProductStoreDistributorInfoCreated(NftId indexed distributorNftId, StateId indexed state, address indexed createdBy, address txOrigin);
|
44
|
+
event LogProductStoreDistributorInfoUpdated(NftId indexed distributorNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
45
|
+
event LogProductStoreReferralInfoCreated(ReferralId indexed referralId, StateId indexed state, address indexed createdBy, address txOrigin);
|
46
|
+
event LogProductStoreReferralInfoUpdated(ReferralId indexed referralId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
47
|
+
event LogProductStoreBundleInfoCreated(NftId indexed bundleNftId, StateId indexed state, address indexed createdBy, address txOrigin);
|
48
|
+
event LogProductStoreBundleInfoUpdated(NftId indexed bundleNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
49
|
+
event LogProductStoreRequestInfoCreated(RequestId indexed requestId, StateId indexed state, address indexed createdBy, address txOrigin);
|
50
|
+
event LogProductStoreRequestInfoUpdated(RequestId indexed requestId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
51
51
|
|
52
52
|
|
53
53
|
mapping(Key32 => IComponents.ComponentInfo) private _components;
|
@@ -29,20 +29,20 @@ contract ProductStore is
|
|
29
29
|
ObjectCounter,
|
30
30
|
ObjectLifecycle
|
31
31
|
{
|
32
|
-
event LogProductStoreProductInfoCreated(NftId productNftId, StateId state, address createdBy, address txOrigin);
|
33
|
-
event LogProductStoreProductInfoUpdated(NftId productNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
34
|
-
event LogProductStoreFeeInfoCreated(NftId productNftId, StateId state, address createdBy, address txOrigin);
|
35
|
-
event LogProductStoreFeeInfoUpdated(NftId productNftId, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
36
|
-
event LogProductStoreRiskInfoCreated(RiskId riskId, StateId state, address createdBy, address txOrigin);
|
37
|
-
event LogProductStoreRiskInfoUpdated(RiskId riskId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
38
|
-
event LogProductStorePolicyInfoCreated(NftId policyNftId, StateId state, address createdBy, address txOrigin);
|
39
|
-
event LogProductStorePolicyInfoUpdated(NftId policyNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
40
|
-
event LogProductStorePremiumInfoCreated(NftId policyNftId, StateId state, address createdBy, address txOrigin);
|
41
|
-
event LogProductStorePremiumInfoUpdated(NftId policyNftId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
42
|
-
event LogProductStoreClaimInfoCreated(NftId policyNftId, ClaimId claimId, StateId state, address createdBy, address txOrigin);
|
43
|
-
event LogProductStoreClaimInfoUpdated(NftId policyNftId, ClaimId claimId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
44
|
-
event LogProductStorePayoutInfoCreated(NftId policyNftId, PayoutId payoutId, StateId state, address createdBy, address txOrigin);
|
45
|
-
event LogProductStorePayoutInfoUpdated(NftId policyNftId, PayoutId payoutId, StateId oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
32
|
+
event LogProductStoreProductInfoCreated(NftId indexed productNftId, StateId indexed state, address indexed createdBy, address txOrigin);
|
33
|
+
event LogProductStoreProductInfoUpdated(NftId indexed productNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
34
|
+
event LogProductStoreFeeInfoCreated(NftId indexed productNftId, StateId indexed state, address indexed createdBy, address txOrigin);
|
35
|
+
event LogProductStoreFeeInfoUpdated(NftId indexed productNftId, address indexed updatedBy, address indexed txOrigin, Blocknumber lastUpdatedIn);
|
36
|
+
event LogProductStoreRiskInfoCreated(RiskId indexed riskId, StateId indexed state, address indexed createdBy, address txOrigin);
|
37
|
+
event LogProductStoreRiskInfoUpdated(RiskId indexed riskId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
38
|
+
event LogProductStorePolicyInfoCreated(NftId indexed policyNftId, StateId indexed state, address indexed createdBy, address txOrigin);
|
39
|
+
event LogProductStorePolicyInfoUpdated(NftId indexed policyNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
40
|
+
event LogProductStorePremiumInfoCreated(NftId indexed policyNftId, StateId indexed state, address indexed createdBy, address txOrigin);
|
41
|
+
event LogProductStorePremiumInfoUpdated(NftId indexed policyNftId, StateId indexed oldState, StateId indexed newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
42
|
+
event LogProductStoreClaimInfoCreated(NftId indexed policyNftId, ClaimId indexed claimId, StateId indexed state, address createdBy, address txOrigin);
|
43
|
+
event LogProductStoreClaimInfoUpdated(NftId indexed policyNftId, ClaimId indexed claimId, StateId indexed oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
44
|
+
event LogProductStorePayoutInfoCreated(NftId indexed policyNftId, PayoutId indexed payoutId, StateId indexed state, address createdBy, address txOrigin);
|
45
|
+
event LogProductStorePayoutInfoUpdated(NftId indexed policyNftId, PayoutId indexed payoutId, StateId indexed oldState, StateId newState, address updatedBy, address txOrigin, Blocknumber lastUpdatedIn);
|
46
46
|
|
47
47
|
mapping(Key32 key32 => IComponents.ProductInfo) private _products;
|
48
48
|
mapping(Key32 key32 => IComponents.FeeInfo) private _fees;
|
@@ -113,7 +113,8 @@ contract ProductStore is
|
|
113
113
|
}
|
114
114
|
|
115
115
|
//--- Risk --------------------------------------------------------------//
|
116
|
-
function createRisk(
|
116
|
+
function createRisk(IRisk.RiskInfo memory info) external restricted() returns (RiskId riskId) {
|
117
|
+
riskId = _createNextRiskId();
|
117
118
|
Key32 key = riskId.toKey32();
|
118
119
|
_createMetadata(key);
|
119
120
|
_risks[key] = info;
|