@etherisc/gif-next 0.0.2-f1fe735-758 → 0.0.2-f2273b3-211
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +59 -9
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +4 -0
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +1007 -0
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +4 -0
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +744 -0
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +4 -0
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +791 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +1379 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.json +24 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +1434 -0
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +542 -0
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.json +10 -0
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/{shared → authorization}/IAccessAdmin.sol/IAccessAdmin.json +211 -270
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +350 -0
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/{registry → authorization}/IServiceAuthorization.sol/IServiceAuthorization.json +29 -10
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +253 -0
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +4 -0
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +1322 -0
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +4 -0
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +589 -0
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +144 -544
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +396 -265
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +147 -109
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +201 -261
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +244 -63
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.json +22 -0
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +1475 -0
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +589 -0
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +2040 -0
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +589 -0
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.json +376 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +1479 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +589 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +1195 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +1655 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +589 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +2426 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +589 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +4 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +851 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +161 -73
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +116 -126
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +190 -211
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +1462 -241
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +661 -0
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +1044 -316
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +135 -330
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +97 -111
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +650 -529
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +4 -0
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +853 -0
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +2 -2
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +48 -7
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +192 -0
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.json +168 -0
- 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 +4 -0
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +959 -0
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +569 -0
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.json +43 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +141 -126
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +69 -11
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +127 -398
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +153 -190
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +122 -88
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +4 -0
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +1252 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +589 -0
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +331 -204
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +143 -97
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +206 -29
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +132 -379
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +464 -312
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +124 -662
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.dbg.json +4 -0
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +456 -0
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +653 -532
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +163 -97
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +134 -184
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +91 -93
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +4 -0
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +1161 -0
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +589 -0
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +415 -234
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +140 -114
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +94 -9
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +308 -16
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +365 -104
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +136 -83
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +260 -237
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +4 -0
- package/artifacts/contracts/product/{IProductService.sol/IProductService.json → IRiskService.sol/IRiskService.json} +57 -4
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +459 -309
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +4 -0
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +293 -0
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +141 -99
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +230 -312
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +120 -122
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +258 -536
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +4 -0
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +637 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +4 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +724 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +59 -16
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +359 -55
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +72 -152
- package/artifacts/contracts/registry/IRelease.sol/IRelease.dbg.json +4 -0
- package/artifacts/contracts/registry/IRelease.sol/IRelease.json +24 -0
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +5 -18
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +585 -112
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +449 -422
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +109 -292
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +94 -80
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +1849 -0
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +48 -7
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +1333 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +82 -16
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +5 -5
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +76 -265
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +576 -516
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +137 -113
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +57 -111
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +541 -0
- 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 +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.json +30 -0
- 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/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +89 -88
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +547 -224
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +127 -123
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.json +36 -0
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.json +36 -0
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +16 -0
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +15 -47
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +148 -0
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.json +55 -2
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +4 -0
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.json +53 -0
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +112 -351
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.json +42 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.json +42 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +4 -0
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.json +306 -0
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +22 -57
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +19 -141
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +122 -97
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -15
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/Service.sol/Service.json +57 -111
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +585 -12
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +4 -0
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +484 -0
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +4 -0
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +172 -0
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +137 -139
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +130 -16
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +85 -105
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +216 -375
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +48 -7
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +126 -95
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +7 -63
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +183 -164
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +103 -85
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +181 -135
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +59 -23
- 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 +61 -8
- 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/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +28 -4
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +4 -4
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.json +17 -12
- 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 +4 -0
- package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.json +33 -0
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.json +23 -4
- 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 +55 -2
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +19 -19
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +4 -4
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +4 -4
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +118 -5
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +181 -14
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +50 -2
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.json +21 -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 +15 -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 +23 -4
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +71 -2
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.json +2 -21
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.json +66 -2
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/IVersionable.sol/IVersionable.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +618 -0
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/Versionable.sol/Versionable.json +1 -1
- package/contracts/accounting/AccountingService.sol +262 -0
- package/contracts/accounting/AccountingServiceManager.sol +38 -0
- package/contracts/accounting/IAccountingService.sol +45 -0
- package/contracts/{shared → authorization}/AccessAdmin.sol +310 -380
- package/contracts/authorization/AccessManagerCloneable.sol +149 -0
- package/contracts/authorization/Authorization.sol +337 -0
- package/contracts/authorization/IAccess.sol +49 -0
- package/contracts/{shared → authorization}/IAccessAdmin.sol +37 -62
- package/contracts/authorization/IAuthorization.sol +74 -0
- package/contracts/{registry → authorization}/IServiceAuthorization.sol +8 -6
- package/contracts/{registry → authorization}/ServiceAuthorization.sol +41 -25
- package/contracts/distribution/BasicDistribution.sol +141 -0
- package/contracts/distribution/BasicDistributionAuthorization.sol +60 -0
- package/contracts/distribution/Distribution.sol +153 -125
- package/contracts/distribution/DistributionService.sol +172 -111
- package/contracts/distribution/DistributionServiceManager.sol +8 -11
- package/contracts/distribution/IDistributionComponent.sol +26 -40
- package/contracts/distribution/IDistributionService.sol +42 -22
- package/contracts/examples/fire/DamageLevel.sol +59 -0
- package/contracts/examples/fire/FirePool.sol +90 -0
- package/contracts/examples/fire/FirePoolAuthorization.sol +35 -0
- package/contracts/examples/fire/FireProduct.sol +438 -0
- package/contracts/examples/fire/FireProductAuthorization.sol +45 -0
- package/contracts/examples/fire/FireUSD.sol +26 -0
- package/contracts/examples/unpermissioned/SimpleDistribution.sol +57 -0
- package/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol +28 -0
- package/contracts/examples/unpermissioned/SimpleOracle.sol +137 -0
- package/contracts/examples/unpermissioned/SimplePool.sol +106 -0
- package/contracts/examples/unpermissioned/SimplePoolAuthorization.sol +28 -0
- package/contracts/examples/unpermissioned/SimpleProduct.sol +377 -0
- package/contracts/examples/unpermissioned/SimpleProductAuthorization.sol +28 -0
- package/contracts/instance/BundleSet.sol +130 -0
- package/contracts/instance/IInstance.sol +27 -44
- package/contracts/instance/IInstanceService.sol +16 -41
- package/contracts/instance/Instance.sol +103 -119
- package/contracts/instance/InstanceAdmin.sol +346 -240
- package/contracts/instance/InstanceAuthorizationV3.sol +213 -0
- package/contracts/instance/InstanceReader.sol +293 -48
- package/contracts/instance/InstanceService.sol +145 -180
- package/contracts/instance/InstanceServiceManager.sol +8 -13
- package/contracts/instance/InstanceStore.sol +29 -3
- package/contracts/instance/RiskSet.sol +118 -0
- package/contracts/instance/base/ObjectCounter.sol +1 -2
- package/contracts/instance/base/ObjectLifecycle.sol +11 -4
- package/contracts/instance/base/ObjectSet.sol +77 -0
- package/contracts/instance/base/ObjectSetHelperLib.sol +30 -0
- package/contracts/instance/module/IBundle.sol +1 -1
- package/contracts/instance/module/IComponents.sol +14 -15
- package/contracts/instance/module/IDistribution.sol +2 -2
- package/contracts/instance/module/IPolicy.sol +26 -25
- package/contracts/instance/module/IRisk.sol +3 -0
- package/contracts/mock/Dip.sol +1 -1
- package/contracts/oracle/BasicOracle.sol +47 -0
- package/contracts/oracle/BasicOracleAuthorization.sol +37 -0
- package/contracts/oracle/IOracle.sol +16 -0
- package/contracts/oracle/IOracleComponent.sol +2 -1
- package/contracts/oracle/IOracleService.sol +2 -1
- package/contracts/oracle/Oracle.sol +64 -53
- package/contracts/oracle/OracleService.sol +113 -81
- package/contracts/oracle/OracleServiceManager.sol +8 -11
- package/contracts/pool/BasicPool.sol +175 -0
- package/contracts/pool/BasicPoolAuthorization.sol +76 -0
- package/contracts/pool/BundleService.sol +204 -105
- package/contracts/pool/BundleServiceManager.sol +8 -11
- package/contracts/pool/IBundleService.sol +31 -22
- package/contracts/pool/IPoolComponent.sol +20 -70
- package/contracts/pool/IPoolService.sol +90 -75
- package/contracts/pool/Pool.sol +209 -163
- package/contracts/pool/PoolLib.sol +216 -0
- package/contracts/pool/PoolService.sol +546 -241
- package/contracts/pool/PoolServiceManager.sol +6 -9
- package/contracts/product/ApplicationService.sol +83 -78
- package/contracts/product/ApplicationServiceManager.sol +6 -6
- package/contracts/product/BasicProduct.sol +51 -0
- package/contracts/product/BasicProductAuthorization.sol +56 -0
- package/contracts/product/ClaimService.sol +365 -175
- package/contracts/product/ClaimServiceManager.sol +6 -6
- package/contracts/product/IApplicationService.sol +6 -2
- package/contracts/product/IClaimService.sol +44 -8
- package/contracts/product/IPolicyService.sol +53 -36
- package/contracts/product/IPricingService.sol +10 -10
- package/contracts/product/IProductComponent.sol +29 -9
- package/contracts/product/{IProductService.sol → IRiskService.sol} +1 -1
- package/contracts/product/PolicyService.sol +476 -269
- package/contracts/product/PolicyServiceLib.sol +65 -0
- package/contracts/product/PolicyServiceManager.sol +6 -9
- package/contracts/product/PricingService.sol +66 -62
- package/contracts/product/PricingServiceManager.sol +6 -9
- package/contracts/product/Product.sol +233 -132
- package/contracts/product/RiskService.sol +145 -0
- package/contracts/product/RiskServiceManager.sol +39 -0
- package/contracts/registry/ChainNft.sol +72 -40
- package/contracts/registry/IRegistry.sol +74 -32
- package/contracts/registry/IRegistryService.sol +3 -10
- package/contracts/registry/IRelease.sol +26 -0
- package/contracts/registry/ITransferInterceptor.sol +1 -2
- package/contracts/registry/Registry.sol +368 -220
- package/contracts/registry/RegistryAdmin.sol +238 -219
- package/contracts/registry/RegistryService.sol +41 -66
- package/contracts/registry/RegistryServiceManager.sol +5 -5
- package/contracts/registry/ReleaseAdmin.sol +245 -0
- package/contracts/registry/ReleaseLifecycle.sol +8 -3
- package/contracts/registry/ReleaseRegistry.sol +511 -0
- package/contracts/registry/ServiceAuthorizationV3.sol +107 -60
- package/contracts/registry/TokenRegistry.sol +8 -10
- package/contracts/shared/Component.sol +74 -128
- package/contracts/shared/ComponentService.sol +456 -384
- package/contracts/shared/ComponentServiceManager.sol +10 -7
- package/contracts/shared/ComponentVerifyingService.sol +29 -18
- package/contracts/shared/ContractLib.sol +253 -0
- package/contracts/shared/IComponent.sol +8 -17
- package/contracts/shared/IComponentService.sol +49 -39
- package/contracts/shared/IInstanceLinkedComponent.sol +10 -26
- package/contracts/shared/ILifecycle.sol +3 -1
- package/contracts/shared/INftOwnable.sol +2 -0
- package/contracts/shared/IPolicyHolder.sol +12 -22
- package/contracts/shared/IRegisterable.sol +23 -1
- package/contracts/shared/IService.sol +4 -6
- package/contracts/shared/{ERC165.sol → InitializableERC165.sol} +3 -3
- package/contracts/shared/InstanceLinkedComponent.sol +96 -43
- package/contracts/shared/KeyValueStore.sol +1 -1
- package/contracts/shared/Lifecycle.sol +15 -4
- package/contracts/shared/{NftIdSetManager.sol → NftIdSet.sol} +1 -1
- package/contracts/shared/NftOwnable.sol +31 -11
- package/contracts/shared/PolicyHolder.sol +17 -57
- package/contracts/shared/Registerable.sol +55 -21
- package/contracts/shared/RegistryLinked.sol +9 -14
- package/contracts/shared/Service.sol +18 -36
- package/contracts/shared/TokenHandler.sol +309 -26
- package/contracts/shared/TokenHandlerDeployerLib.sol +20 -0
- package/contracts/staking/IStaking.sol +9 -13
- package/contracts/staking/IStakingService.sol +24 -9
- package/contracts/staking/StakeManagerLib.sol +85 -43
- package/contracts/staking/Staking.sol +96 -79
- package/contracts/staking/StakingManager.sol +10 -12
- package/contracts/staking/StakingReader.sol +21 -33
- package/contracts/staking/StakingService.sol +79 -37
- package/contracts/staking/StakingServiceManager.sol +8 -7
- package/contracts/staking/StakingStore.sol +12 -22
- package/contracts/staking/TargetManagerLib.sol +7 -3
- package/contracts/type/Amount.sol +27 -5
- package/contracts/type/Blocknumber.sol +7 -1
- package/contracts/type/ClaimId.sol +6 -1
- package/contracts/type/Key32.sol +2 -2
- package/contracts/type/Key32Set.sol +62 -0
- package/contracts/type/NftId.sol +7 -0
- package/contracts/type/ObjectType.sol +89 -27
- package/contracts/type/PayoutId.sol +10 -10
- package/contracts/type/Referral.sol +1 -0
- package/contracts/type/RiskId.sol +35 -4
- package/contracts/type/RoleId.sol +75 -94
- package/contracts/type/Seconds.sol +21 -1
- package/contracts/type/Selector.sol +5 -0
- package/contracts/type/StateId.sol +15 -1
- package/contracts/type/Timestamp.sol +10 -5
- package/contracts/type/UFixed.sol +40 -121
- package/contracts/type/Version.sol +18 -6
- package/contracts/{shared → upgradeability}/ProxyManager.sol +71 -38
- package/contracts/{shared → upgradeability}/UpgradableProxyWithAdmin.sol +1 -3
- package/contracts/{shared → upgradeability}/Versionable.sol +2 -2
- package/package.json +6 -5
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +0 -4
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +0 -709
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.dbg.json +0 -4
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.json +0 -228
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.dbg.json +0 -4
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.json +0 -187
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +0 -4
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +0 -129
- package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +0 -4
- package/artifacts/contracts/product/ProductService.sol/ProductService.dbg.json +0 -4
- package/artifacts/contracts/product/ProductService.sol/ProductService.json +0 -708
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +0 -4
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +0 -702
- package/artifacts/contracts/registry/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +0 -1177
- package/artifacts/contracts/registry/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +0 -4
- package/artifacts/contracts/registry/ServiceAuthorization.sol/ServiceAuthorization.json +0 -190
- package/artifacts/contracts/shared/AccessAdmin.sol/AccessAdmin.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessAdmin.sol/AccessAdmin.json +0 -1559
- package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.json +0 -1193
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.json +0 -1747
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.json +0 -1760
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.json +0 -1838
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.json +0 -1856
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +0 -4
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +0 -73
- package/artifacts/contracts/shared/IAccessAdmin.sol/IAccessAdmin.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.json +0 -1562
- package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.json +0 -1600
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +0 -4
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.dbg.json +0 -4
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.json +0 -39
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.dbg.json +0 -4
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.json +0 -306
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +0 -4
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +0 -617
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +0 -4
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +0 -129
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +0 -4
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +0 -4
- package/artifacts/contracts/type/UFixed.sol/MathLib.json +0 -10
- package/contracts/instance/BundleManager.sol +0 -126
- package/contracts/instance/InstanceAuthorizationsLib.sol +0 -377
- package/contracts/instance/base/ObjectManager.sol +0 -80
- package/contracts/instance/module/IAccess.sol +0 -46
- package/contracts/product/ProductService.sol +0 -124
- package/contracts/product/ProductServiceManager.sol +0 -42
- package/contracts/registry/ReleaseManager.sol +0 -503
- package/contracts/shared/AccessManagerCustom.sol +0 -741
- package/contracts/shared/AccessManagerExtended.sol +0 -481
- package/contracts/shared/AccessManagerExtendedInitializeable.sol +0 -13
- package/contracts/shared/AccessManagerExtendedWithDisable.sol +0 -137
- package/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol +0 -14
- package/contracts/shared/IAccessManagerExtended.sol +0 -74
- package/contracts/shared/IAccessManagerExtendedWithDisable.sol +0 -18
- package/contracts/shared/InitializableCustom.sol +0 -177
- /package/contracts/{shared → upgradeability}/IVersionable.sol +0 -0
package/contracts/pool/Pool.sol
CHANGED
@@ -2,19 +2,22 @@
|
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
4
|
import {Amount, AmountLib} from "../type/Amount.sol";
|
5
|
-
import {
|
6
|
-
import {
|
5
|
+
import {BUNDLE, COMPONENT, POLICY, POOL} from "../type/ObjectType.sol";
|
6
|
+
import {ClaimId} from "../type/ClaimId.sol";
|
7
7
|
import {IBundleService} from "./IBundleService.sol";
|
8
|
+
import {IAuthorization} from "../authorization/IAuthorization.sol";
|
8
9
|
import {IPoolComponent} from "./IPoolComponent.sol";
|
9
10
|
import {IPoolService} from "./IPoolService.sol";
|
10
11
|
import {IComponents} from "../instance/module/IComponents.sol";
|
11
12
|
import {IComponentService} from "../shared/IComponentService.sol";
|
12
|
-
import {
|
13
|
-
import {
|
13
|
+
import {InstanceLinkedComponent} from "../shared/InstanceLinkedComponent.sol";
|
14
|
+
import {InstanceReader} from "../instance/InstanceReader.sol";
|
15
|
+
import {Fee} from "../type/Fee.sol";
|
16
|
+
import {NftId} from "../type/NftId.sol";
|
14
17
|
import {RoleId, PUBLIC_ROLE} from "../type/RoleId.sol";
|
15
18
|
import {Seconds} from "../type/Seconds.sol";
|
16
|
-
import {
|
17
|
-
import {UFixed
|
19
|
+
import {Timestamp} from "../type/Timestamp.sol";
|
20
|
+
import {UFixed} from "../type/UFixed.sol";
|
18
21
|
|
19
22
|
abstract contract Pool is
|
20
23
|
InstanceLinkedComponent,
|
@@ -24,6 +27,7 @@ abstract contract Pool is
|
|
24
27
|
bytes32 public constant POOL_STORAGE_LOCATION_V1 = 0x25e3e51823fbfffb988e0a2744bb93722d9f3e906c07cc0a9e77884c46c58300;
|
25
28
|
|
26
29
|
struct PoolStorage {
|
30
|
+
IComponents.PoolInfo _poolInfo;
|
27
31
|
IComponentService _componentService;
|
28
32
|
IPoolService _poolService;
|
29
33
|
IBundleService _bundleService;
|
@@ -38,256 +42,298 @@ abstract contract Pool is
|
|
38
42
|
}
|
39
43
|
|
40
44
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
}
|
45
|
-
_;
|
45
|
+
// TODO remove function once this is no longer used to produce contract locations on the fly ...
|
46
|
+
function getContractLocation(bytes memory name) external pure returns (bytes32 hash) {
|
47
|
+
return keccak256(abi.encode(uint256(keccak256(name)) - 1)) & ~bytes32(uint256(0xff));
|
46
48
|
}
|
47
49
|
|
48
50
|
|
49
|
-
|
50
|
-
|
51
|
-
NftId
|
52
|
-
|
53
|
-
|
54
|
-
bool isInterceptingNftTransfers,
|
55
|
-
address initialOwner,
|
56
|
-
bytes memory registryData, // writeonly data that will saved in the object info record of the registry
|
57
|
-
bytes memory componentData // component specifidc data
|
51
|
+
/// @dev see {IPoolComponent.verifyApplication}
|
52
|
+
function verifyApplication(
|
53
|
+
NftId applicationNftId,
|
54
|
+
NftId bundleNftId,
|
55
|
+
Amount collateralizationAmount
|
58
56
|
)
|
59
57
|
public
|
60
58
|
virtual
|
61
|
-
|
59
|
+
restricted()
|
60
|
+
onlyNftOfType(applicationNftId, POLICY())
|
62
61
|
{
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
62
|
+
InstanceReader reader = _getInstanceReader();
|
63
|
+
if(!applicationMatchesBundle(
|
64
|
+
applicationNftId,
|
65
|
+
reader.getPolicyInfo(applicationNftId).applicationData,
|
66
|
+
bundleNftId,
|
67
|
+
reader.getBundleInfo(bundleNftId).filter,
|
68
|
+
collateralizationAmount)
|
69
|
+
)
|
70
|
+
{
|
71
|
+
revert ErrorPoolApplicationBundleMismatch(applicationNftId);
|
72
|
+
}
|
69
73
|
|
70
|
-
|
74
|
+
emit LogPoolVerifiedByPool(address(this), applicationNftId, collateralizationAmount);
|
71
75
|
}
|
72
76
|
|
73
77
|
|
74
|
-
|
75
|
-
|
78
|
+
/// @dev see {IPoolComponent.processConfirmedClaim}
|
79
|
+
function processConfirmedClaim(
|
80
|
+
NftId policyNftId,
|
81
|
+
ClaimId claimId,
|
82
|
+
Amount amount
|
83
|
+
)
|
84
|
+
public
|
76
85
|
virtual
|
77
|
-
|
86
|
+
restricted()
|
87
|
+
onlyNftOfType(policyNftId, POLICY())
|
78
88
|
{
|
79
|
-
|
89
|
+
// default implementation is empty
|
80
90
|
}
|
81
91
|
|
82
92
|
|
83
|
-
|
93
|
+
/// @dev see {IPoolComponent.applicationMatchesBundle}
|
94
|
+
/// Default implementation always returns true.
|
95
|
+
/// Override this function to implement any custom application verification.
|
96
|
+
/// Calling super.applicationMatchesBundle will ensure validation of application and bundle nft ids.
|
97
|
+
function applicationMatchesBundle(
|
98
|
+
NftId applicationNftId,
|
99
|
+
bytes memory applicationData,
|
84
100
|
NftId bundleNftId,
|
85
|
-
|
101
|
+
bytes memory bundleFilter,
|
102
|
+
Amount collateralizationAmount
|
86
103
|
)
|
87
104
|
public
|
88
105
|
virtual
|
89
|
-
|
90
|
-
|
106
|
+
view
|
107
|
+
onlyNftOfType(applicationNftId, POLICY())
|
108
|
+
onlyNftOfType(bundleNftId, BUNDLE())
|
109
|
+
returns (bool isMatching)
|
91
110
|
{
|
92
|
-
|
111
|
+
return true;
|
93
112
|
}
|
94
113
|
|
95
114
|
|
96
|
-
function
|
97
|
-
|
98
|
-
|
115
|
+
function getInitialPoolInfo()
|
116
|
+
public
|
117
|
+
virtual
|
118
|
+
view
|
119
|
+
returns (IComponents.PoolInfo memory poolInfo)
|
120
|
+
{
|
121
|
+
return _getPoolStorage()._poolInfo;
|
122
|
+
}
|
123
|
+
|
124
|
+
// Internals
|
125
|
+
|
126
|
+
function _initializePool(
|
127
|
+
address registry,
|
128
|
+
NftId productNftId,
|
129
|
+
string memory name,
|
130
|
+
address token,
|
131
|
+
IComponents.PoolInfo memory poolInfo,
|
132
|
+
IAuthorization authorization,
|
133
|
+
address initialOwner,
|
134
|
+
bytes memory componentData // component specifidc data
|
99
135
|
)
|
100
|
-
|
136
|
+
internal
|
101
137
|
virtual
|
102
|
-
|
103
|
-
onlyBundleOwner(bundleNftId)
|
138
|
+
onlyInitializing()
|
104
139
|
{
|
105
|
-
|
140
|
+
_initializeInstanceLinkedComponent(
|
141
|
+
registry,
|
142
|
+
productNftId,
|
143
|
+
name,
|
144
|
+
token,
|
145
|
+
POOL(),
|
146
|
+
authorization,
|
147
|
+
poolInfo.isInterceptingBundleTransfers,
|
148
|
+
initialOwner,
|
149
|
+
componentData);
|
150
|
+
|
151
|
+
PoolStorage storage $ = _getPoolStorage();
|
152
|
+
|
153
|
+
$._poolInfo = poolInfo;
|
154
|
+
$._poolService = IPoolService(_getServiceAddress(POOL()));
|
155
|
+
$._bundleService = IBundleService(_getServiceAddress(BUNDLE()));
|
156
|
+
$._componentService = IComponentService(_getServiceAddress(COMPONENT()));
|
157
|
+
|
158
|
+
_registerInterface(type(IPoolComponent).interfaceId);
|
106
159
|
}
|
107
160
|
|
108
161
|
|
109
|
-
|
110
|
-
|
111
|
-
|
162
|
+
/// @dev Update pool fees to the specified values.
|
163
|
+
/// Pool fee: are deducted from the premium amount and goes to the pool owner.
|
164
|
+
/// Staking fee: are deducted from the staked tokens by a bundle owner and goes to the pool owner.
|
165
|
+
/// Performance fee: when a bundle is closed a bundle specific profit is calculated.
|
166
|
+
/// The performance fee is deducted from this profit and goes to the pool owner.
|
167
|
+
function _setPoolFees(
|
168
|
+
Fee memory poolFee,
|
169
|
+
Fee memory stakingFee,
|
170
|
+
Fee memory performanceFee
|
112
171
|
)
|
113
|
-
|
172
|
+
internal
|
114
173
|
virtual
|
115
|
-
restricted()
|
116
|
-
onlyBundleOwner(bundleNftId)
|
117
174
|
{
|
118
|
-
|
175
|
+
_getPoolStorage()._componentService.setPoolFees(poolFee, stakingFee, performanceFee);
|
119
176
|
}
|
120
177
|
|
121
178
|
|
122
|
-
|
123
|
-
|
179
|
+
/// @dev Sets the maximum balance amound held by this pool.
|
180
|
+
/// Function may only be called by pool owner.
|
181
|
+
function _setMaxBalanceAmount(Amount maxBalanceAmount)
|
182
|
+
internal
|
124
183
|
virtual
|
125
|
-
//restricted() // TODO consider adding this back
|
126
|
-
onlyBundleOwner(bundleNftId)
|
127
184
|
{
|
128
|
-
_getPoolStorage().
|
185
|
+
_getPoolStorage()._poolService.setMaxBalanceAmount(maxBalanceAmount);
|
129
186
|
}
|
130
187
|
|
131
188
|
|
132
|
-
|
133
|
-
|
189
|
+
/// @dev Fund the pool wallet with the specified amount.
|
190
|
+
/// Function is only available for externally managed pools.
|
191
|
+
function _fundPoolWallet(Amount amount)
|
192
|
+
internal
|
134
193
|
virtual
|
135
|
-
//restricted()
|
136
|
-
onlyBundleOwner(bundleNftId)
|
137
194
|
{
|
138
|
-
_getPoolStorage().
|
195
|
+
_getPoolStorage()._poolService.fundPoolWallet(amount);
|
139
196
|
}
|
140
197
|
|
141
198
|
|
142
|
-
|
143
|
-
|
199
|
+
/// @dev Withdraw the specified amount from the pool wallet.
|
200
|
+
/// Function is only available for externally managed pools.
|
201
|
+
function _defundPoolWallet(Amount amount)
|
202
|
+
internal
|
144
203
|
virtual
|
145
|
-
//restricted()
|
146
|
-
onlyBundleOwner(bundleNftId)
|
147
204
|
{
|
148
|
-
_getPoolStorage()._poolService.
|
205
|
+
_getPoolStorage()._poolService.defundPoolWallet(amount);
|
149
206
|
}
|
150
207
|
|
151
208
|
|
152
|
-
|
209
|
+
/// @dev Creates a new empty bundle using the provided parameter values.
|
210
|
+
function _createBundle(
|
211
|
+
address bundleOwner,
|
212
|
+
Fee memory fee,
|
213
|
+
Seconds lifetime,
|
214
|
+
bytes memory filter
|
215
|
+
)
|
216
|
+
internal
|
217
|
+
returns(NftId bundleNftId)
|
218
|
+
{
|
219
|
+
bundleNftId = _getPoolStorage()._bundleService.create(
|
220
|
+
bundleOwner,
|
221
|
+
fee,
|
222
|
+
lifetime,
|
223
|
+
filter);
|
224
|
+
|
225
|
+
// TODO add logging
|
226
|
+
}
|
227
|
+
|
228
|
+
|
229
|
+
/// @dev Sets the fee for the specified bundle.
|
230
|
+
/// The fee is added on top of the poolFee and deducted from the premium amounts
|
231
|
+
/// Via these fees individual bundler owner may earn income per policy in the context of peer to peer pools.
|
232
|
+
function _setBundleFee(
|
153
233
|
NftId bundleNftId,
|
154
234
|
Fee memory fee
|
155
235
|
)
|
156
|
-
|
236
|
+
internal
|
157
237
|
virtual
|
158
|
-
//restricted()
|
159
|
-
onlyBundleOwner(bundleNftId)
|
160
238
|
{
|
161
239
|
_getPoolStorage()._bundleService.setFee(bundleNftId, fee);
|
162
240
|
}
|
163
241
|
|
164
242
|
|
165
|
-
|
166
|
-
|
243
|
+
/// @dev increases the staked tokens by the specified amount
|
244
|
+
/// bundle MUST be in active or locked state
|
245
|
+
function _stake(
|
246
|
+
NftId bundleNftId,
|
247
|
+
Amount amount
|
248
|
+
)
|
249
|
+
internal
|
167
250
|
virtual
|
168
|
-
|
169
|
-
onlyOwner()
|
251
|
+
returns(Amount)
|
170
252
|
{
|
171
|
-
_getPoolStorage()._poolService.
|
253
|
+
return _getPoolStorage()._poolService.stake(bundleNftId, amount);
|
172
254
|
}
|
173
255
|
|
174
256
|
|
175
|
-
|
176
|
-
|
257
|
+
/// @dev decreases the staked tokens by the specified amount
|
258
|
+
/// bundle MUST be in active, locked or closed state
|
259
|
+
function _unstake(
|
260
|
+
NftId bundleNftId,
|
261
|
+
Amount amount
|
262
|
+
)
|
263
|
+
internal
|
177
264
|
virtual
|
178
|
-
|
179
|
-
onlyOwner()
|
265
|
+
returns(Amount netAmount)
|
180
266
|
{
|
181
|
-
_getPoolStorage()._poolService.
|
267
|
+
return _getPoolStorage()._poolService.unstake(bundleNftId, amount);
|
182
268
|
}
|
183
269
|
|
184
270
|
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
271
|
+
/// @dev extends the bundle lifetime of the bundle by the specified time
|
272
|
+
/// bundle MUST be in active or locked state
|
273
|
+
function _extend(
|
274
|
+
NftId bundleNftId,
|
275
|
+
Seconds lifetimeExtension
|
189
276
|
)
|
190
|
-
|
277
|
+
internal
|
191
278
|
virtual
|
192
|
-
|
193
|
-
onlyOwner()
|
279
|
+
returns (Timestamp extendedExpiredAt)
|
194
280
|
{
|
195
|
-
_getPoolStorage().
|
281
|
+
return _getPoolStorage()._bundleService.extend(bundleNftId, lifetimeExtension);
|
196
282
|
}
|
197
283
|
|
198
284
|
|
199
|
-
/// @dev
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
bytes memory bundleFilter,
|
205
|
-
Amount collateralizationAmount
|
206
|
-
)
|
207
|
-
public
|
285
|
+
/// @dev Locks the specified bundle.
|
286
|
+
/// A bundle to be locked MUST be in active state.
|
287
|
+
/// Locked bundles may not be used to collateralize any new policy.
|
288
|
+
function _lockBundle(NftId bundleNftId)
|
289
|
+
internal
|
208
290
|
virtual
|
209
|
-
restricted()
|
210
291
|
{
|
211
|
-
|
212
|
-
applicationNftId,
|
213
|
-
applicationData,
|
214
|
-
bundleNftId,
|
215
|
-
bundleFilter,
|
216
|
-
collateralizationAmount)
|
217
|
-
)
|
218
|
-
{
|
219
|
-
revert ErrorPoolApplicationBundleMismatch(applicationNftId);
|
220
|
-
}
|
221
|
-
|
222
|
-
emit LogPoolVerifiedByPool(address(this), applicationNftId, collateralizationAmount);
|
292
|
+
_getPoolStorage()._bundleService.lock(bundleNftId);
|
223
293
|
}
|
224
294
|
|
225
295
|
|
226
|
-
/// @dev
|
227
|
-
///
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
bytes memory applicationData,
|
232
|
-
NftId bundleNftId,
|
233
|
-
bytes memory bundleFilter,
|
234
|
-
Amount collateralizationAmount
|
235
|
-
)
|
236
|
-
public
|
237
|
-
view
|
238
|
-
virtual override
|
239
|
-
returns (bool isMatching)
|
296
|
+
/// @dev Unlocks the specified bundle.
|
297
|
+
/// A bundle to be unlocked MUST be in locked state.
|
298
|
+
function _unlockBundle(NftId bundleNftId)
|
299
|
+
internal
|
300
|
+
virtual
|
240
301
|
{
|
241
|
-
|
302
|
+
_getPoolStorage()._bundleService.unlock(bundleNftId);
|
242
303
|
}
|
243
304
|
|
244
305
|
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
306
|
+
/// @dev Close the specified bundle.
|
307
|
+
/// A bundle to be closed MUST be in active or locked state.
|
308
|
+
/// To close a bundle all all linked policies MUST be in closed state as well.
|
309
|
+
/// Closing a bundle finalizes the bundle bookkeeping including overall profit calculation.
|
310
|
+
/// Once a bundle is closed this action cannot be reversed.
|
311
|
+
function _closeBundle(NftId bundleNftId)
|
312
|
+
internal
|
313
|
+
virtual
|
250
314
|
{
|
251
|
-
|
252
|
-
NftIdLib.zero(), // will be set when GIF registers the related product
|
253
|
-
PUBLIC_ROLE(), // bundleOwnerRole
|
254
|
-
AmountLib.max(), // maxCapitalAmount,
|
255
|
-
isNftInterceptor(), // isInterceptingBundleTransfers
|
256
|
-
false, // isExternallyManaged,
|
257
|
-
false, // isVerifyingApplications,
|
258
|
-
UFixedLib.toUFixed(1), // collateralizationLevel,
|
259
|
-
UFixedLib.toUFixed(1), // retentionLevel,
|
260
|
-
FeeLib.zero(), // initialPoolFee,
|
261
|
-
FeeLib.zero(), // initialStakingFee,
|
262
|
-
FeeLib.zero() // initialPerformanceFee,
|
263
|
-
);
|
315
|
+
_getPoolStorage()._poolService.closeBundle(bundleNftId);
|
264
316
|
}
|
265
317
|
|
266
|
-
// Internals
|
267
318
|
|
268
|
-
|
269
|
-
|
270
|
-
Fee memory fee,
|
271
|
-
Amount amount,
|
272
|
-
Seconds lifetime,
|
273
|
-
bytes memory filter
|
274
|
-
)
|
319
|
+
/// @dev Withdraws the specified amount of fees from the bundle.
|
320
|
+
function _withdrawBundleFees(NftId bundleNftId, Amount amount)
|
275
321
|
internal
|
276
|
-
returns(
|
322
|
+
returns (Amount withdrawnAmount)
|
277
323
|
{
|
278
|
-
|
279
|
-
bundleOwner,
|
280
|
-
fee,
|
281
|
-
amount,
|
282
|
-
lifetime,
|
283
|
-
filter);
|
284
|
-
|
285
|
-
// TODO add logging
|
324
|
+
return _getPoolStorage()._poolService.withdrawBundleFees(bundleNftId, amount);
|
286
325
|
}
|
287
326
|
|
288
|
-
|
289
|
-
function
|
290
|
-
|
327
|
+
|
328
|
+
function _processFundedClaim(
|
329
|
+
NftId policyNftId,
|
330
|
+
ClaimId claimId,
|
331
|
+
Amount availableAmount
|
332
|
+
)
|
333
|
+
internal
|
334
|
+
{
|
335
|
+
_getPoolStorage()._poolService.processFundedClaim(
|
336
|
+
policyNftId, claimId, availableAmount);
|
291
337
|
}
|
292
338
|
|
293
339
|
|