@etherisc/gif-next 0.0.2-bf51045-496 → 0.0.2-bf9f7e6-880
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +44 -0
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +69 -62
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +29 -31
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +33 -9
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +454 -253
- 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 +227 -26
- 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 +353 -189
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +105 -18
- 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 +74 -157
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +212 -38
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +39 -95
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +271 -185
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +66 -60
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +26 -82
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +159 -72
- 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 -88
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +193 -51
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +248 -237
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +212 -38
- 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 +132 -173
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +212 -38
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +75 -68
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +123 -116
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +193 -51
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +338 -242
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +212 -38
- 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 +158 -29
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +108 -9
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +187 -54
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +677 -325
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +193 -51
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +496 -324
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +121 -85
- 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 +619 -559
- 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 +60 -51
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +194 -40
- 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 +30 -21
- 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 +44 -35
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +75 -68
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +34 -36
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +65 -56
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +193 -51
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +108 -207
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +42 -64
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +44 -86
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +40 -31
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +138 -193
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +53 -44
- 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 +254 -299
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +70 -56
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +123 -50
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +37 -27
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +176 -152
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +212 -38
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +244 -187
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +64 -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 +157 -133
- 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 +193 -173
- 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 +54 -56
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +96 -108
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +35 -57
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +170 -146
- 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/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +36 -12
- 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 +74 -50
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +553 -434
- 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 +333 -63
- 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 +43 -34
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +147 -165
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +48 -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 +30 -21
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +71 -72
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +30 -21
- 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 +43 -34
- 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 +113 -39
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +131 -7
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +169 -97
- 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 +44 -32
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +34 -61
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +168 -53
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +31 -29
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +148 -134
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +47 -37
- 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 +10 -10
- 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 +93 -37
- 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 +60 -36
- 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 +3 -4
- package/contracts/accounting/AccountingServiceManager.sol +1 -1
- package/contracts/accounting/IAccountingService.sol +2 -2
- package/contracts/authorization/AccessAdmin.sol +293 -204
- package/contracts/authorization/AccessAdminLib.sol +183 -0
- package/contracts/authorization/AccessManagerCloneable.sol +146 -4
- package/contracts/authorization/Authorization.sol +307 -231
- package/contracts/authorization/IAccess.sol +13 -5
- package/contracts/authorization/IAccessAdmin.sol +69 -36
- package/contracts/authorization/IAuthorization.sol +21 -1
- package/contracts/distribution/BasicDistribution.sol +13 -11
- package/contracts/distribution/BasicDistributionAuthorization.sol +21 -8
- package/contracts/distribution/Distribution.sol +13 -56
- package/contracts/distribution/DistributionService.sol +83 -55
- 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/FirePool.sol +0 -4
- package/contracts/examples/fire/FirePoolAuthorization.sol +1 -1
- package/contracts/examples/fire/FireProduct.sol +4 -7
- package/contracts/examples/fire/FireProductAuthorization.sol +1 -1
- package/contracts/examples/unpermissioned/SimpleDistribution.sol +32 -8
- package/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol +1 -1
- package/contracts/examples/unpermissioned/SimpleOracle.sol +4 -8
- package/contracts/examples/unpermissioned/SimplePool.sol +0 -5
- package/contracts/examples/unpermissioned/SimplePoolAuthorization.sol +1 -1
- package/contracts/examples/unpermissioned/SimpleProduct.sol +29 -8
- package/contracts/examples/unpermissioned/SimpleProductAuthorization.sol +1 -1
- package/contracts/instance/BundleSet.sol +4 -4
- package/contracts/instance/IInstance.sol +51 -16
- package/contracts/instance/IInstanceService.sol +20 -2
- package/contracts/instance/Instance.sol +90 -25
- package/contracts/instance/InstanceAdmin.sol +261 -99
- package/contracts/instance/InstanceAuthorizationV3.sol +49 -36
- package/contracts/instance/InstanceReader.sol +103 -34
- package/contracts/instance/InstanceService.sol +154 -87
- 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/ObjectLifecycle.sol +4 -2
- package/contracts/instance/base/ObjectSet.sol +7 -8
- package/contracts/instance/base/ObjectSetHelperLib.sol +30 -0
- package/contracts/instance/module/IBundle.sol +6 -5
- package/contracts/instance/module/IComponents.sol +19 -7
- package/contracts/instance/module/IDistribution.sol +21 -8
- package/contracts/instance/module/IPolicy.sol +28 -8
- package/contracts/instance/module/IRisk.sol +4 -0
- package/contracts/oracle/BasicOracle.sol +1 -3
- package/contracts/oracle/BasicOracleAuthorization.sol +3 -12
- package/contracts/oracle/IOracle.sol +9 -4
- package/contracts/oracle/Oracle.sol +1 -3
- package/contracts/oracle/OracleService.sol +16 -15
- package/contracts/oracle/OracleServiceManager.sol +1 -1
- package/contracts/pool/BasicPool.sol +0 -2
- 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 -19
- package/contracts/pool/IPoolService.sol +50 -38
- package/contracts/pool/Pool.sol +9 -11
- package/contracts/pool/PoolLib.sol +216 -0
- package/contracts/pool/PoolService.sol +294 -154
- package/contracts/pool/PoolServiceManager.sol +1 -1
- package/contracts/product/ApplicationService.sol +24 -9
- package/contracts/product/ApplicationServiceManager.sol +1 -1
- package/contracts/product/BasicProduct.sol +2 -2
- package/contracts/product/BasicProductAuthorization.sol +23 -8
- package/contracts/product/ClaimService.sol +157 -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 +86 -158
- package/contracts/product/PolicyServiceLib.sol +65 -0
- package/contracts/product/PolicyServiceManager.sol +1 -1
- package/contracts/product/PricingService.sol +30 -21
- package/contracts/product/PricingServiceManager.sol +3 -3
- package/contracts/product/Product.sol +55 -15
- package/contracts/product/RiskService.sol +76 -29
- package/contracts/product/RiskServiceManager.sol +1 -1
- package/contracts/registry/IRegistry.sol +12 -15
- package/contracts/registry/IRelease.sol +29 -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 +146 -115
- package/contracts/registry/ServiceAuthorizationV3.sol +126 -2
- package/contracts/registry/TokenRegistry.sol +6 -8
- package/contracts/shared/Component.sol +17 -26
- package/contracts/shared/ComponentService.sol +141 -129
- 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 +0 -4
- package/contracts/shared/IComponentService.sol +9 -13
- 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 -4
- package/contracts/shared/NftOwnable.sol +5 -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 +16 -1
- package/contracts/staking/Staking.sol +59 -28
- package/contracts/staking/{StakeManagerLib.sol → StakingLib.sol} +80 -23
- package/contracts/staking/StakingReader.sol +6 -16
- package/contracts/staking/StakingService.sol +68 -44
- package/contracts/staking/StakingServiceManager.sol +5 -4
- package/contracts/staking/StakingStore.sol +2 -1
- package/contracts/type/Fee.sol +8 -8
- 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 +27 -10
- 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/contracts/authorization/ReleaseAccessManager.sol +0 -38
- package/contracts/instance/module/IAccess.sol +0 -46
@@ -37,8 +37,8 @@ contract SimpleProduct is
|
|
37
37
|
address registry,
|
38
38
|
NftId instanceNftId,
|
39
39
|
string memory name,
|
40
|
-
address token,
|
41
40
|
IComponents.ProductInfo memory productInfo,
|
41
|
+
IComponents.FeeInfo memory feeInfo,
|
42
42
|
IAuthorization authorization,
|
43
43
|
address initialOwner
|
44
44
|
)
|
@@ -47,8 +47,8 @@ contract SimpleProduct is
|
|
47
47
|
registry,
|
48
48
|
instanceNftId,
|
49
49
|
name,
|
50
|
-
token,
|
51
50
|
productInfo,
|
51
|
+
feeInfo,
|
52
52
|
authorization,
|
53
53
|
initialOwner);
|
54
54
|
}
|
@@ -58,8 +58,8 @@ contract SimpleProduct is
|
|
58
58
|
address registry,
|
59
59
|
NftId instanceNftid,
|
60
60
|
string memory name,
|
61
|
-
address token,
|
62
61
|
IComponents.ProductInfo memory productInfo,
|
62
|
+
IComponents.FeeInfo memory feeInfo,
|
63
63
|
IAuthorization authorization,
|
64
64
|
address initialOwner
|
65
65
|
)
|
@@ -71,8 +71,8 @@ contract SimpleProduct is
|
|
71
71
|
registry,
|
72
72
|
instanceNftid,
|
73
73
|
name,
|
74
|
-
token,
|
75
74
|
productInfo,
|
75
|
+
feeInfo,
|
76
76
|
authorization,
|
77
77
|
initialOwner);
|
78
78
|
|
@@ -81,11 +81,11 @@ contract SimpleProduct is
|
|
81
81
|
|
82
82
|
|
83
83
|
function createRisk(
|
84
|
-
|
84
|
+
string memory id,
|
85
85
|
bytes memory data
|
86
|
-
) public {
|
87
|
-
_createRisk(
|
88
|
-
id,
|
86
|
+
) public returns (RiskId) {
|
87
|
+
return _createRisk(
|
88
|
+
bytes32(abi.encodePacked(id)),
|
89
89
|
data
|
90
90
|
);
|
91
91
|
}
|
@@ -184,6 +184,13 @@ contract SimpleProduct is
|
|
184
184
|
_activate(policyNftId, activateAt);
|
185
185
|
}
|
186
186
|
|
187
|
+
function adjustActivation(
|
188
|
+
NftId policyNftId,
|
189
|
+
Timestamp activateAt
|
190
|
+
) public {
|
191
|
+
_adjustActivation(policyNftId, activateAt);
|
192
|
+
}
|
193
|
+
|
187
194
|
function close(
|
188
195
|
NftId policyNftId
|
189
196
|
) public {
|
@@ -198,6 +205,13 @@ contract SimpleProduct is
|
|
198
205
|
return _submitClaim(policyNftId, claimAmount, submissionData);
|
199
206
|
}
|
200
207
|
|
208
|
+
function revokeClaim(
|
209
|
+
NftId policyNftId,
|
210
|
+
ClaimId claimId
|
211
|
+
) public {
|
212
|
+
_revokeClaim(policyNftId, claimId);
|
213
|
+
}
|
214
|
+
|
201
215
|
function confirmClaim(
|
202
216
|
NftId policyNftId,
|
203
217
|
ClaimId claimId,
|
@@ -231,6 +245,13 @@ contract SimpleProduct is
|
|
231
245
|
return _createPayout(policyNftId, claimId, amount, data);
|
232
246
|
}
|
233
247
|
|
248
|
+
function cancelPayout(
|
249
|
+
NftId policyNftId,
|
250
|
+
PayoutId payoutId
|
251
|
+
) public {
|
252
|
+
_cancelPayout(policyNftId, payoutId);
|
253
|
+
}
|
254
|
+
|
234
255
|
// TODO add test
|
235
256
|
function createPayoutForBeneficiary(
|
236
257
|
NftId policyNftId,
|
@@ -21,7 +21,7 @@ contract SimpleProductAuthorization
|
|
21
21
|
|
22
22
|
// authorize public role (open access to any account, only allows to lock target)
|
23
23
|
IAccess.FunctionInfo[] storage functions;
|
24
|
-
functions = _authorizeForTarget(
|
24
|
+
functions = _authorizeForTarget(getMainTargetName(), PUBLIC_ROLE());
|
25
25
|
_authorize(functions, SimpleProduct.approveTokenHandler.selector, "approveTokenHandler");
|
26
26
|
_authorize(functions, SimpleProduct.setWallet.selector, "setWallet");
|
27
27
|
}
|
@@ -1,13 +1,13 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IPolicy} from "../instance/module/IPolicy.sol";
|
5
4
|
import {LibNftIdSet} from "../type/NftIdSet.sol";
|
6
5
|
import {NftId, NftIdLib} from "../type/NftId.sol";
|
7
6
|
import {Key32} from "../type/Key32.sol";
|
8
7
|
import {BUNDLE} from "../type/ObjectType.sol";
|
9
8
|
|
10
9
|
import {ObjectSet} from "./base/ObjectSet.sol";
|
10
|
+
import {ObjectSetHelperLib} from "./base/ObjectSetHelperLib.sol";
|
11
11
|
|
12
12
|
contract BundleSet is
|
13
13
|
ObjectSet
|
@@ -60,7 +60,7 @@ contract BundleSet is
|
|
60
60
|
/// @dev add a new bundle to a pool registerd with this instance
|
61
61
|
// the corresponding pool is fetched via instance reader
|
62
62
|
function add(NftId bundleNftId) external restricted() {
|
63
|
-
NftId poolNftId =
|
63
|
+
NftId poolNftId = ObjectSetHelperLib.getPoolNftId(_instanceAddress, bundleNftId);
|
64
64
|
|
65
65
|
// ensure pool is registered with instance
|
66
66
|
if(poolNftId.eqz()) {
|
@@ -74,14 +74,14 @@ contract BundleSet is
|
|
74
74
|
|
75
75
|
/// @dev unlocked (active) bundles are available to collateralize new policies
|
76
76
|
function unlock(NftId bundleNftId) external restricted() {
|
77
|
-
NftId poolNftId =
|
77
|
+
NftId poolNftId = ObjectSetHelperLib.getPoolNftId(_instanceAddress, bundleNftId);
|
78
78
|
_activate(poolNftId, _toBundleKey32(bundleNftId));
|
79
79
|
emit LogBundleSetBundleUnlocked(poolNftId, bundleNftId);
|
80
80
|
}
|
81
81
|
|
82
82
|
/// @dev locked (deactivated) bundles may not collateralize any new policies
|
83
83
|
function lock(NftId bundleNftId) external restricted() {
|
84
|
-
NftId poolNftId =
|
84
|
+
NftId poolNftId = ObjectSetHelperLib.getPoolNftId(_instanceAddress, bundleNftId);
|
85
85
|
_deactivate(poolNftId, _toBundleKey32(bundleNftId));
|
86
86
|
emit LogBundleSetBundleLocked(poolNftId, bundleNftId);
|
87
87
|
}
|
@@ -1,8 +1,6 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IAccessManaged} from "@openzeppelin/contracts/access/manager/IAccessManaged.sol";
|
5
|
-
|
6
4
|
import {Amount} from "../type/Amount.sol";
|
7
5
|
import {BundleSet} from "./BundleSet.sol";
|
8
6
|
import {RiskSet} from "./RiskSet.sol";
|
@@ -10,7 +8,6 @@ import {InstanceAdmin} from "./InstanceAdmin.sol";
|
|
10
8
|
import {InstanceReader} from "./InstanceReader.sol";
|
11
9
|
import {InstanceStore} from "./InstanceStore.sol";
|
12
10
|
import {IRegisterable} from "../shared/IRegisterable.sol";
|
13
|
-
import {ITransferInterceptor} from "../registry/ITransferInterceptor.sol";
|
14
11
|
import {NftId} from "../type/NftId.sol";
|
15
12
|
import {RoleId} from "../type/RoleId.sol";
|
16
13
|
import {Seconds} from "../type/Seconds.sol";
|
@@ -18,12 +15,10 @@ import {UFixed} from "../type/UFixed.sol";
|
|
18
15
|
|
19
16
|
|
20
17
|
interface IInstance is
|
21
|
-
IRegisterable
|
22
|
-
ITransferInterceptor,
|
23
|
-
IAccessManaged
|
18
|
+
IRegisterable
|
24
19
|
{
|
25
20
|
error ErrorInstanceInstanceAdminZero();
|
26
|
-
error ErrorInstanceInstanceAdminAlreadySet(address
|
21
|
+
error ErrorInstanceInstanceAdminAlreadySet(address instanceAdmin);
|
27
22
|
error ErrorInstanceInstanceAdminAuthorityMismatch(address instanceAuthority);
|
28
23
|
|
29
24
|
error ErrorInstanceBundleSetAlreadySet(address instanceBundleSet);
|
@@ -43,8 +38,44 @@ interface IInstance is
|
|
43
38
|
uint64 requestsCount;
|
44
39
|
}
|
45
40
|
|
41
|
+
///--- instance ---------------------------------------------------------//
|
42
|
+
|
43
|
+
/// @dev Locks/unlocks the complete instance, including all its components.
|
44
|
+
function setInstanceLocked(bool locked) external;
|
45
|
+
|
46
|
+
/// @dev Upgrades the instance reader to the specified target.
|
47
|
+
function upgradeInstanceReader() external;
|
48
|
+
|
49
|
+
/// @dev Sets the instance reader for the instance.
|
50
|
+
/// Permissioned: only the instance service may call this function.
|
51
|
+
function setInstanceReader(InstanceReader instanceReader) external;
|
52
|
+
|
53
|
+
///--- staking ----------------------------------------------------------//
|
54
|
+
|
55
|
+
/// @dev Sets the duration for locking new stakes on this instance..
|
56
|
+
function setStakingLockingPeriod(Seconds stakeLockingPeriod) external;
|
57
|
+
|
58
|
+
/// @dev Sets the staking reward rate [apr] for this instance.
|
59
|
+
function setStakingRewardRate(UFixed rewardRate) external;
|
60
|
+
|
61
|
+
/// @dev Sets the maximum staked amount for this instance.
|
62
|
+
function setStakingMaxAmount(Amount maxStakedAmount) external;
|
63
|
+
|
64
|
+
/// @dev Refills the staking reward reserves for the specified target.
|
65
|
+
function refillStakingRewardReserves(Amount dipAmount) external;
|
66
|
+
|
67
|
+
/// @dev Defunds the staking reward reserves for the specified target.
|
68
|
+
function withdrawStakingRewardReserves(Amount dipAmount) external returns (Amount newBalance);
|
69
|
+
|
70
|
+
///--- product/component ------------------------------------------------//
|
71
|
+
|
72
|
+
/// @dev Locks/unlocks the specified target.
|
73
|
+
function setTargetLocked(address target, bool locked) external;
|
74
|
+
|
46
75
|
/// @dev Register a product with the instance.
|
47
|
-
function registerProduct(address product) external returns (NftId productNftId);
|
76
|
+
function registerProduct(address product, address token) external returns (NftId productNftId);
|
77
|
+
|
78
|
+
///--- authz ------------------------------------------------------------//
|
48
79
|
|
49
80
|
function createRole(string memory roleName, string memory adminName) external returns (RoleId roleId, RoleId admin);
|
50
81
|
function grantRole(RoleId roleId, address account) external;
|
@@ -52,20 +83,24 @@ interface IInstance is
|
|
52
83
|
|
53
84
|
function createTarget(address target, string memory name) external;
|
54
85
|
function setTargetFunctionRole(string memory targetName, bytes4[] calldata selectors, RoleId roleId) external;
|
55
|
-
function setLocked(address target, bool locked) external;
|
56
86
|
|
57
|
-
|
58
|
-
function setStakingRewardRate(UFixed rewardRate) external;
|
59
|
-
function refillStakingRewardReserves(Amount dipAmount) external;
|
87
|
+
//--- getters -----------------------------------------------------------//
|
60
88
|
|
61
|
-
/// @dev
|
62
|
-
|
63
|
-
|
89
|
+
/// @dev returns the overall locking state of the instance (including all components)
|
90
|
+
function isInstanceLocked() external view returns (bool isLocked);
|
91
|
+
|
92
|
+
/// @dev returns the locking state of the specified target
|
93
|
+
function isTargetLocked(address target) external view returns (bool isLocked);
|
94
|
+
|
95
|
+
// get products
|
96
|
+
function products() external view returns (uint256 productCount);
|
97
|
+
function getProductNftId(uint256 idx) external view returns (NftId productNftId);
|
64
98
|
|
65
|
-
// get
|
99
|
+
// get supporting contracts
|
66
100
|
function getInstanceReader() external view returns (InstanceReader);
|
67
101
|
function getBundleSet() external view returns (BundleSet);
|
68
102
|
function getRiskSet() external view returns (RiskSet);
|
69
103
|
function getInstanceAdmin() external view returns (InstanceAdmin);
|
70
104
|
function getInstanceStore() external view returns (InstanceStore);
|
105
|
+
function isTokenRegistryDisabled() external view returns (bool);
|
71
106
|
}
|
@@ -15,7 +15,7 @@ interface IInstanceService is IService {
|
|
15
15
|
// onlyInstance
|
16
16
|
error ErrorInstanceServiceNotRegistered(address instance);
|
17
17
|
error ErrorInstanceServiceNotInstance(address instance, ObjectType objectType);
|
18
|
-
error ErrorInstanceServiceInstanceVersionMismatch(
|
18
|
+
error ErrorInstanceServiceInstanceVersionMismatch(NftId instanceNftId, VersionPart expectedRelease, VersionPart instanceRelease);
|
19
19
|
|
20
20
|
error ErrorInstanceServiceComponentNotInstanceLinked(address component);
|
21
21
|
|
@@ -53,16 +53,34 @@ interface IInstanceService is IService {
|
|
53
53
|
|
54
54
|
event LogInstanceCloned(NftId instanceNftId, address instance);
|
55
55
|
|
56
|
-
|
56
|
+
/// @dev Locks the complete instance, including all its components.
|
57
|
+
function setInstanceLocked(bool locked) external;
|
58
|
+
|
59
|
+
/// @dev Locks/unlocks the specified target constrolled by the corresponding instance admin.
|
60
|
+
function setTargetLocked(address target, bool locked) external;
|
61
|
+
|
62
|
+
/// @dev Creates a new instance.
|
63
|
+
/// The caller becomes the owner of the new instance.
|
64
|
+
/// Creation of a new instance is achieved by this service through the creation and registration
|
65
|
+
/// of a new clone of the master instance and then setting up the initial wiring and authorization
|
66
|
+
/// of the necessary components.
|
67
|
+
/// @param allowAnyToken specifies whether the new instance is allowed to use any token or
|
68
|
+
/// only tokens that are registered in the `TokenRegistry`. Use of tokens **not** registered in the
|
69
|
+
/// `TokenRegistry` may result in problems with token handline and is therefor not recommended. The
|
70
|
+
/// use of such instances **is not supported** by Etherisc.
|
71
|
+
function createInstance(bool allowAnyToken)
|
57
72
|
external
|
58
73
|
returns (
|
59
74
|
IInstance instance,
|
60
75
|
NftId instanceNftId
|
61
76
|
);
|
62
77
|
|
78
|
+
function upgradeInstanceReader() external;
|
79
|
+
function upgradeMasterInstanceReader(address instanceReaderAddress) external;
|
63
80
|
|
64
81
|
function setStakingLockingPeriod(Seconds stakeLockingPeriod) external;
|
65
82
|
function setStakingRewardRate(UFixed rewardRate) external;
|
83
|
+
function setStakingMaxAmount(Amount maxStakedAmount) external;
|
66
84
|
function refillStakingRewardReserves(address rewardProvider, Amount dipAmount) external;
|
67
85
|
|
68
86
|
/// @dev Defunds the staking reward reserves for the specified target.
|
@@ -1,39 +1,41 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {
|
4
|
+
import {IInstance} from "./IInstance.sol";
|
5
|
+
import {IComponentService} from "../shared/IComponentService.sol";
|
6
|
+
import {IInstanceService} from "./IInstanceService.sol";
|
7
|
+
import {IRegistry} from "../registry/IRegistry.sol";
|
5
8
|
|
6
9
|
import {Amount} from "../type/Amount.sol";
|
7
10
|
import {BundleSet} from "./BundleSet.sol";
|
8
11
|
import {RiskSet} from "./RiskSet.sol";
|
9
12
|
import {COMPONENT, INSTANCE} from "../type/ObjectType.sol";
|
10
|
-
import {IInstance} from "./IInstance.sol";
|
11
|
-
import {IComponentService} from "../shared/IComponentService.sol";
|
12
|
-
import {IInstanceService} from "./IInstanceService.sol";
|
13
13
|
import {InstanceReader} from "./InstanceReader.sol";
|
14
14
|
import {InstanceAdmin} from "./InstanceAdmin.sol";
|
15
15
|
import {InstanceStore} from "./InstanceStore.sol";
|
16
|
-
import {IRegistry} from "../registry/IRegistry.sol";
|
17
16
|
import {NftId} from "../type/NftId.sol";
|
18
17
|
import {Registerable} from "../shared/Registerable.sol";
|
19
18
|
import {RoleId} from "../type/RoleId.sol";
|
20
19
|
import {Seconds} from "../type/Seconds.sol";
|
21
20
|
import {UFixed} from "../type/UFixed.sol";
|
21
|
+
import {VersionPart} from "../type/Version.sol";
|
22
22
|
|
23
23
|
contract Instance is
|
24
24
|
IInstance,
|
25
|
-
AccessManagedUpgradeable,
|
26
25
|
Registerable
|
27
26
|
{
|
28
27
|
bool private _initialized;
|
29
28
|
|
30
29
|
IComponentService internal _componentService;
|
31
30
|
IInstanceService internal _instanceService;
|
31
|
+
|
32
32
|
InstanceAdmin internal _instanceAdmin;
|
33
33
|
InstanceReader internal _instanceReader;
|
34
34
|
BundleSet internal _bundleSet;
|
35
35
|
RiskSet internal _riskSet;
|
36
36
|
InstanceStore internal _instanceStore;
|
37
|
+
NftId [] internal _products;
|
38
|
+
bool internal _tokenRegistryDisabled;
|
37
39
|
|
38
40
|
modifier onlyChainNft() {
|
39
41
|
if(msg.sender != getRegistry().getChainNftAddress()) {
|
@@ -49,21 +51,22 @@ contract Instance is
|
|
49
51
|
RiskSet riskSet,
|
50
52
|
InstanceReader instanceReader,
|
51
53
|
IRegistry registry,
|
52
|
-
|
54
|
+
VersionPart release,
|
55
|
+
address initialOwner,
|
56
|
+
bool tokenRegistryDisabled
|
53
57
|
)
|
54
58
|
external
|
55
59
|
initializer()
|
56
60
|
{
|
57
|
-
|
58
|
-
if(_instanceAdmin.authority() == address(0)) {
|
61
|
+
if(address(instanceAdmin) == address(0)) {
|
59
62
|
revert ErrorInstanceInstanceAdminZero();
|
60
63
|
}
|
61
64
|
|
62
|
-
|
63
|
-
__AccessManaged_init(_instanceAdmin.authority());
|
65
|
+
_instanceAdmin = instanceAdmin;
|
64
66
|
|
65
67
|
// setup instance object info
|
66
|
-
|
68
|
+
__Registerable_init(
|
69
|
+
instanceAdmin.authority(),
|
67
70
|
address(registry),
|
68
71
|
registry.getNftId(),
|
69
72
|
INSTANCE(),
|
@@ -79,36 +82,61 @@ contract Instance is
|
|
79
82
|
|
80
83
|
// initialize instance supporting contracts
|
81
84
|
_instanceStore.initialize();
|
82
|
-
_bundleSet.initialize();
|
83
|
-
_riskSet.initialize();
|
85
|
+
_bundleSet.initialize(instanceAdmin.authority(), address(registry));
|
86
|
+
_riskSet.initialize(instanceAdmin.authority(), address(registry));
|
84
87
|
_instanceReader.initialize();
|
85
88
|
|
86
89
|
_componentService = IComponentService(
|
87
90
|
getRegistry().getServiceAddress(
|
88
91
|
COMPONENT(),
|
89
|
-
|
92
|
+
release));
|
90
93
|
|
91
94
|
_instanceService = IInstanceService(
|
92
95
|
getRegistry().getServiceAddress(
|
93
96
|
INSTANCE(),
|
94
|
-
|
97
|
+
release));
|
98
|
+
|
99
|
+
_tokenRegistryDisabled = tokenRegistryDisabled;
|
95
100
|
|
96
101
|
_registerInterface(type(IInstance).interfaceId);
|
97
102
|
}
|
98
103
|
|
104
|
+
|
105
|
+
function setInstanceLocked(bool locked)
|
106
|
+
external
|
107
|
+
// not restricted(): need to be able to unlock a locked instance
|
108
|
+
onlyOwner()
|
109
|
+
{
|
110
|
+
_instanceService.setInstanceLocked(locked);
|
111
|
+
}
|
112
|
+
|
113
|
+
|
114
|
+
function upgradeInstanceReader()
|
115
|
+
external
|
116
|
+
restricted()
|
117
|
+
onlyOwner()
|
118
|
+
{
|
119
|
+
_instanceService.upgradeInstanceReader();
|
120
|
+
}
|
121
|
+
|
122
|
+
|
99
123
|
//--- ProductRegistration ----------------------------------------------//
|
100
|
-
|
124
|
+
|
125
|
+
function registerProduct(address product, address token)
|
101
126
|
external
|
127
|
+
restricted()
|
102
128
|
onlyOwner()
|
103
129
|
returns (NftId productNftId)
|
104
130
|
{
|
105
|
-
|
131
|
+
productNftId = _componentService.registerProduct(product, token);
|
132
|
+
_products.push(productNftId);
|
106
133
|
}
|
107
134
|
|
108
135
|
//--- Staking ----------------------------------------------------------//
|
109
136
|
|
110
137
|
function setStakingLockingPeriod(Seconds stakeLockingPeriod)
|
111
138
|
external
|
139
|
+
restricted()
|
112
140
|
onlyOwner()
|
113
141
|
{
|
114
142
|
_instanceService.setStakingLockingPeriod(stakeLockingPeriod);
|
@@ -116,13 +144,22 @@ contract Instance is
|
|
116
144
|
|
117
145
|
function setStakingRewardRate(UFixed rewardRate)
|
118
146
|
external
|
147
|
+
restricted()
|
119
148
|
onlyOwner()
|
120
149
|
{
|
121
150
|
_instanceService.setStakingRewardRate(rewardRate);
|
122
151
|
}
|
123
152
|
|
153
|
+
function setStakingMaxAmount(Amount maxStakedAmount)
|
154
|
+
external
|
155
|
+
onlyOwner()
|
156
|
+
{
|
157
|
+
_instanceService.setStakingMaxAmount(maxStakedAmount);
|
158
|
+
}
|
159
|
+
|
124
160
|
function refillStakingRewardReserves(Amount dipAmount)
|
125
161
|
external
|
162
|
+
restricted()
|
126
163
|
onlyOwner()
|
127
164
|
{
|
128
165
|
address instanceOwner = msg.sender;
|
@@ -131,6 +168,7 @@ contract Instance is
|
|
131
168
|
|
132
169
|
function withdrawStakingRewardReserves(Amount dipAmount)
|
133
170
|
external
|
171
|
+
restricted()
|
134
172
|
onlyOwner()
|
135
173
|
returns (Amount newBalance)
|
136
174
|
{
|
@@ -141,6 +179,7 @@ contract Instance is
|
|
141
179
|
|
142
180
|
function createRole(string memory roleName, string memory adminName)
|
143
181
|
external
|
182
|
+
restricted()
|
144
183
|
onlyOwner()
|
145
184
|
returns (RoleId roleId, RoleId admin)
|
146
185
|
{
|
@@ -150,6 +189,7 @@ contract Instance is
|
|
150
189
|
|
151
190
|
function grantRole(RoleId roleId, address account)
|
152
191
|
external
|
192
|
+
restricted()
|
153
193
|
onlyOwner()
|
154
194
|
{
|
155
195
|
_instanceAdmin.grantRole(roleId, account);
|
@@ -157,6 +197,7 @@ contract Instance is
|
|
157
197
|
|
158
198
|
function revokeRole(RoleId roleId, address account)
|
159
199
|
external
|
200
|
+
restricted()
|
160
201
|
onlyOwner()
|
161
202
|
{
|
162
203
|
// TODO refactor
|
@@ -165,8 +206,18 @@ contract Instance is
|
|
165
206
|
|
166
207
|
//--- Targets ------------------------------------------------------------//
|
167
208
|
|
209
|
+
|
210
|
+
function setTargetLocked(address target, bool locked)
|
211
|
+
external
|
212
|
+
// not restricted(): instance owner may need to be able to unlock targets on an locked instance
|
213
|
+
onlyOwner()
|
214
|
+
{
|
215
|
+
_instanceService.setTargetLocked(target, locked);
|
216
|
+
}
|
217
|
+
|
168
218
|
function createTarget(address target, string memory name)
|
169
219
|
external
|
220
|
+
restricted()
|
170
221
|
onlyOwner()
|
171
222
|
{
|
172
223
|
// TODO refactor
|
@@ -179,19 +230,13 @@ contract Instance is
|
|
179
230
|
RoleId roleId
|
180
231
|
)
|
181
232
|
external
|
233
|
+
restricted()
|
182
234
|
onlyOwner()
|
183
235
|
{
|
184
236
|
// TODO refactor
|
185
237
|
// _instanceAdmin.setTargetFunctionRoleByInstance(targetName, selectors, roleId);
|
186
238
|
}
|
187
239
|
|
188
|
-
function setLocked(address target, bool locked)
|
189
|
-
external
|
190
|
-
onlyOwner()
|
191
|
-
{
|
192
|
-
_componentService.setLockedFromInstance(target, locked);
|
193
|
-
}
|
194
|
-
|
195
240
|
//--- ITransferInterceptor ----------------------------------------------//
|
196
241
|
|
197
242
|
function nftTransferFrom(address from, address to, uint256 tokenId, address operator) external onlyChainNft {
|
@@ -215,6 +260,22 @@ contract Instance is
|
|
215
260
|
|
216
261
|
//--- external view functions -------------------------------------------//
|
217
262
|
|
263
|
+
function isInstanceLocked() external view returns (bool) {
|
264
|
+
return _instanceAdmin.isLocked();
|
265
|
+
}
|
266
|
+
|
267
|
+
function isTargetLocked(address target) external view returns (bool) {
|
268
|
+
return _instanceAdmin.isTargetLocked(target);
|
269
|
+
}
|
270
|
+
|
271
|
+
function products() external view returns (uint256 productCount) {
|
272
|
+
return _products.length;
|
273
|
+
}
|
274
|
+
|
275
|
+
function getProductNftId(uint256 idx) external view returns (NftId productNftId) {
|
276
|
+
return _products[idx];
|
277
|
+
}
|
278
|
+
|
218
279
|
function getInstanceReader() external view returns (InstanceReader) {
|
219
280
|
return _instanceReader;
|
220
281
|
}
|
@@ -235,5 +296,9 @@ contract Instance is
|
|
235
296
|
return _instanceStore;
|
236
297
|
}
|
237
298
|
|
299
|
+
function isTokenRegistryDisabled() external view returns (bool) {
|
300
|
+
return _tokenRegistryDisabled;
|
301
|
+
}
|
302
|
+
|
238
303
|
//--- internal view/pure functions --------------------------------------//
|
239
304
|
}
|