@etherisc/gif-next 0.0.2-e016345-525 → 0.0.2-e04dbfc-031
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +137 -58
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +37 -31
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +83 -3
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +449 -248
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.json +673 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +202 -5
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +222 -21
- 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 +348 -184
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +100 -13
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +2 -2
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +83 -129
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +207 -33
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +46 -81
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +283 -181
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +74 -60
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +33 -68
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +155 -68
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +92 -42
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +188 -46
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +248 -191
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +207 -33
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +149 -131
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +207 -33
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +95 -45
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +113 -47
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +188 -46
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +305 -150
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +207 -33
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +88 -45
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +139 -28
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +100 -7
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +163 -53
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +672 -320
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +188 -46
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +374 -197
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +113 -83
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +26 -38
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +422 -352
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +1 -1
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +96 -53
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +2 -2
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +2 -2
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +16 -5
- 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/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +68 -38
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +189 -35
- 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 +38 -8
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +27 -3
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +52 -22
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +91 -68
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +42 -36
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +51 -21
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +188 -46
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +118 -201
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +50 -64
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +38 -80
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +38 -8
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +120 -175
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +51 -21
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.dbg.json +4 -0
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +472 -0
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +265 -278
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +86 -56
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +139 -50
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +45 -27
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +157 -112
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +207 -33
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +260 -187
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +72 -74
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +69 -3
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +142 -20
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +105 -68
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +48 -3
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +144 -99
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +1 -1
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.json +58 -7
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +215 -187
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +4 -0
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +727 -0
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +68 -66
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +122 -78
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +48 -42
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +157 -112
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +131 -81
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +46 -28
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +2 -2
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +26 -2
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +31 -7
- 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/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +64 -40
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +548 -429
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.json +878 -0
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +51 -44
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +22 -24
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +1954 -0
- 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 +324 -54
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +6 -6
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +4 -4
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +51 -21
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +96 -138
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +44 -50
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +27 -16
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +113 -4
- package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.dbg.json +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 +38 -8
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +28 -45
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +38 -8
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +120 -1
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.json +27 -3
- 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 +51 -21
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.json +2 -2
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +2 -2
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +2 -2
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +118 -62
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/Service.sol/Service.json +27 -16
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +63 -162
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +118 -29
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +32 -32
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +112 -17
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +130 -6
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +191 -74
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.dbg.json +4 -0
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.json +469 -0
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +2 -2
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +56 -32
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +30 -57
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +185 -54
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +39 -29
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +143 -129
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +33 -23
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.json +3 -3
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +2 -2
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +2 -2
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.json +3 -3
- 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 +33 -31
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +2 -2
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +2 -2
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +2 -2
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +30 -6
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +79 -15
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/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/String.sol/StrLib.dbg.json +1 -1
- 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 +3 -3
- 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 +101 -2
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +4 -4
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
- package/contracts/accounting/AccountingService.sol +43 -26
- package/contracts/accounting/AccountingServiceManager.sol +1 -1
- package/contracts/accounting/IAccountingService.sol +3 -0
- package/contracts/authorization/AccessAdmin.sol +293 -205
- package/contracts/authorization/AccessAdminLib.sol +183 -0
- package/contracts/authorization/AccessManagerCloneable.sol +146 -4
- package/contracts/authorization/Authorization.sol +307 -231
- package/contracts/authorization/IAccessAdmin.sol +69 -36
- package/contracts/authorization/IAuthorization.sol +21 -1
- package/contracts/distribution/BasicDistribution.sol +12 -8
- package/contracts/distribution/BasicDistributionAuthorization.sol +21 -8
- package/contracts/distribution/Distribution.sol +14 -55
- package/contracts/distribution/DistributionService.sol +62 -30
- package/contracts/distribution/DistributionServiceManager.sol +1 -1
- package/contracts/distribution/IDistributionComponent.sol +0 -9
- package/contracts/distribution/IDistributionService.sol +18 -15
- package/contracts/examples/fire/FirePoolAuthorization.sol +1 -1
- package/contracts/examples/fire/FireProduct.sol +4 -3
- package/contracts/examples/fire/FireProductAuthorization.sol +1 -1
- package/contracts/examples/unpermissioned/SimpleDistribution.sol +28 -0
- package/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol +1 -1
- package/contracts/examples/unpermissioned/SimplePool.sol +0 -1
- package/contracts/examples/unpermissioned/SimplePoolAuthorization.sol +1 -1
- package/contracts/examples/unpermissioned/SimpleProduct.sol +29 -4
- package/contracts/examples/unpermissioned/SimpleProductAuthorization.sol +1 -1
- package/contracts/instance/BundleSet.sol +4 -4
- package/contracts/instance/IInstance.sol +49 -15
- package/contracts/instance/IInstanceService.sol +15 -1
- package/contracts/instance/Instance.sol +80 -23
- package/contracts/instance/InstanceAdmin.sol +269 -104
- package/contracts/instance/InstanceAuthorizationV3.sol +49 -36
- package/contracts/instance/InstanceReader.sol +106 -35
- package/contracts/instance/InstanceService.sol +144 -73
- package/contracts/instance/InstanceServiceManager.sol +1 -1
- package/contracts/instance/InstanceStore.sol +13 -2
- package/contracts/instance/RiskSet.sol +11 -12
- package/contracts/instance/base/ObjectCounter.sol +1 -2
- package/contracts/instance/base/ObjectLifecycle.sol +4 -2
- package/contracts/instance/base/ObjectSet.sol +7 -8
- package/contracts/instance/base/ObjectSetHelperLib.sol +30 -0
- package/contracts/instance/module/IComponents.sol +3 -2
- package/contracts/instance/module/IDistribution.sol +5 -2
- package/contracts/instance/module/IRisk.sol +2 -0
- package/contracts/oracle/BasicOracleAuthorization.sol +3 -12
- package/contracts/oracle/Oracle.sol +1 -1
- package/contracts/oracle/OracleService.sol +20 -19
- package/contracts/oracle/OracleServiceManager.sol +1 -1
- package/contracts/pool/BasicPoolAuthorization.sol +21 -13
- package/contracts/pool/BundleService.sol +28 -58
- package/contracts/pool/BundleServiceManager.sol +1 -1
- package/contracts/pool/IBundleService.sol +13 -20
- package/contracts/pool/IPoolService.sol +50 -38
- package/contracts/pool/Pool.sol +9 -9
- package/contracts/pool/PoolLib.sol +309 -0
- package/contracts/pool/PoolService.sol +334 -190
- package/contracts/pool/PoolServiceManager.sol +1 -1
- package/contracts/product/ApplicationService.sol +28 -9
- package/contracts/product/ApplicationServiceManager.sol +1 -1
- package/contracts/product/BasicProduct.sol +2 -0
- package/contracts/product/BasicProductAuthorization.sol +23 -8
- package/contracts/product/ClaimService.sol +165 -139
- package/contracts/product/ClaimServiceManager.sol +1 -1
- package/contracts/product/IApplicationService.sol +3 -0
- package/contracts/product/IClaimService.sol +14 -2
- package/contracts/product/IPolicyService.sol +11 -6
- package/contracts/product/IPricingService.sol +1 -0
- package/contracts/product/IProductComponent.sol +4 -1
- package/contracts/product/IRiskService.sol +7 -7
- package/contracts/product/PolicyService.sol +112 -184
- package/contracts/product/PolicyServiceLib.sol +119 -0
- package/contracts/product/PolicyServiceManager.sol +1 -1
- package/contracts/product/PricingService.sol +28 -19
- package/contracts/product/PricingServiceManager.sol +3 -3
- package/contracts/product/Product.sol +55 -13
- package/contracts/product/RiskService.sol +76 -29
- package/contracts/product/RiskServiceManager.sol +1 -1
- package/contracts/registry/ChainNft.sol +4 -2
- package/contracts/registry/IRegistry.sol +8 -15
- package/contracts/registry/IRelease.sol +26 -0
- package/contracts/registry/Registry.sol +7 -2
- package/contracts/registry/RegistryAdmin.sol +143 -342
- package/contracts/registry/RegistryAuthorization.sol +267 -0
- package/contracts/registry/RegistryService.sol +3 -3
- package/contracts/registry/RegistryServiceManager.sol +1 -1
- package/contracts/registry/ReleaseAdmin.sol +253 -0
- package/contracts/registry/ReleaseLifecycle.sol +2 -0
- package/contracts/registry/ReleaseRegistry.sol +149 -117
- package/contracts/registry/ServiceAuthorizationV3.sol +159 -2
- package/contracts/registry/TokenRegistry.sol +6 -8
- package/contracts/shared/Component.sol +27 -19
- package/contracts/shared/ComponentService.sol +119 -116
- package/contracts/shared/ComponentServiceManager.sol +1 -1
- package/contracts/shared/ComponentVerifyingService.sol +1 -1
- package/contracts/shared/ContractLib.sol +60 -3
- package/contracts/shared/IComponent.sol +3 -4
- package/contracts/shared/IComponentService.sol +4 -10
- package/contracts/shared/IRegisterable.sol +15 -4
- package/contracts/shared/IService.sol +3 -5
- package/contracts/shared/InitializableERC165.sol +9 -1
- package/contracts/shared/InstanceLinkedComponent.sol +2 -2
- package/contracts/shared/NftOwnable.sol +6 -5
- package/contracts/shared/PolicyHolder.sol +1 -1
- package/contracts/shared/Registerable.sol +42 -19
- package/contracts/shared/RegistryLinked.sol +1 -1
- package/contracts/shared/Service.sol +8 -27
- package/contracts/shared/TokenHandler.sol +45 -92
- package/contracts/staking/IStaking.sol +12 -10
- package/contracts/staking/IStakingService.sol +19 -1
- package/contracts/staking/Staking.sol +57 -26
- package/contracts/staking/{StakeManagerLib.sol → StakingLib.sol} +80 -23
- package/contracts/staking/StakingReader.sol +6 -16
- package/contracts/staking/StakingService.sol +71 -44
- package/contracts/staking/StakingServiceManager.sol +5 -4
- package/contracts/staking/StakingStore.sol +2 -1
- package/contracts/type/ObjectType.sol +47 -39
- package/contracts/type/RiskId.sol +9 -3
- package/contracts/type/RoleId.sol +24 -4
- package/contracts/type/Selector.sol +5 -0
- package/contracts/type/Timestamp.sol +0 -5
- package/contracts/type/UFixed.sol +9 -119
- package/contracts/type/Version.sol +54 -5
- package/contracts/upgradeability/ProxyManager.sol +1 -1
- package/package.json +2 -2
- package/artifacts/contracts/authorization/ReleaseAccessManager.sol/ReleaseAccessManager.dbg.json +0 -4
- package/artifacts/contracts/authorization/ReleaseAccessManager.sol/ReleaseAccessManager.json +0 -1196
- 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/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +0 -4
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +0 -440
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +0 -4
- package/artifacts/contracts/type/UFixed.sol/MathLib.json +0 -16
- package/contracts/authorization/ReleaseAccessManager.sol +0 -38
- package/contracts/instance/module/IAccess.sol +0 -46
@@ -8,6 +8,7 @@ import {IComponents} from "../instance/module/IComponents.sol";
|
|
8
8
|
import {IComponentService} from "../shared/IComponentService.sol";
|
9
9
|
import {IInstance} from "../instance/IInstance.sol";
|
10
10
|
import {IPolicy} from "../instance/module/IPolicy.sol";
|
11
|
+
import {IPolicyHolder} from "../shared/IPolicyHolder.sol";
|
11
12
|
import {IPoolComponent} from "../pool/IPoolComponent.sol";
|
12
13
|
import {IPoolService} from "./IPoolService.sol";
|
13
14
|
import {IProductComponent} from "../product/IProductComponent.sol";
|
@@ -17,18 +18,20 @@ import {IStaking} from "../staking/IStaking.sol";
|
|
17
18
|
import {Amount, AmountLib} from "../type/Amount.sol";
|
18
19
|
import {ClaimId} from "../type/ClaimId.sol";
|
19
20
|
import {ContractLib} from "../shared/ContractLib.sol";
|
20
|
-
import {
|
21
|
+
import {InstanceReader} from "../instance/InstanceReader.sol";
|
22
|
+
import {InstanceStore} from "../instance/InstanceStore.sol";
|
23
|
+
import {KEEP_STATE} from "../type/StateId.sol";
|
21
24
|
import {NftId} from "../type/NftId.sol";
|
22
25
|
import {ObjectType, ACCOUNTING, POOL, BUNDLE, PRODUCT, POLICY, COMPONENT} from "../type/ObjectType.sol";
|
23
|
-
import {
|
24
|
-
import {
|
25
|
-
import {UFixed} from "../type/UFixed.sol";
|
26
|
+
import {PayoutId} from "../type/PayoutId.sol";
|
27
|
+
import {PoolLib} from "./PoolLib.sol";
|
26
28
|
import {Service} from "../shared/Service.sol";
|
27
|
-
import {
|
28
|
-
import {
|
29
|
+
import {TokenHandler} from "../shared/TokenHandler.sol";
|
30
|
+
import {UFixed} from "../type/UFixed.sol";
|
29
31
|
|
30
32
|
string constant POOL_SERVICE_NAME = "PoolService";
|
31
33
|
|
34
|
+
|
32
35
|
contract PoolService is
|
33
36
|
Service,
|
34
37
|
IPoolService
|
@@ -47,11 +50,11 @@ contract PoolService is
|
|
47
50
|
initializer()
|
48
51
|
{
|
49
52
|
(
|
50
|
-
address
|
51
|
-
address
|
53
|
+
address authority,
|
54
|
+
address registry
|
52
55
|
) = abi.decode(data, (address, address));
|
53
56
|
|
54
|
-
|
57
|
+
__Service_init(authority, registry, owner);
|
55
58
|
|
56
59
|
_accountingService = IAccountingService(_getServiceAddress(ACCOUNTING()));
|
57
60
|
_bundleService = IBundleService(_getServiceAddress(BUNDLE()));
|
@@ -66,6 +69,7 @@ contract PoolService is
|
|
66
69
|
function setMaxBalanceAmount(Amount maxBalanceAmount)
|
67
70
|
external
|
68
71
|
virtual
|
72
|
+
restricted()
|
69
73
|
{
|
70
74
|
(NftId poolNftId, IInstance instance) = _getAndVerifyActivePool();
|
71
75
|
InstanceReader instanceReader = instance.getInstanceReader();
|
@@ -81,6 +85,7 @@ contract PoolService is
|
|
81
85
|
|
82
86
|
function closeBundle(NftId bundleNftId)
|
83
87
|
external
|
88
|
+
restricted()
|
84
89
|
virtual
|
85
90
|
{
|
86
91
|
_checkNftType(bundleNftId, BUNDLE());
|
@@ -102,8 +107,7 @@ contract PoolService is
|
|
102
107
|
|
103
108
|
if ((unstakedAmount + feeAmount).gtz()){
|
104
109
|
IComponents.ComponentInfo memory poolComponentInfo = instance.getInstanceReader().getComponentInfo(poolNftId);
|
105
|
-
poolComponentInfo.tokenHandler.
|
106
|
-
poolComponentInfo.tokenHandler.getWallet(),
|
110
|
+
poolComponentInfo.tokenHandler.pushToken(
|
107
111
|
getRegistry().ownerOf(bundleNftId),
|
108
112
|
unstakedAmount + feeAmount);
|
109
113
|
}
|
@@ -117,13 +121,14 @@ contract PoolService is
|
|
117
121
|
Amount availableAmount
|
118
122
|
)
|
119
123
|
external
|
124
|
+
restricted()
|
120
125
|
virtual
|
121
126
|
{
|
122
127
|
_checkNftType(policyNftId, POLICY());
|
123
128
|
|
124
129
|
(NftId poolNftId, IInstance instance) = _getAndVerifyActivePool();
|
125
130
|
InstanceReader instanceReader = instance.getInstanceReader();
|
126
|
-
NftId productNftId = getRegistry().
|
131
|
+
NftId productNftId = getRegistry().getParentNftId(poolNftId);
|
127
132
|
|
128
133
|
// check policy matches with calling pool
|
129
134
|
IPolicy.PolicyInfo memory policyInfo = instanceReader.getPolicyInfo(policyNftId);
|
@@ -144,23 +149,47 @@ contract PoolService is
|
|
144
149
|
}
|
145
150
|
|
146
151
|
|
152
|
+
// function _checkAndGetPoolInfo(NftId bundleNftId)
|
153
|
+
// internal
|
154
|
+
// view
|
155
|
+
// returns (
|
156
|
+
// InstanceReader instanceReader,
|
157
|
+
// InstanceStore instanceStore,
|
158
|
+
// NftId instanceNftId,
|
159
|
+
// NftId poolNftId,
|
160
|
+
// IComponents.PoolInfo memory poolInfo
|
161
|
+
// )
|
162
|
+
// {
|
163
|
+
// _checkNftType(bundleNftId, BUNDLE());
|
164
|
+
|
165
|
+
// (NftId poolNftId, IInstance instance) = _getAndVerifyActivePool();
|
166
|
+
// instanceReader = instance.getInstanceReader();
|
167
|
+
// instanceStore = instance.getInstanceStore();
|
168
|
+
// instanceNftId = instance.getNftId();
|
169
|
+
// poolInfo = instanceReader.getPoolInfo(poolNftId);
|
170
|
+
|
171
|
+
// if (getRegistry().getParentNftId(bundleNftId) != poolNftId) {
|
172
|
+
// revert ErrorPoolServiceBundlePoolMismatch(bundleNftId, poolNftId);
|
173
|
+
// }
|
174
|
+
// }
|
175
|
+
|
176
|
+
|
147
177
|
/// @inheritdoc IPoolService
|
148
178
|
function stake(NftId bundleNftId, Amount amount)
|
149
179
|
external
|
150
180
|
virtual
|
151
|
-
|
152
|
-
returns(
|
181
|
+
restricted()
|
182
|
+
returns(
|
183
|
+
Amount netAmount
|
184
|
+
)
|
153
185
|
{
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
if (bundleInfo.poolNftId != poolNftId) {
|
162
|
-
revert ErrorPoolServiceBundlePoolMismatch(bundleNftId, poolNftId);
|
163
|
-
}
|
186
|
+
(
|
187
|
+
InstanceReader instanceReader,
|
188
|
+
InstanceStore instanceStore,
|
189
|
+
NftId instanceNftId,
|
190
|
+
NftId poolNftId,
|
191
|
+
IComponents.PoolInfo memory poolInfo
|
192
|
+
) = PoolLib.checkAndGetPoolInfo(getRegistry(), msg.sender, bundleNftId);
|
164
193
|
|
165
194
|
{
|
166
195
|
Amount currentPoolBalance = instanceReader.getBalanceAmount(poolNftId);
|
@@ -170,37 +199,33 @@ contract PoolService is
|
|
170
199
|
}
|
171
200
|
|
172
201
|
// calculate fees
|
173
|
-
IRegistry registry = getRegistry();
|
174
202
|
Amount feeAmount;
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
(
|
180
|
-
|
181
|
-
|
182
|
-
)
|
183
|
-
stakingFee,
|
184
|
-
amount);
|
185
|
-
}
|
203
|
+
(
|
204
|
+
feeAmount,
|
205
|
+
netAmount
|
206
|
+
) = PoolLib.calculateStakingAmounts(
|
207
|
+
getRegistry(),
|
208
|
+
instanceReader,
|
209
|
+
poolNftId,
|
210
|
+
amount);
|
186
211
|
|
187
212
|
// do all the book keeping
|
188
213
|
_accountingService.increasePoolBalance(
|
189
|
-
|
214
|
+
instanceStore,
|
190
215
|
poolNftId,
|
191
216
|
netAmount,
|
192
217
|
feeAmount);
|
193
218
|
|
194
|
-
_bundleService.stake(
|
219
|
+
_bundleService.stake(instanceReader, instanceStore, bundleNftId, netAmount);
|
195
220
|
|
196
|
-
emit LogPoolServiceBundleStaked(
|
221
|
+
emit LogPoolServiceBundleStaked(instanceNftId, poolNftId, bundleNftId, amount, netAmount);
|
197
222
|
|
198
223
|
// only collect staking amount when pool is not externally managed
|
199
224
|
if (!poolInfo.isExternallyManaged) {
|
200
225
|
|
201
226
|
// collect tokens from bundle owner
|
202
227
|
address bundleOwner = getRegistry().ownerOf(bundleNftId);
|
203
|
-
|
228
|
+
PoolLib.pullStakingAmount(
|
204
229
|
instanceReader,
|
205
230
|
poolNftId,
|
206
231
|
bundleOwner,
|
@@ -213,22 +238,18 @@ contract PoolService is
|
|
213
238
|
function unstake(NftId bundleNftId, Amount amount)
|
214
239
|
external
|
215
240
|
virtual
|
216
|
-
|
241
|
+
restricted()
|
217
242
|
returns(Amount netAmount)
|
218
243
|
{
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
if (bundleInfo.poolNftId != poolNftId) {
|
227
|
-
revert ErrorPoolServiceBundlePoolMismatch(bundleNftId, poolNftId);
|
228
|
-
}
|
244
|
+
(
|
245
|
+
InstanceReader instanceReader,
|
246
|
+
InstanceStore instanceStore,
|
247
|
+
NftId instanceNftId,
|
248
|
+
NftId poolNftId,
|
249
|
+
) = PoolLib.checkAndGetPoolInfo(getRegistry(), msg.sender, bundleNftId);
|
229
250
|
|
230
251
|
// call bundle service for bookkeeping and additional checks
|
231
|
-
Amount unstakedAmount = _bundleService.unstake(
|
252
|
+
Amount unstakedAmount = _bundleService.unstake(instanceStore, bundleNftId, amount);
|
232
253
|
|
233
254
|
// Important: from now on work only with unstakedAmount as it is the only reliable amount.
|
234
255
|
// if amount was max, this was set to the available amount
|
@@ -244,14 +265,14 @@ contract PoolService is
|
|
244
265
|
AmountLib.zero());
|
245
266
|
|
246
267
|
|
247
|
-
emit LogPoolServiceBundleUnstaked(
|
268
|
+
emit LogPoolServiceBundleUnstaked(instanceNftId, poolNftId, bundleNftId, unstakedAmount, netAmount);
|
248
269
|
|
249
270
|
// only distribute staking amount when pool is not externally managed
|
250
271
|
if (!instanceReader.getPoolInfo(poolNftId).isExternallyManaged) {
|
251
272
|
|
252
273
|
// transfer amount to bundle owner
|
253
274
|
address bundleOwner = getRegistry().ownerOf(bundleNftId);
|
254
|
-
|
275
|
+
PoolLib.pushUnstakingAmount(
|
255
276
|
instanceReader,
|
256
277
|
poolNftId,
|
257
278
|
bundleOwner,
|
@@ -263,7 +284,7 @@ contract PoolService is
|
|
263
284
|
function fundPoolWallet(Amount amount)
|
264
285
|
external
|
265
286
|
virtual
|
266
|
-
|
287
|
+
restricted()
|
267
288
|
{
|
268
289
|
(
|
269
290
|
NftId poolNftId,
|
@@ -279,7 +300,7 @@ contract PoolService is
|
|
279
300
|
address poolOwner = getRegistry().ownerOf(poolNftId);
|
280
301
|
emit LogPoolServiceWalletFunded(poolNftId, poolOwner, amount);
|
281
302
|
|
282
|
-
|
303
|
+
PoolLib.pullStakingAmount(
|
283
304
|
reader,
|
284
305
|
poolNftId,
|
285
306
|
poolOwner,
|
@@ -290,7 +311,7 @@ contract PoolService is
|
|
290
311
|
function defundPoolWallet(Amount amount)
|
291
312
|
external
|
292
313
|
virtual
|
293
|
-
|
314
|
+
restricted()
|
294
315
|
{
|
295
316
|
(
|
296
317
|
NftId poolNftId,
|
@@ -306,7 +327,7 @@ contract PoolService is
|
|
306
327
|
address poolOwner = getRegistry().ownerOf(poolNftId);
|
307
328
|
emit LogPoolServiceWalletDefunded(poolNftId, poolOwner, amount);
|
308
329
|
|
309
|
-
|
330
|
+
PoolLib.pushUnstakingAmount(
|
310
331
|
reader,
|
311
332
|
poolNftId,
|
312
333
|
poolOwner,
|
@@ -325,7 +346,7 @@ contract PoolService is
|
|
325
346
|
_checkNftType(bundleNftId, BUNDLE());
|
326
347
|
|
327
348
|
IRegistry registry = getRegistry();
|
328
|
-
NftId poolNftId = registry.
|
349
|
+
NftId poolNftId = registry.getParentNftId(bundleNftId);
|
329
350
|
(, address instanceAddress) = ContractLib.getInfoAndInstance(registry, poolNftId, true);
|
330
351
|
IInstance instance = IInstance(instanceAddress);
|
331
352
|
|
@@ -340,7 +361,7 @@ contract PoolService is
|
|
340
361
|
bundleNetAmount + bundleFeeAmount,
|
341
362
|
poolFeeAmount);
|
342
363
|
|
343
|
-
_accountingService.
|
364
|
+
_accountingService.increaseBundleBalanceForPool(
|
344
365
|
instanceStore,
|
345
366
|
bundleNftId,
|
346
367
|
bundleNetAmount,
|
@@ -375,7 +396,7 @@ contract PoolService is
|
|
375
396
|
totalCollateralAmount,
|
376
397
|
localCollateralAmount,
|
377
398
|
poolIsVerifyingApplications
|
378
|
-
) = calculateRequiredCollateral(
|
399
|
+
) = PoolLib.calculateRequiredCollateral(
|
379
400
|
instance.getInstanceReader(),
|
380
401
|
productNftId,
|
381
402
|
sumInsuredAmount);
|
@@ -410,21 +431,24 @@ contract PoolService is
|
|
410
431
|
}
|
411
432
|
|
412
433
|
function processPayout(
|
413
|
-
|
414
|
-
|
434
|
+
InstanceReader instanceReader,
|
435
|
+
InstanceStore instanceStore,
|
436
|
+
NftId productNftId,
|
415
437
|
NftId policyNftId,
|
416
|
-
|
417
|
-
|
438
|
+
NftId bundleNftId,
|
439
|
+
PayoutId payoutId,
|
440
|
+
Amount payoutAmount,
|
441
|
+
address payoutBeneficiary
|
418
442
|
)
|
419
443
|
external
|
420
444
|
virtual
|
421
445
|
restricted()
|
422
446
|
{
|
447
|
+
// checks
|
423
448
|
_checkNftType(policyNftId, POLICY());
|
424
449
|
|
425
|
-
|
426
|
-
NftId poolNftId = getRegistry().
|
427
|
-
InstanceStore instanceStore = instance.getInstanceStore();
|
450
|
+
// effects
|
451
|
+
NftId poolNftId = getRegistry().getParentNftId(bundleNftId);
|
428
452
|
|
429
453
|
_accountingService.decreasePoolBalance(
|
430
454
|
instanceStore,
|
@@ -432,23 +456,131 @@ contract PoolService is
|
|
432
456
|
payoutAmount,
|
433
457
|
AmountLib.zero());
|
434
458
|
|
435
|
-
_accountingService.
|
459
|
+
_accountingService.decreaseBundleBalanceForPool(
|
436
460
|
instanceStore,
|
437
461
|
bundleNftId,
|
438
462
|
payoutAmount,
|
439
463
|
AmountLib.zero());
|
440
464
|
|
441
465
|
_bundleService.releaseCollateral(
|
442
|
-
|
466
|
+
instanceStore,
|
443
467
|
policyNftId,
|
444
|
-
|
468
|
+
bundleNftId,
|
445
469
|
payoutAmount);
|
446
470
|
|
447
471
|
// update value locked with staking service
|
472
|
+
TokenHandler poolTokenHandler = TokenHandler(
|
473
|
+
instanceReader.getTokenHandler(
|
474
|
+
poolNftId));
|
475
|
+
|
448
476
|
_staking.decreaseTotalValueLocked(
|
449
|
-
|
450
|
-
|
477
|
+
instanceReader.getInstanceNftId(),
|
478
|
+
address(poolTokenHandler.TOKEN()),
|
451
479
|
payoutAmount);
|
480
|
+
|
481
|
+
// interactions
|
482
|
+
PoolLib.transferTokenAndNotifyPolicyHolder(
|
483
|
+
getRegistry(),
|
484
|
+
instanceReader,
|
485
|
+
poolTokenHandler,
|
486
|
+
productNftId,
|
487
|
+
policyNftId,
|
488
|
+
payoutId,
|
489
|
+
payoutAmount,
|
490
|
+
payoutBeneficiary);
|
491
|
+
}
|
492
|
+
|
493
|
+
//function _transferTokenAndNotifyPolicyHolder(
|
494
|
+
// InstanceReader instanceReader,
|
495
|
+
// TokenHandler poolTokenHandler,
|
496
|
+
// NftId productNftId,
|
497
|
+
// NftId policyNftId,
|
498
|
+
// PayoutId payoutId,
|
499
|
+
// Amount payoutAmount,
|
500
|
+
// address payoutBeneficiary
|
501
|
+
//)
|
502
|
+
// internal
|
503
|
+
//{
|
504
|
+
// (
|
505
|
+
// Amount netPayoutAmount,
|
506
|
+
// Amount processingFeeAmount,
|
507
|
+
// address beneficiary
|
508
|
+
// ) = PoolLib.calculatePayoutAmounts(
|
509
|
+
// getRegistry(),
|
510
|
+
// instanceReader,
|
511
|
+
// productNftId,
|
512
|
+
// policyNftId,
|
513
|
+
// payoutAmount,
|
514
|
+
// payoutBeneficiary);
|
515
|
+
|
516
|
+
// 1st token tx to payout to beneficiary
|
517
|
+
// poolTokenHandler.pushToken(
|
518
|
+
// beneficiary,
|
519
|
+
// netPayoutAmount);
|
520
|
+
|
521
|
+
// 2nd token tx to transfer processing fees to product wallet
|
522
|
+
// if processingFeeAmount > 0
|
523
|
+
// if (processingFeeAmount.gtz()) {
|
524
|
+
// poolTokenHandler.pushToken(
|
525
|
+
// instanceReader.getWallet(productNftId),
|
526
|
+
// processingFeeAmount);
|
527
|
+
// }
|
528
|
+
|
529
|
+
// callback to policy holder if applicable
|
530
|
+
// _policyHolderPayoutExecuted(
|
531
|
+
// policyNftId,
|
532
|
+
// payoutId,
|
533
|
+
// beneficiary,
|
534
|
+
// netPayoutAmount);
|
535
|
+
//}
|
536
|
+
|
537
|
+
|
538
|
+
/// @inheritdoc IPoolService
|
539
|
+
function withdrawBundleFees(
|
540
|
+
NftId bundleNftId,
|
541
|
+
Amount amount
|
542
|
+
)
|
543
|
+
public
|
544
|
+
virtual
|
545
|
+
restricted()
|
546
|
+
returns (Amount withdrawnAmount)
|
547
|
+
{
|
548
|
+
// checks
|
549
|
+
_checkNftType(bundleNftId, BUNDLE());
|
550
|
+
|
551
|
+
(NftId poolNftId, IInstance instance) = _getAndVerifyActivePool();
|
552
|
+
InstanceReader reader = instance.getInstanceReader();
|
553
|
+
|
554
|
+
// determine withdrawn amount
|
555
|
+
withdrawnAmount = amount;
|
556
|
+
if (withdrawnAmount.gte(AmountLib.max())) {
|
557
|
+
withdrawnAmount = reader.getFeeAmount(bundleNftId);
|
558
|
+
} else {
|
559
|
+
if (withdrawnAmount > reader.getFeeAmount(bundleNftId)) {
|
560
|
+
revert ErrorPoolServiceFeesWithdrawAmountExceedsLimit(withdrawnAmount, reader.getFeeAmount(bundleNftId));
|
561
|
+
}
|
562
|
+
}
|
563
|
+
|
564
|
+
// effects
|
565
|
+
// decrease fee counters by withdrawnAmount
|
566
|
+
{
|
567
|
+
InstanceStore store = instance.getInstanceStore();
|
568
|
+
// decrease fee amount of the bundle
|
569
|
+
_accountingService.decreaseBundleBalanceForPool(store, bundleNftId, AmountLib.zero(), withdrawnAmount);
|
570
|
+
// decrease pool balance
|
571
|
+
_accountingService.decreasePoolBalance(store, poolNftId, withdrawnAmount, AmountLib.zero());
|
572
|
+
}
|
573
|
+
|
574
|
+
// interactions
|
575
|
+
// transfer amount to bundle owner
|
576
|
+
{
|
577
|
+
address bundleOwner = getRegistry().ownerOf(bundleNftId);
|
578
|
+
TokenHandler tokenHandler = reader.getTokenHandler(poolNftId);
|
579
|
+
address token = address(tokenHandler.TOKEN());
|
580
|
+
emit LogPoolServiceFeesWithdrawn(bundleNftId, bundleOwner, token, withdrawnAmount);
|
581
|
+
|
582
|
+
tokenHandler.pushToken(bundleOwner, withdrawnAmount);
|
583
|
+
}
|
452
584
|
}
|
453
585
|
|
454
586
|
|
@@ -456,7 +588,6 @@ contract PoolService is
|
|
456
588
|
/// may only be called by the policy service for unlocked pool components
|
457
589
|
function releaseCollateral(
|
458
590
|
IInstance instance,
|
459
|
-
address token,
|
460
591
|
NftId policyNftId,
|
461
592
|
IPolicy.PolicyInfo memory policyInfo
|
462
593
|
)
|
@@ -469,121 +600,122 @@ contract PoolService is
|
|
469
600
|
Amount remainingCollateralAmount = policyInfo.sumInsuredAmount - policyInfo.claimAmount;
|
470
601
|
|
471
602
|
_bundleService.releaseCollateral(
|
472
|
-
instance,
|
603
|
+
instance.getInstanceStore(),
|
473
604
|
policyNftId,
|
474
605
|
policyInfo.bundleNftId,
|
475
606
|
remainingCollateralAmount);
|
476
607
|
|
477
608
|
// update value locked with staking service
|
609
|
+
InstanceReader instanceReader = instance.getInstanceReader();
|
478
610
|
_staking.decreaseTotalValueLocked(
|
479
|
-
|
480
|
-
|
611
|
+
instanceReader.getInstanceNftId(),
|
612
|
+
address(instanceReader.getToken(policyInfo.productNftId)),
|
481
613
|
remainingCollateralAmount);
|
482
614
|
}
|
483
615
|
|
484
616
|
|
485
|
-
function calculateRequiredCollateral(
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
)
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
{
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
}
|
617
|
+
// function calculateRequiredCollateral(
|
618
|
+
// InstanceReader instanceReader,
|
619
|
+
// NftId productNftId,
|
620
|
+
// Amount sumInsuredAmount
|
621
|
+
// )
|
622
|
+
// public
|
623
|
+
// view
|
624
|
+
// returns(
|
625
|
+
// NftId poolNftId,
|
626
|
+
// Amount totalCollateralAmount,
|
627
|
+
// Amount localCollateralAmount,
|
628
|
+
// bool poolIsVerifyingApplications
|
629
|
+
// )
|
630
|
+
// {
|
631
|
+
// return CollateralLib.calculateRequiredCollateral(
|
632
|
+
// instanceReader,
|
633
|
+
// productNftId,
|
634
|
+
// sumInsuredAmount);
|
635
|
+
// }
|
636
|
+
|
637
|
+
// _checkNftType(productNftId, PRODUCT());
|
638
|
+
|
639
|
+
// poolNftId = instanceReader.getProductInfo(productNftId).poolNftId;
|
640
|
+
// IComponents.PoolInfo memory poolInfo = instanceReader.getPoolInfo(poolNftId);
|
641
|
+
// poolIsVerifyingApplications = poolInfo.isVerifyingApplications;
|
642
|
+
|
643
|
+
// (
|
644
|
+
// totalCollateralAmount,
|
645
|
+
// localCollateralAmount
|
646
|
+
// ) = calculateRequiredCollateral(
|
647
|
+
// poolInfo.collateralizationLevel,
|
648
|
+
// poolInfo.retentionLevel,
|
649
|
+
// sumInsuredAmount);
|
650
|
+
// }
|
651
|
+
|
652
|
+
|
653
|
+
// function calculateRequiredCollateral(
|
654
|
+
// UFixed collateralizationLevel,
|
655
|
+
// UFixed retentionLevel,
|
656
|
+
// Amount sumInsuredAmount
|
657
|
+
// )
|
658
|
+
// public
|
659
|
+
// pure
|
660
|
+
// returns(
|
661
|
+
// Amount totalCollateralAmount,
|
662
|
+
// Amount localCollateralAmount
|
663
|
+
// )
|
664
|
+
// {
|
665
|
+
// // collateralization is applied to sum insured
|
666
|
+
// UFixed totalUFixed = collateralizationLevel * sumInsuredAmount.toUFixed();
|
667
|
+
// totalCollateralAmount = AmountLib.toAmount(totalUFixed.toInt());
|
668
|
+
|
669
|
+
// // retention level defines how much capital is required locally
|
670
|
+
// localCollateralAmount = AmountLib.toAmount(
|
671
|
+
// (retentionLevel * totalUFixed).toInt());
|
672
|
+
// }
|
673
|
+
|
674
|
+
|
675
|
+
|
676
|
+
|
677
|
+
//function _policyHolderPayoutExecuted(
|
678
|
+
// NftId policyNftId,
|
679
|
+
// PayoutId payoutId,
|
680
|
+
// address beneficiary,
|
681
|
+
// Amount payoutAmount
|
682
|
+
//)
|
683
|
+
// internal
|
684
|
+
//{
|
685
|
+
// IPolicyHolder policyHolder = PoolLib.getPolicyHolder(getRegistry(), policyNftId);
|
686
|
+
// if(address(policyHolder) != address(0)) {
|
687
|
+
// policyHolder.payoutExecuted(policyNftId, payoutId, payoutAmount, beneficiary);
|
688
|
+
// }
|
689
|
+
//}
|
690
|
+
|
691
|
+
|
692
|
+
//function _pullStakingAmount(
|
693
|
+
// InstanceReader reader,
|
694
|
+
// NftId poolNftId,
|
695
|
+
// address from,
|
696
|
+
// Amount amount
|
697
|
+
//)
|
698
|
+
// internal
|
699
|
+
//{
|
700
|
+
// IComponents.ComponentInfo memory info = reader.getComponentInfo(poolNftId);
|
701
|
+
// info.tokenHandler.pullToken(
|
702
|
+
// from,
|
703
|
+
// amount);
|
704
|
+
//}
|
705
|
+
|
706
|
+
//function _pushUnstakingAmount(
|
707
|
+
// InstanceReader reader,
|
708
|
+
// NftId poolNftId,
|
709
|
+
// address to,
|
710
|
+
// Amount amount
|
711
|
+
//)
|
712
|
+
// internal
|
713
|
+
//{
|
714
|
+
// IComponents.ComponentInfo memory info = reader.getComponentInfo(poolNftId);
|
715
|
+
// info.tokenHandler.pushToken(
|
716
|
+
// to,
|
717
|
+
// amount);
|
718
|
+
//}
|
587
719
|
|
588
720
|
|
589
721
|
function _getAndVerifyActivePool()
|
@@ -595,19 +727,31 @@ contract PoolService is
|
|
595
727
|
IInstance instance
|
596
728
|
)
|
597
729
|
{
|
598
|
-
(
|
599
|
-
IRegistry.ObjectInfo memory info,
|
600
|
-
address instanceAddress
|
601
|
-
) = ContractLib.getAndVerifyComponent(
|
602
|
-
getRegistry(),
|
603
|
-
msg.sender,
|
604
|
-
POOL(),
|
605
|
-
true); // only active pools
|
606
|
-
|
607
|
-
poolNftId = info.nftId;
|
608
|
-
instance = IInstance(instanceAddress);
|
730
|
+
return PoolLib.getAndVerifyActivePool(getRegistry(), msg.sender);
|
609
731
|
}
|
610
732
|
|
733
|
+
// function _getAndVerifyActivePool()
|
734
|
+
// internal
|
735
|
+
// virtual
|
736
|
+
// view
|
737
|
+
// returns (
|
738
|
+
// NftId poolNftId,
|
739
|
+
// IInstance instance
|
740
|
+
// )
|
741
|
+
// {
|
742
|
+
// (
|
743
|
+
// IRegistry.ObjectInfo memory info,
|
744
|
+
// address instanceAddress
|
745
|
+
// ) = ContractLib.getAndVerifyComponent(
|
746
|
+
// getRegistry(),
|
747
|
+
// msg.sender,
|
748
|
+
// POOL(),
|
749
|
+
// true); // only active pools
|
750
|
+
|
751
|
+
// poolNftId = info.nftId;
|
752
|
+
// instance = IInstance(instanceAddress);
|
753
|
+
// }
|
754
|
+
|
611
755
|
|
612
756
|
function _getDomain() internal pure override returns(ObjectType) {
|
613
757
|
return POOL();
|