@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
@@ -134,6 +134,7 @@ abstract contract Product is
|
|
134
134
|
|
135
135
|
|
136
136
|
function __Product_init(
|
137
|
+
address registry,
|
137
138
|
NftId instanceNftId,
|
138
139
|
string memory name,
|
139
140
|
IComponents.ProductInfo memory productInfo,
|
@@ -146,6 +147,7 @@ abstract contract Product is
|
|
146
147
|
onlyInitializing()
|
147
148
|
{
|
148
149
|
__InstanceLinkedComponent_init(
|
150
|
+
registry,
|
149
151
|
instanceNftId,
|
150
152
|
name,
|
151
153
|
PRODUCT(),
|
@@ -179,17 +181,13 @@ abstract contract Product is
|
|
179
181
|
|
180
182
|
|
181
183
|
function _createRisk(
|
182
|
-
bytes32 id,
|
183
184
|
bytes memory data
|
184
185
|
)
|
185
186
|
internal
|
186
187
|
virtual
|
187
188
|
returns (RiskId riskId)
|
188
189
|
{
|
189
|
-
return _getProductStorage()._riskService.createRisk(
|
190
|
-
id,
|
191
|
-
data
|
192
|
-
);
|
190
|
+
return _getProductStorage()._riskService.createRisk(data);
|
193
191
|
}
|
194
192
|
|
195
193
|
function _updateRisk(
|
@@ -26,20 +26,20 @@ contract RiskService is
|
|
26
26
|
bytes memory data
|
27
27
|
)
|
28
28
|
internal
|
29
|
+
initializer
|
29
30
|
virtual override
|
30
|
-
onlyInitializing()
|
31
31
|
{
|
32
32
|
(
|
33
|
-
address authority
|
34
|
-
|
33
|
+
address authority,
|
34
|
+
address registry
|
35
|
+
) = abi.decode(data, (address, address));
|
35
36
|
|
36
|
-
__Service_init(authority, owner);
|
37
|
+
__Service_init(authority, registry, owner);
|
37
38
|
_registerInterface(type(IRiskService).interfaceId);
|
38
39
|
}
|
39
40
|
|
40
41
|
/// @inheritdoc IRiskService
|
41
42
|
function createRisk(
|
42
|
-
bytes32 id,
|
43
43
|
bytes memory data
|
44
44
|
)
|
45
45
|
external
|
@@ -48,19 +48,15 @@ contract RiskService is
|
|
48
48
|
returns (RiskId riskId)
|
49
49
|
{
|
50
50
|
// checks
|
51
|
-
(NftId productNftId, IInstance instance) =
|
51
|
+
(NftId productNftId, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
52
52
|
|
53
53
|
// effects
|
54
|
-
riskId = RiskIdLib.toRiskId(productNftId, id);
|
55
54
|
IRisk.RiskInfo memory riskInfo = IRisk.RiskInfo({
|
56
55
|
productNftId: productNftId,
|
57
56
|
createdAt: TimestampLib.current(),
|
58
57
|
data: data});
|
59
58
|
|
60
|
-
instance.getProductStore().createRisk(
|
61
|
-
riskId,
|
62
|
-
riskInfo
|
63
|
-
);
|
59
|
+
riskId = instance.getProductStore().createRisk(riskInfo);
|
64
60
|
|
65
61
|
// add risk to RiskSet
|
66
62
|
RiskSet riskSet = instance.getRiskSet();
|
@@ -79,7 +75,7 @@ contract RiskService is
|
|
79
75
|
restricted()
|
80
76
|
{
|
81
77
|
// checks
|
82
|
-
(NftId productNftId, IInstance instance) =
|
78
|
+
(NftId productNftId, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
83
79
|
|
84
80
|
// effects
|
85
81
|
InstanceReader instanceReader = instance.getInstanceReader();
|
@@ -106,7 +102,7 @@ contract RiskService is
|
|
106
102
|
restricted()
|
107
103
|
{
|
108
104
|
// checks
|
109
|
-
(NftId productNftId, IInstance instance) =
|
105
|
+
(NftId productNftId, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
110
106
|
|
111
107
|
if (!instance.getRiskSet().hasRisk(productNftId, riskId)) {
|
112
108
|
revert ErrorRiskServiceUnknownRisk(productNftId, riskId);
|
@@ -118,10 +114,10 @@ contract RiskService is
|
|
118
114
|
|
119
115
|
if (locked) {
|
120
116
|
instance.getRiskSet().deactivate(riskId);
|
121
|
-
emit LogRiskServiceRiskLocked(productNftId, riskId);
|
117
|
+
emit LogRiskServiceRiskLocked(productNftId, riskId, true);
|
122
118
|
} else {
|
123
119
|
instance.getRiskSet().activate(riskId);
|
124
|
-
emit
|
120
|
+
emit LogRiskServiceRiskLocked(productNftId, riskId, false);
|
125
121
|
}
|
126
122
|
}
|
127
123
|
|
@@ -134,7 +130,7 @@ contract RiskService is
|
|
134
130
|
restricted()
|
135
131
|
{
|
136
132
|
// checks
|
137
|
-
(NftId productNftId, IInstance instance) =
|
133
|
+
(NftId productNftId, IInstance instance) = _getAndVerifyActiveComponent(PRODUCT());
|
138
134
|
(bool exists, bool active) = instance.getRiskSet().checkRisk(productNftId, riskId);
|
139
135
|
|
140
136
|
if (!exists) {
|
@@ -151,6 +147,37 @@ contract RiskService is
|
|
151
147
|
emit LogRiskServiceRiskClosed(productNftId, riskId);
|
152
148
|
}
|
153
149
|
|
150
|
+
function _getAndVerifyActiveComponent(ObjectType expectedType)
|
151
|
+
internal
|
152
|
+
view
|
153
|
+
returns (
|
154
|
+
NftId componentNftId,
|
155
|
+
IInstance instance
|
156
|
+
)
|
157
|
+
{
|
158
|
+
IRegistry.ObjectInfo memory info;
|
159
|
+
address instanceAddress;
|
160
|
+
bool isActive = true;
|
161
|
+
|
162
|
+
if (expectedType != COMPONENT()) {
|
163
|
+
(info, instanceAddress) = ContractLib.getAndVerifyComponent(
|
164
|
+
getRegistry(),
|
165
|
+
msg.sender, // caller
|
166
|
+
expectedType,
|
167
|
+
isActive);
|
168
|
+
} else {
|
169
|
+
(info, instanceAddress) = ContractLib.getAndVerifyAnyComponent(
|
170
|
+
getRegistry(),
|
171
|
+
msg.sender,
|
172
|
+
isActive);
|
173
|
+
}
|
174
|
+
|
175
|
+
// get component nft id and instance
|
176
|
+
componentNftId = info.nftId;
|
177
|
+
instance = IInstance(instanceAddress);
|
178
|
+
}
|
179
|
+
|
180
|
+
|
154
181
|
function _getDomain() internal pure override returns(ObjectType) {
|
155
182
|
return RISK();
|
156
183
|
}
|
@@ -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 {RiskService} from "./RiskService.sol";
|
7
7
|
|
@@ -12,17 +12,19 @@ contract RiskServiceManager is ProxyManager {
|
|
12
12
|
/// @dev initializes proxy manager with product service implementation
|
13
13
|
constructor(
|
14
14
|
address authority,
|
15
|
+
address registry,
|
15
16
|
bytes32 salt
|
16
17
|
)
|
17
18
|
{
|
18
19
|
RiskService svc = new RiskService{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
|
-
_riskService = RiskService(address(
|
27
|
+
_riskService = RiskService(address(versionable));
|
26
28
|
}
|
27
29
|
|
28
30
|
//--- view functions ----------------------------------------------------//
|
@@ -4,14 +4,15 @@ pragma solidity ^0.8.20;
|
|
4
4
|
import {ERC721, ERC721Enumerable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
|
5
5
|
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
|
6
6
|
|
7
|
+
import {ChainId, ChainIdLib} from "../type/ChainId.sol";
|
7
8
|
import {ITransferInterceptor} from "./ITransferInterceptor.sol";
|
8
9
|
|
9
10
|
contract ChainNft is ERC721Enumerable {
|
10
11
|
|
11
|
-
event LogTokenInterceptorAddress(uint256 tokenId, address interceptor);
|
12
|
+
event LogTokenInterceptorAddress(uint256 indexed tokenId, address indexed interceptor);
|
12
13
|
|
13
14
|
// constants
|
14
|
-
string public constant NAME = "
|
15
|
+
string public constant NAME = "Decentralized Insurance Protocol NFT";
|
15
16
|
string public constant SYMBOL = "DIPNFT";
|
16
17
|
|
17
18
|
uint256 public constant PROTOCOL_NFT_ID = 1101;
|
@@ -53,7 +54,7 @@ contract ChainNft is ERC721Enumerable {
|
|
53
54
|
// NFT contract is deployed by the registry
|
54
55
|
_registry = registry;
|
55
56
|
|
56
|
-
_chainIdDigits = _calculateChainIdDigits(block.chainid);
|
57
|
+
_chainIdDigits = _calculateChainIdDigits(ChainIdLib.toChainId(block.chainid));
|
57
58
|
_chainIdMultiplier = 10 ** _chainIdDigits;
|
58
59
|
|
59
60
|
// the first object registered through normal registration starts with id 4
|
@@ -200,12 +201,12 @@ contract ChainNft is ERC721Enumerable {
|
|
200
201
|
* (42 * 10 ** 10 + 9876543210) * 100 + 10
|
201
202
|
* (index * 10 ** digits + chainid) * 100 + digits (1 < digits < 100)
|
202
203
|
*/
|
203
|
-
function calculateTokenId(uint256 idIndex,
|
204
|
-
if(chainId == block.chainid) {
|
205
|
-
return 100 * (idIndex * _chainIdMultiplier + chainId) + _chainIdDigits;
|
204
|
+
function calculateTokenId(uint256 idIndex, ChainId chainId) public view returns (uint256 id) {
|
205
|
+
if(chainId.toInt() == block.chainid) {
|
206
|
+
return 100 * (idIndex * _chainIdMultiplier + chainId.toInt()) + _chainIdDigits;
|
206
207
|
} else {
|
207
208
|
uint256 chainIdDigits = _calculateChainIdDigits(chainId);
|
208
|
-
return 100 * (idIndex * (10 ** chainIdDigits) + chainId) + chainIdDigits;
|
209
|
+
return 100 * (idIndex * (10 ** chainIdDigits) + chainId.toInt()) + chainIdDigits;
|
209
210
|
}
|
210
211
|
}
|
211
212
|
|
@@ -224,8 +225,8 @@ contract ChainNft is ERC721Enumerable {
|
|
224
225
|
_idNext++;
|
225
226
|
}
|
226
227
|
|
227
|
-
function _calculateChainIdDigits(
|
228
|
-
uint256 num = chainId;
|
228
|
+
function _calculateChainIdDigits(ChainId chainId) private pure returns (uint256) {
|
229
|
+
uint256 num = chainId.toInt();
|
229
230
|
uint256 digits = 0;
|
230
231
|
while (num != 0) {
|
231
232
|
digits++;
|
@@ -5,6 +5,7 @@ import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
|
|
5
5
|
|
6
6
|
import {IRelease} from "./IRelease.sol";
|
7
7
|
|
8
|
+
import {ChainId} from "../type/ChainId.sol";
|
8
9
|
import {NftId} from "../type/NftId.sol";
|
9
10
|
import {ObjectType} from "../type/ObjectType.sol";
|
10
11
|
import {VersionPart} from "../type/Version.sol";
|
@@ -19,9 +20,9 @@ interface IRegistry is
|
|
19
20
|
IERC165
|
20
21
|
{
|
21
22
|
|
22
|
-
event LogRegistryObjectRegistered(NftId nftId, NftId parentNftId, ObjectType objectType,
|
23
|
-
event LogRegistryServiceRegistered(VersionPart
|
24
|
-
event LogRegistryChainRegistryRegistered(NftId nftId,
|
23
|
+
event LogRegistryObjectRegistered(NftId indexed nftId, NftId indexed parentNftId, ObjectType indexed objectType, bool isInterceptor, address objectAddress, address initialOwner);
|
24
|
+
event LogRegistryServiceRegistered(NftId indexed nftId, VersionPart indexed majorVersion, ObjectType indexed domain);
|
25
|
+
event LogRegistryChainRegistryRegistered(NftId indexed nftId, ChainId indexed chainId, address indexed chainRegistryAddress);
|
25
26
|
|
26
27
|
// initialize
|
27
28
|
error ErrorRegistryCallerNotDeployer();
|
@@ -30,11 +31,11 @@ interface IRegistry is
|
|
30
31
|
error ErrorRegistryObjectTypeNotSupported(ObjectType objectType);
|
31
32
|
|
32
33
|
// registerRegistry()
|
33
|
-
error ErrorRegistryNotOnMainnet(
|
34
|
+
error ErrorRegistryNotOnMainnet(ChainId chainId);
|
34
35
|
error ErrorRegistryChainRegistryChainIdZero(NftId nftId);
|
35
|
-
error ErrorRegistryChainRegistryAddressZero(NftId nftId,
|
36
|
-
error ErrorRegistryChainRegistryNftIdInvalid(NftId nftId,
|
37
|
-
error ErrorRegistryChainRegistryAlreadyRegistered(NftId nftId,
|
36
|
+
error ErrorRegistryChainRegistryAddressZero(NftId nftId, ChainId chainId);
|
37
|
+
error ErrorRegistryChainRegistryNftIdInvalid(NftId nftId, ChainId chainId);
|
38
|
+
error ErrorRegistryChainRegistryAlreadyRegistered(NftId nftId, ChainId chainId);
|
38
39
|
|
39
40
|
// registerService()
|
40
41
|
error ErrorRegistryServiceAddressZero();
|
@@ -49,7 +50,6 @@ interface IRegistry is
|
|
49
50
|
error ErrorRegistryCoreTypeRegistration();
|
50
51
|
|
51
52
|
// _register()
|
52
|
-
error ErrorRegistryReleaseMismatch(VersionPart objectrelease, VersionPart parentRelease, VersionPart senderRelease);
|
53
53
|
error ErrorRegistryGlobalRegistryAsParent(address objectAddress, ObjectType objectType);
|
54
54
|
error ErrorRegistryTypeCombinationInvalid(address objectAddress, ObjectType objectType, ObjectType parentType);
|
55
55
|
error ErrorRegistryContractAlreadyRegistered(address objectAddress);
|
@@ -59,41 +59,42 @@ interface IRegistry is
|
|
59
59
|
NftId nftId;
|
60
60
|
NftId parentNftId;
|
61
61
|
ObjectType objectType;
|
62
|
-
VersionPart release;
|
63
62
|
bool isInterceptor;
|
64
63
|
// slot 1
|
65
64
|
address objectAddress;
|
65
|
+
// slot 2
|
66
|
+
address initialOwner;
|
67
|
+
// slot 3
|
68
|
+
bytes data;
|
66
69
|
}
|
67
70
|
|
68
71
|
/// @dev Registers a registry contract for a specified chain.
|
69
72
|
/// Only one chain registry may be registered per chain
|
70
73
|
function registerRegistry(
|
71
74
|
NftId nftId,
|
72
|
-
|
73
|
-
address chainRegistryAddress
|
74
|
-
VersionPart release
|
75
|
+
ChainId chainId,
|
76
|
+
address chainRegistryAddress
|
75
77
|
) external;
|
76
78
|
|
77
79
|
/// @dev Register a service with using the provided domain and version.
|
78
80
|
/// The function returns a newly minted service NFT ID.
|
79
81
|
/// May only be used to register services.
|
80
82
|
function registerService(
|
81
|
-
ObjectInfo memory
|
82
|
-
|
83
|
-
ObjectType
|
84
|
-
bytes memory data
|
83
|
+
ObjectInfo memory serviceInfo,
|
84
|
+
VersionPart serviceVersion,
|
85
|
+
ObjectType serviceDomain
|
85
86
|
) external returns(NftId nftId);
|
86
87
|
|
87
88
|
/// @dev Register an object with a known core type.
|
88
89
|
/// The function returns a newly minted object NFT ID.
|
89
90
|
/// May not be used to register services.
|
90
|
-
function register(ObjectInfo memory info
|
91
|
+
function register(ObjectInfo memory info) external returns (NftId nftId);
|
91
92
|
|
92
93
|
/// @dev Register an object with a custom type.
|
93
94
|
/// The function returns a newly minted object NFT ID.
|
94
95
|
/// This function is reserved for GIF releases > 3.
|
95
96
|
/// May not be used to register known core types.
|
96
|
-
function registerWithCustomType(ObjectInfo memory info
|
97
|
+
function registerWithCustomType(ObjectInfo memory info) external returns (NftId nftId);
|
97
98
|
|
98
99
|
function getInitialRelease() external view returns (VersionPart);
|
99
100
|
|
@@ -107,10 +108,10 @@ interface IRegistry is
|
|
107
108
|
function chainIds() external view returns (uint256);
|
108
109
|
|
109
110
|
/// @dev Returns the chain id at the specified index.
|
110
|
-
function getChainId(uint256 idx) external view returns (
|
111
|
+
function getChainId(uint256 idx) external view returns (ChainId);
|
111
112
|
|
112
113
|
/// @dev Returns the NFT ID of the registry for the specified chain.
|
113
|
-
function getRegistryNftId(
|
114
|
+
function getRegistryNftId(ChainId chainId) external returns (NftId nftId);
|
114
115
|
|
115
116
|
function getObjectCount() external view returns (uint256);
|
116
117
|
|
@@ -126,15 +127,9 @@ interface IRegistry is
|
|
126
127
|
|
127
128
|
function getParentNftId(NftId nftId) external view returns (NftId parentNftId);
|
128
129
|
|
129
|
-
function
|
130
|
+
function isObjectType(NftId nftId, ObjectType expectedObjectType) external view returns (bool);
|
130
131
|
|
131
|
-
function
|
132
|
-
|
133
|
-
function isObjectType(NftId nftId, ObjectType expectedObjectType, VersionPart expectedRelease) external view returns (bool);
|
134
|
-
|
135
|
-
function isObjectType(address contractAddress, ObjectType expectedObjectType, VersionPart expectedRelease) external view returns (bool);
|
136
|
-
|
137
|
-
function getObjectRelease(NftId nftId) external view returns (VersionPart release);
|
132
|
+
function isObjectType(address contractAddress, ObjectType expectedObjectType) external view returns (bool);
|
138
133
|
|
139
134
|
function getObjectAddress(NftId nftId) external view returns (address objectAddress);
|
140
135
|
|
@@ -19,12 +19,13 @@ interface IRegistryService is
|
|
19
19
|
{
|
20
20
|
error ErrorRegistryServiceNotRegistryOwner();
|
21
21
|
|
22
|
-
|
23
|
-
error
|
24
|
-
error
|
22
|
+
error ErrorRegistryServiceNotService(address notService);
|
23
|
+
error ErrorRegistryServiceNotInstance(address notInstance);
|
24
|
+
error ErrorRegistryServiceNotProduct(address notProduct);
|
25
|
+
error ErrorRegistryServiceNotComponent(address notComponent);
|
26
|
+
error ErrorRegistryServiceNotProductLinkedComponent(address notProductLinkedComponent);
|
25
27
|
|
26
28
|
error ErrorRegistryServiceRegisterableAddressInvalid(IRegisterable registerable, address found);
|
27
|
-
error ErrorRegistryServiceRegisterableParentInvalid(IRegisterable registerable, NftId expected, NftId found);
|
28
29
|
error ErrorRegistryServiceRegisterableTypeInvalid(IRegisterable registerable, ObjectType expected, ObjectType found);
|
29
30
|
error ErrorRegistryServiceRegisterableOwnerInvalid(IRegisterable registerable, address expected, address found);
|
30
31
|
error ErrorRegistryServiceRegisterableOwnerZero(IRegisterable registerable);
|
@@ -39,20 +40,23 @@ interface IRegistryService is
|
|
39
40
|
error ErrorRegistryServiceInvalidInitialOwner(address initialOwner);
|
40
41
|
error ErrorRegistryServiceInvalidAddress(address registerableAddress);
|
41
42
|
|
42
|
-
function registerStake(IRegistry.ObjectInfo memory info
|
43
|
+
function registerStake(IRegistry.ObjectInfo memory info)
|
43
44
|
external returns(NftId nftId);
|
44
45
|
|
45
|
-
function registerInstance(IRegisterable instance, address
|
46
|
+
function registerInstance(IRegisterable instance, address owner)
|
46
47
|
external returns(IRegistry.ObjectInfo memory info);
|
47
48
|
|
48
|
-
function
|
49
|
+
function registerProduct(IComponent product, address owner)
|
49
50
|
external returns(IRegistry.ObjectInfo memory info);
|
50
51
|
|
51
|
-
function
|
52
|
+
function registerProductLinkedComponent(IComponent component, ObjectType objectType, address owner)
|
53
|
+
external returns(IRegistry.ObjectInfo memory info);
|
54
|
+
|
55
|
+
function registerDistributor(IRegistry.ObjectInfo memory info) external returns(NftId nftId);
|
52
56
|
|
53
|
-
function registerPolicy(IRegistry.ObjectInfo memory info
|
57
|
+
function registerPolicy(IRegistry.ObjectInfo memory info) external returns(NftId nftId);
|
54
58
|
|
55
|
-
function registerBundle(IRegistry.ObjectInfo memory info
|
59
|
+
function registerBundle(IRegistry.ObjectInfo memory info) external returns(NftId nftId);
|
56
60
|
|
57
61
|
}
|
58
62
|
|