@etherisc/gif-next 0.0.2-f1fe735-758 → 0.0.2-f2273b3-211
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 +59 -9
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +4 -0
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +1007 -0
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +4 -0
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +744 -0
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +4 -0
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +791 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +1379 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.json +24 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +4 -0
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +1434 -0
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +542 -0
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.json +10 -0
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +4 -0
- package/artifacts/contracts/{shared → authorization}/IAccessAdmin.sol/IAccessAdmin.json +211 -270
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +350 -0
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/{registry → authorization}/IServiceAuthorization.sol/IServiceAuthorization.json +29 -10
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +4 -0
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +253 -0
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +4 -0
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +1322 -0
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +4 -0
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +589 -0
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +144 -544
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +396 -265
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +147 -109
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +201 -261
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +244 -63
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.json +22 -0
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +1475 -0
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +589 -0
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +2040 -0
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +589 -0
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +4 -0
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.json +376 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +1479 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +589 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +1195 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +1655 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +589 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +2426 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +589 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +4 -0
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +851 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +161 -73
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +116 -126
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +190 -211
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +1462 -241
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +4 -0
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +661 -0
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +1044 -316
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +135 -330
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +97 -111
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +650 -529
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +4 -0
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +853 -0
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +2 -2
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +48 -7
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +192 -0
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.dbg.json +4 -0
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.json +168 -0
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
- package/artifacts/contracts/mock/Dip.sol/Dip.dbg.json +1 -1
- package/artifacts/contracts/mock/Dip.sol/Dip.json +2 -2
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +4 -0
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +959 -0
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +4 -0
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +569 -0
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.json +43 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +141 -126
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +69 -11
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +127 -398
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +153 -190
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +122 -88
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +4 -0
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +1252 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +4 -0
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +589 -0
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +331 -204
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +143 -97
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +206 -29
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +132 -379
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +464 -312
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +124 -662
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.dbg.json +4 -0
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +456 -0
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +653 -532
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +163 -97
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +134 -184
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +91 -93
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +4 -0
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +1161 -0
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +4 -0
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +589 -0
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +415 -234
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +140 -114
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +94 -9
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +308 -16
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +365 -104
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +136 -83
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +260 -237
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +4 -0
- package/artifacts/contracts/product/{IProductService.sol/IProductService.json → IRiskService.sol/IRiskService.json} +57 -4
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +459 -309
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +4 -0
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +293 -0
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +141 -99
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +230 -312
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +120 -122
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +258 -536
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +4 -0
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +637 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +4 -0
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +724 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +59 -16
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +359 -55
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +72 -152
- package/artifacts/contracts/registry/IRelease.sol/IRelease.dbg.json +4 -0
- package/artifacts/contracts/registry/IRelease.sol/IRelease.json +24 -0
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +5 -18
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +585 -112
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +449 -422
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +109 -292
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +94 -80
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +1849 -0
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +48 -7
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +1333 -0
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +82 -16
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +5 -5
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +76 -265
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +576 -516
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +137 -113
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.json +57 -111
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +541 -0
- package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.json +24 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.json +30 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.json +40 -0
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +89 -88
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +547 -224
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +127 -123
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.json +36 -0
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.json +36 -0
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +16 -0
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +15 -47
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +148 -0
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.json +55 -2
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +4 -0
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.json +53 -0
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +112 -351
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.json +42 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.json +42 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +4 -0
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.json +306 -0
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +22 -57
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +19 -141
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +122 -97
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -15
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/Service.sol/Service.json +57 -111
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +585 -12
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +4 -0
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +484 -0
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +4 -0
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +172 -0
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +137 -139
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +130 -16
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakeManagerLib.sol/StakeManagerLib.json +85 -105
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +216 -375
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.json +48 -7
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +126 -95
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +7 -63
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +183 -164
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +103 -85
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +181 -135
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +59 -23
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.json +2 -2
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.json +61 -8
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.json +2 -2
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +28 -4
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +4 -4
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.json +17 -12
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32.sol/Key32Lib.json +2 -2
- package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.dbg.json +4 -0
- package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.json +33 -0
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.json +23 -4
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.json +2 -2
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.json +55 -2
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +19 -19
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.json +4 -4
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +4 -4
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +118 -5
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +181 -14
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +50 -2
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.json +21 -2
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.json +2 -2
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.json +15 -2
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
- package/artifacts/contracts/type/String.sol/StrLib.json +2 -2
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +23 -4
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +71 -2
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionLib.json +2 -21
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.json +66 -2
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/IVersionable.sol/IVersionable.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +618 -0
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +4 -0
- package/artifacts/contracts/{shared → upgradeability}/Versionable.sol/Versionable.json +1 -1
- package/contracts/accounting/AccountingService.sol +262 -0
- package/contracts/accounting/AccountingServiceManager.sol +38 -0
- package/contracts/accounting/IAccountingService.sol +45 -0
- package/contracts/{shared → authorization}/AccessAdmin.sol +310 -380
- package/contracts/authorization/AccessManagerCloneable.sol +149 -0
- package/contracts/authorization/Authorization.sol +337 -0
- package/contracts/authorization/IAccess.sol +49 -0
- package/contracts/{shared → authorization}/IAccessAdmin.sol +37 -62
- package/contracts/authorization/IAuthorization.sol +74 -0
- package/contracts/{registry → authorization}/IServiceAuthorization.sol +8 -6
- package/contracts/{registry → authorization}/ServiceAuthorization.sol +41 -25
- package/contracts/distribution/BasicDistribution.sol +141 -0
- package/contracts/distribution/BasicDistributionAuthorization.sol +60 -0
- package/contracts/distribution/Distribution.sol +153 -125
- package/contracts/distribution/DistributionService.sol +172 -111
- package/contracts/distribution/DistributionServiceManager.sol +8 -11
- package/contracts/distribution/IDistributionComponent.sol +26 -40
- package/contracts/distribution/IDistributionService.sol +42 -22
- package/contracts/examples/fire/DamageLevel.sol +59 -0
- package/contracts/examples/fire/FirePool.sol +90 -0
- package/contracts/examples/fire/FirePoolAuthorization.sol +35 -0
- package/contracts/examples/fire/FireProduct.sol +438 -0
- package/contracts/examples/fire/FireProductAuthorization.sol +45 -0
- package/contracts/examples/fire/FireUSD.sol +26 -0
- package/contracts/examples/unpermissioned/SimpleDistribution.sol +57 -0
- package/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol +28 -0
- package/contracts/examples/unpermissioned/SimpleOracle.sol +137 -0
- package/contracts/examples/unpermissioned/SimplePool.sol +106 -0
- package/contracts/examples/unpermissioned/SimplePoolAuthorization.sol +28 -0
- package/contracts/examples/unpermissioned/SimpleProduct.sol +377 -0
- package/contracts/examples/unpermissioned/SimpleProductAuthorization.sol +28 -0
- package/contracts/instance/BundleSet.sol +130 -0
- package/contracts/instance/IInstance.sol +27 -44
- package/contracts/instance/IInstanceService.sol +16 -41
- package/contracts/instance/Instance.sol +103 -119
- package/contracts/instance/InstanceAdmin.sol +346 -240
- package/contracts/instance/InstanceAuthorizationV3.sol +213 -0
- package/contracts/instance/InstanceReader.sol +293 -48
- package/contracts/instance/InstanceService.sol +145 -180
- package/contracts/instance/InstanceServiceManager.sol +8 -13
- package/contracts/instance/InstanceStore.sol +29 -3
- package/contracts/instance/RiskSet.sol +118 -0
- package/contracts/instance/base/ObjectCounter.sol +1 -2
- package/contracts/instance/base/ObjectLifecycle.sol +11 -4
- package/contracts/instance/base/ObjectSet.sol +77 -0
- package/contracts/instance/base/ObjectSetHelperLib.sol +30 -0
- package/contracts/instance/module/IBundle.sol +1 -1
- package/contracts/instance/module/IComponents.sol +14 -15
- package/contracts/instance/module/IDistribution.sol +2 -2
- package/contracts/instance/module/IPolicy.sol +26 -25
- package/contracts/instance/module/IRisk.sol +3 -0
- package/contracts/mock/Dip.sol +1 -1
- package/contracts/oracle/BasicOracle.sol +47 -0
- package/contracts/oracle/BasicOracleAuthorization.sol +37 -0
- package/contracts/oracle/IOracle.sol +16 -0
- package/contracts/oracle/IOracleComponent.sol +2 -1
- package/contracts/oracle/IOracleService.sol +2 -1
- package/contracts/oracle/Oracle.sol +64 -53
- package/contracts/oracle/OracleService.sol +113 -81
- package/contracts/oracle/OracleServiceManager.sol +8 -11
- package/contracts/pool/BasicPool.sol +175 -0
- package/contracts/pool/BasicPoolAuthorization.sol +76 -0
- package/contracts/pool/BundleService.sol +204 -105
- package/contracts/pool/BundleServiceManager.sol +8 -11
- package/contracts/pool/IBundleService.sol +31 -22
- package/contracts/pool/IPoolComponent.sol +20 -70
- package/contracts/pool/IPoolService.sol +90 -75
- package/contracts/pool/Pool.sol +209 -163
- package/contracts/pool/PoolLib.sol +216 -0
- package/contracts/pool/PoolService.sol +546 -241
- package/contracts/pool/PoolServiceManager.sol +6 -9
- package/contracts/product/ApplicationService.sol +83 -78
- package/contracts/product/ApplicationServiceManager.sol +6 -6
- package/contracts/product/BasicProduct.sol +51 -0
- package/contracts/product/BasicProductAuthorization.sol +56 -0
- package/contracts/product/ClaimService.sol +365 -175
- package/contracts/product/ClaimServiceManager.sol +6 -6
- package/contracts/product/IApplicationService.sol +6 -2
- package/contracts/product/IClaimService.sol +44 -8
- package/contracts/product/IPolicyService.sol +53 -36
- package/contracts/product/IPricingService.sol +10 -10
- package/contracts/product/IProductComponent.sol +29 -9
- package/contracts/product/{IProductService.sol → IRiskService.sol} +1 -1
- package/contracts/product/PolicyService.sol +476 -269
- package/contracts/product/PolicyServiceLib.sol +65 -0
- package/contracts/product/PolicyServiceManager.sol +6 -9
- package/contracts/product/PricingService.sol +66 -62
- package/contracts/product/PricingServiceManager.sol +6 -9
- package/contracts/product/Product.sol +233 -132
- package/contracts/product/RiskService.sol +145 -0
- package/contracts/product/RiskServiceManager.sol +39 -0
- package/contracts/registry/ChainNft.sol +72 -40
- package/contracts/registry/IRegistry.sol +74 -32
- package/contracts/registry/IRegistryService.sol +3 -10
- package/contracts/registry/IRelease.sol +26 -0
- package/contracts/registry/ITransferInterceptor.sol +1 -2
- package/contracts/registry/Registry.sol +368 -220
- package/contracts/registry/RegistryAdmin.sol +238 -219
- package/contracts/registry/RegistryService.sol +41 -66
- package/contracts/registry/RegistryServiceManager.sol +5 -5
- package/contracts/registry/ReleaseAdmin.sol +245 -0
- package/contracts/registry/ReleaseLifecycle.sol +8 -3
- package/contracts/registry/ReleaseRegistry.sol +511 -0
- package/contracts/registry/ServiceAuthorizationV3.sol +107 -60
- package/contracts/registry/TokenRegistry.sol +8 -10
- package/contracts/shared/Component.sol +74 -128
- package/contracts/shared/ComponentService.sol +456 -384
- package/contracts/shared/ComponentServiceManager.sol +10 -7
- package/contracts/shared/ComponentVerifyingService.sol +29 -18
- package/contracts/shared/ContractLib.sol +253 -0
- package/contracts/shared/IComponent.sol +8 -17
- package/contracts/shared/IComponentService.sol +49 -39
- package/contracts/shared/IInstanceLinkedComponent.sol +10 -26
- package/contracts/shared/ILifecycle.sol +3 -1
- package/contracts/shared/INftOwnable.sol +2 -0
- package/contracts/shared/IPolicyHolder.sol +12 -22
- package/contracts/shared/IRegisterable.sol +23 -1
- package/contracts/shared/IService.sol +4 -6
- package/contracts/shared/{ERC165.sol → InitializableERC165.sol} +3 -3
- package/contracts/shared/InstanceLinkedComponent.sol +96 -43
- package/contracts/shared/KeyValueStore.sol +1 -1
- package/contracts/shared/Lifecycle.sol +15 -4
- package/contracts/shared/{NftIdSetManager.sol → NftIdSet.sol} +1 -1
- package/contracts/shared/NftOwnable.sol +31 -11
- package/contracts/shared/PolicyHolder.sol +17 -57
- package/contracts/shared/Registerable.sol +55 -21
- package/contracts/shared/RegistryLinked.sol +9 -14
- package/contracts/shared/Service.sol +18 -36
- package/contracts/shared/TokenHandler.sol +309 -26
- package/contracts/shared/TokenHandlerDeployerLib.sol +20 -0
- package/contracts/staking/IStaking.sol +9 -13
- package/contracts/staking/IStakingService.sol +24 -9
- package/contracts/staking/StakeManagerLib.sol +85 -43
- package/contracts/staking/Staking.sol +96 -79
- package/contracts/staking/StakingManager.sol +10 -12
- package/contracts/staking/StakingReader.sol +21 -33
- package/contracts/staking/StakingService.sol +79 -37
- package/contracts/staking/StakingServiceManager.sol +8 -7
- package/contracts/staking/StakingStore.sol +12 -22
- package/contracts/staking/TargetManagerLib.sol +7 -3
- package/contracts/type/Amount.sol +27 -5
- package/contracts/type/Blocknumber.sol +7 -1
- package/contracts/type/ClaimId.sol +6 -1
- package/contracts/type/Key32.sol +2 -2
- package/contracts/type/Key32Set.sol +62 -0
- package/contracts/type/NftId.sol +7 -0
- package/contracts/type/ObjectType.sol +89 -27
- package/contracts/type/PayoutId.sol +10 -10
- package/contracts/type/Referral.sol +1 -0
- package/contracts/type/RiskId.sol +35 -4
- package/contracts/type/RoleId.sol +75 -94
- package/contracts/type/Seconds.sol +21 -1
- package/contracts/type/Selector.sol +5 -0
- package/contracts/type/StateId.sol +15 -1
- package/contracts/type/Timestamp.sol +10 -5
- package/contracts/type/UFixed.sol +40 -121
- package/contracts/type/Version.sol +18 -6
- package/contracts/{shared → upgradeability}/ProxyManager.sol +71 -38
- package/contracts/{shared → upgradeability}/UpgradableProxyWithAdmin.sol +1 -3
- package/contracts/{shared → upgradeability}/Versionable.sol +2 -2
- package/package.json +6 -5
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +0 -4
- package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +0 -709
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.dbg.json +0 -4
- package/artifacts/contracts/instance/InstanceAuthorizationsLib.sol/InstanceAuthorizationsLib.json +0 -228
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.dbg.json +0 -4
- package/artifacts/contracts/instance/base/ObjectManager.sol/ObjectManager.json +0 -187
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +0 -4
- package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +0 -129
- package/artifacts/contracts/product/IProductService.sol/IProductService.dbg.json +0 -4
- package/artifacts/contracts/product/ProductService.sol/ProductService.dbg.json +0 -4
- package/artifacts/contracts/product/ProductService.sol/ProductService.json +0 -708
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.dbg.json +0 -4
- package/artifacts/contracts/product/ProductServiceManager.sol/ProductServiceManager.json +0 -702
- package/artifacts/contracts/registry/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +0 -4
- package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +0 -1177
- package/artifacts/contracts/registry/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +0 -4
- package/artifacts/contracts/registry/ServiceAuthorization.sol/ServiceAuthorization.json +0 -190
- package/artifacts/contracts/shared/AccessAdmin.sol/AccessAdmin.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessAdmin.sol/AccessAdmin.json +0 -1559
- package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerCustom.sol/AccessManagerCustom.json +0 -1193
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtended.sol/AccessManagerExtended.json +0 -1747
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedInitializeable.sol/AccessManagerExtendedInitializeable.json +0 -1760
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisable.sol/AccessManagerExtendedWithDisable.json +0 -1838
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.dbg.json +0 -4
- package/artifacts/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol/AccessManagerExtendedWithDisableInitializeable.json +0 -1856
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +0 -4
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +0 -73
- package/artifacts/contracts/shared/IAccessAdmin.sol/IAccessAdmin.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtended.sol/IAccessManagerExtended.json +0 -1562
- package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.dbg.json +0 -4
- package/artifacts/contracts/shared/IAccessManagerExtendedWithDisable.sol/IAccessManagerExtendedWithDisable.json +0 -1600
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +0 -4
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.dbg.json +0 -4
- package/artifacts/contracts/shared/InitializableCustom.sol/InitializableCustom.json +0 -39
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.dbg.json +0 -4
- package/artifacts/contracts/shared/NftIdSetManager.sol/NftIdSetManager.json +0 -306
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +0 -4
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +0 -617
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +0 -4
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +0 -129
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +0 -4
- package/artifacts/contracts/type/UFixed.sol/MathLib.dbg.json +0 -4
- package/artifacts/contracts/type/UFixed.sol/MathLib.json +0 -10
- package/contracts/instance/BundleManager.sol +0 -126
- package/contracts/instance/InstanceAuthorizationsLib.sol +0 -377
- package/contracts/instance/base/ObjectManager.sol +0 -80
- package/contracts/instance/module/IAccess.sol +0 -46
- package/contracts/product/ProductService.sol +0 -124
- package/contracts/product/ProductServiceManager.sol +0 -42
- package/contracts/registry/ReleaseManager.sol +0 -503
- package/contracts/shared/AccessManagerCustom.sol +0 -741
- package/contracts/shared/AccessManagerExtended.sol +0 -481
- package/contracts/shared/AccessManagerExtendedInitializeable.sol +0 -13
- package/contracts/shared/AccessManagerExtendedWithDisable.sol +0 -137
- package/contracts/shared/AccessManagerExtendedWithDisableInitializeable.sol +0 -14
- package/contracts/shared/IAccessManagerExtended.sol +0 -74
- package/contracts/shared/IAccessManagerExtendedWithDisable.sol +0 -18
- package/contracts/shared/InitializableCustom.sol +0 -177
- /package/contracts/{shared → upgradeability}/IVersionable.sol +0 -0
| @@ -0,0 +1,129 @@ | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "_format": "hh-sol-artifact-1",
         | 
| 3 | 
            +
              "contractName": "UpgradableProxyWithAdmin",
         | 
| 4 | 
            +
              "sourceName": "contracts/upgradeability/UpgradableProxyWithAdmin.sol",
         | 
| 5 | 
            +
              "abi": [
         | 
| 6 | 
            +
                {
         | 
| 7 | 
            +
                  "inputs": [
         | 
| 8 | 
            +
                    {
         | 
| 9 | 
            +
                      "internalType": "address",
         | 
| 10 | 
            +
                      "name": "implementation",
         | 
| 11 | 
            +
                      "type": "address"
         | 
| 12 | 
            +
                    },
         | 
| 13 | 
            +
                    {
         | 
| 14 | 
            +
                      "internalType": "address",
         | 
| 15 | 
            +
                      "name": "initialProxyAdminOwner",
         | 
| 16 | 
            +
                      "type": "address"
         | 
| 17 | 
            +
                    },
         | 
| 18 | 
            +
                    {
         | 
| 19 | 
            +
                      "internalType": "bytes",
         | 
| 20 | 
            +
                      "name": "data",
         | 
| 21 | 
            +
                      "type": "bytes"
         | 
| 22 | 
            +
                    }
         | 
| 23 | 
            +
                  ],
         | 
| 24 | 
            +
                  "stateMutability": "nonpayable",
         | 
| 25 | 
            +
                  "type": "constructor"
         | 
| 26 | 
            +
                },
         | 
| 27 | 
            +
                {
         | 
| 28 | 
            +
                  "inputs": [
         | 
| 29 | 
            +
                    {
         | 
| 30 | 
            +
                      "internalType": "address",
         | 
| 31 | 
            +
                      "name": "target",
         | 
| 32 | 
            +
                      "type": "address"
         | 
| 33 | 
            +
                    }
         | 
| 34 | 
            +
                  ],
         | 
| 35 | 
            +
                  "name": "AddressEmptyCode",
         | 
| 36 | 
            +
                  "type": "error"
         | 
| 37 | 
            +
                },
         | 
| 38 | 
            +
                {
         | 
| 39 | 
            +
                  "inputs": [
         | 
| 40 | 
            +
                    {
         | 
| 41 | 
            +
                      "internalType": "address",
         | 
| 42 | 
            +
                      "name": "admin",
         | 
| 43 | 
            +
                      "type": "address"
         | 
| 44 | 
            +
                    }
         | 
| 45 | 
            +
                  ],
         | 
| 46 | 
            +
                  "name": "ERC1967InvalidAdmin",
         | 
| 47 | 
            +
                  "type": "error"
         | 
| 48 | 
            +
                },
         | 
| 49 | 
            +
                {
         | 
| 50 | 
            +
                  "inputs": [
         | 
| 51 | 
            +
                    {
         | 
| 52 | 
            +
                      "internalType": "address",
         | 
| 53 | 
            +
                      "name": "implementation",
         | 
| 54 | 
            +
                      "type": "address"
         | 
| 55 | 
            +
                    }
         | 
| 56 | 
            +
                  ],
         | 
| 57 | 
            +
                  "name": "ERC1967InvalidImplementation",
         | 
| 58 | 
            +
                  "type": "error"
         | 
| 59 | 
            +
                },
         | 
| 60 | 
            +
                {
         | 
| 61 | 
            +
                  "inputs": [],
         | 
| 62 | 
            +
                  "name": "ERC1967NonPayable",
         | 
| 63 | 
            +
                  "type": "error"
         | 
| 64 | 
            +
                },
         | 
| 65 | 
            +
                {
         | 
| 66 | 
            +
                  "inputs": [],
         | 
| 67 | 
            +
                  "name": "FailedInnerCall",
         | 
| 68 | 
            +
                  "type": "error"
         | 
| 69 | 
            +
                },
         | 
| 70 | 
            +
                {
         | 
| 71 | 
            +
                  "inputs": [],
         | 
| 72 | 
            +
                  "name": "ProxyDeniedAdminAccess",
         | 
| 73 | 
            +
                  "type": "error"
         | 
| 74 | 
            +
                },
         | 
| 75 | 
            +
                {
         | 
| 76 | 
            +
                  "anonymous": false,
         | 
| 77 | 
            +
                  "inputs": [
         | 
| 78 | 
            +
                    {
         | 
| 79 | 
            +
                      "indexed": false,
         | 
| 80 | 
            +
                      "internalType": "address",
         | 
| 81 | 
            +
                      "name": "previousAdmin",
         | 
| 82 | 
            +
                      "type": "address"
         | 
| 83 | 
            +
                    },
         | 
| 84 | 
            +
                    {
         | 
| 85 | 
            +
                      "indexed": false,
         | 
| 86 | 
            +
                      "internalType": "address",
         | 
| 87 | 
            +
                      "name": "newAdmin",
         | 
| 88 | 
            +
                      "type": "address"
         | 
| 89 | 
            +
                    }
         | 
| 90 | 
            +
                  ],
         | 
| 91 | 
            +
                  "name": "AdminChanged",
         | 
| 92 | 
            +
                  "type": "event"
         | 
| 93 | 
            +
                },
         | 
| 94 | 
            +
                {
         | 
| 95 | 
            +
                  "anonymous": false,
         | 
| 96 | 
            +
                  "inputs": [
         | 
| 97 | 
            +
                    {
         | 
| 98 | 
            +
                      "indexed": true,
         | 
| 99 | 
            +
                      "internalType": "address",
         | 
| 100 | 
            +
                      "name": "implementation",
         | 
| 101 | 
            +
                      "type": "address"
         | 
| 102 | 
            +
                    }
         | 
| 103 | 
            +
                  ],
         | 
| 104 | 
            +
                  "name": "Upgraded",
         | 
| 105 | 
            +
                  "type": "event"
         | 
| 106 | 
            +
                },
         | 
| 107 | 
            +
                {
         | 
| 108 | 
            +
                  "stateMutability": "payable",
         | 
| 109 | 
            +
                  "type": "fallback"
         | 
| 110 | 
            +
                },
         | 
| 111 | 
            +
                {
         | 
| 112 | 
            +
                  "inputs": [],
         | 
| 113 | 
            +
                  "name": "getProxyAdmin",
         | 
| 114 | 
            +
                  "outputs": [
         | 
| 115 | 
            +
                    {
         | 
| 116 | 
            +
                      "internalType": "contract ProxyAdmin",
         | 
| 117 | 
            +
                      "name": "",
         | 
| 118 | 
            +
                      "type": "address"
         | 
| 119 | 
            +
                    }
         | 
| 120 | 
            +
                  ],
         | 
| 121 | 
            +
                  "stateMutability": "nonpayable",
         | 
| 122 | 
            +
                  "type": "function"
         | 
| 123 | 
            +
                }
         | 
| 124 | 
            +
              ],
         | 
| 125 | 
            +
              "bytecode": "0x60a060405234801561000f575f80fd5b50604051610e4c380380610e4c83398101604081905261002e9161037c565b828282828161003d828261009e565b50508160405161004c90610340565b6001600160a01b039091168152602001604051809103905ff080158015610075573d5f803e3d5ffd5b506001600160a01b031660805261009361008e60805190565b6100fc565b505050505050610463565b6100a782610169565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156100f0576100eb82826101e7565b505050565b6100f861025a565b5050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61013b5f80516020610e2c833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a16101668161027b565b50565b806001600160a01b03163b5f036101a357604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b60605f80846001600160a01b031684604051610203919061044d565b5f60405180830381855af49150503d805f811461023b576040519150601f19603f3d011682016040523d82523d5f602084013e610240565b606091505b5090925090506102518583836102b8565b95945050505050565b34156102795760405163b398979f60e01b815260040160405180910390fd5b565b6001600160a01b0381166102a457604051633173bdd160e11b81525f600482015260240161019a565b805f80516020610e2c8339815191526101c6565b6060826102cd576102c882610317565b610310565b81511580156102e457506001600160a01b0384163b155b1561030d57604051639996b31560e01b81526001600160a01b038516600482015260240161019a565b50805b9392505050565b8051156103275780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6104ef8061093d83390190565b80516001600160a01b0381168114610363575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f805f6060848603121561038e575f80fd5b6103978461034d565b92506103a56020850161034d565b60408501519092506001600160401b038111156103c0575f80fd5b8401601f810186136103d0575f80fd5b80516001600160401b038111156103e9576103e9610368565b604051601f8201601f19908116603f011681016001600160401b038111828210171561041757610417610368565b60405281815282820160200188101561042e575f80fd5b8160208401602083015e5f602083830101528093505050509250925092565b5f82518060208501845e5f920191825250919050565b6080516104bd6104805f395f818160350152607201526104bd5ff3fe60806040526004361061001d575f3560e01c80638b3240a014610027575b610025610070565b005b348015610032575f80fd5b507f00000000000000000000000000000000000000000000000000000000000000006040516001600160a01b03909116815260200160405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100dc575f356001600160e01b03191663278f794360e11b146100d2576040516334ad5dbb60e21b815260040160405180910390fd5b6100da6100e9565b565b6100da610117565b905090565b5f806100f83660048184610365565b81019061010591906103a0565b915091506101138282610127565b5050565b6100da610122610181565b6101b3565b610130826101d1565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a280511561017957610174828261024c565b505050565b6101136102be565b5f6100e47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b365f80375f80365f845af43d5f803e8080156101cd573d5ff35b3d5ffd5b806001600160a01b03163b5f0361020b57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60605f80846001600160a01b0316846040516102689190610471565b5f60405180830381855af49150503d805f81146102a0576040519150601f19603f3d011682016040523d82523d5f602084013e6102a5565b606091505b50915091506102b58583836102dd565b95945050505050565b34156100da5760405163b398979f60e01b815260040160405180910390fd5b6060826102f2576102ed8261033c565b610335565b815115801561030957506001600160a01b0384163b155b1561033257604051639996b31560e01b81526001600160a01b0385166004820152602401610202565b50805b9392505050565b80511561034c5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f8085851115610373575f80fd5b8386111561037f575f80fd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f80604083850312156103b1575f80fd5b82356001600160a01b03811681146103c7575f80fd5b9150602083013567ffffffffffffffff8111156103e2575f80fd5b8301601f810185136103f2575f80fd5b803567ffffffffffffffff81111561040c5761040c61038c565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561043b5761043b61038c565b604052818152828201602001871015610452575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fea26469706673582212205f12e4d638be8d591db7c67d942f3e9eeb14e9e44f78ba8cddaca37631bdc49764736f6c634300081a0033608060405234801561000f575f80fd5b506040516104ef3803806104ef83398101604081905261002e916100bb565b806001600160a01b03811661005c57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6100658161006c565b50506100e8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156100cb575f80fd5b81516001600160a01b03811681146100e1575f80fd5b9392505050565b6103fa806100f55f395ff3fe608060405260043610610049575f3560e01c8063715018a61461004d5780638da5cb5b146100635780639623609d1461008e578063ad3cb1cc146100a1578063f2fde38b146100de575b5f80fd5b348015610058575f80fd5b506100616100fd565b005b34801561006e575f80fd5b505f546040516001600160a01b0390911681526020015b60405180910390f35b61006161009c366004610260565b610110565b3480156100ac575f80fd5b506100d1604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100859190610365565b3480156100e9575f80fd5b506100616100f836600461037e565b61017b565b6101056101bd565b61010e5f6101e9565b565b6101186101bd565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906101489086908690600401610399565b5f604051808303818588803b15801561015f575f80fd5b505af1158015610171573d5f803e3d5ffd5b5050505050505050565b6101836101bd565b6001600160a01b0381166101b157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101ba816101e9565b50565b5f546001600160a01b0316331461010e5760405163118cdaa760e01b81523360048201526024016101a8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101ba575f80fd5b634e487b7160e01b5f52604160045260245ffd5b5f805f60608486031215610272575f80fd5b833561027d81610238565b9250602084013561028d81610238565b9150604084013567ffffffffffffffff8111156102a8575f80fd5b8401601f810186136102b8575f80fd5b803567ffffffffffffffff8111156102d2576102d261024c565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156103015761030161024c565b604052818152828201602001881015610318575f80fd5b816020840160208301375f602083830101528093505050509250925092565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6103776020830184610337565b9392505050565b5f6020828403121561038e575f80fd5b813561037781610238565b6001600160a01b03831681526040602082018190525f906103bc90830184610337565b94935050505056fea264697066735822122063012ab3c3421087c307802be7295f03bec95db9eea702a4c2db9595befa162464736f6c634300081a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103",
         | 
| 126 | 
            +
              "deployedBytecode": "0x60806040526004361061001d575f3560e01c80638b3240a014610027575b610025610070565b005b348015610032575f80fd5b507f00000000000000000000000000000000000000000000000000000000000000006040516001600160a01b03909116815260200160405180910390f35b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031633036100dc575f356001600160e01b03191663278f794360e11b146100d2576040516334ad5dbb60e21b815260040160405180910390fd5b6100da6100e9565b565b6100da610117565b905090565b5f806100f83660048184610365565b81019061010591906103a0565b915091506101138282610127565b5050565b6100da610122610181565b6101b3565b610130826101d1565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a280511561017957610174828261024c565b505050565b6101136102be565b5f6100e47f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b365f80375f80365f845af43d5f803e8080156101cd573d5ff35b3d5ffd5b806001600160a01b03163b5f0361020b57604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60605f80846001600160a01b0316846040516102689190610471565b5f60405180830381855af49150503d805f81146102a0576040519150601f19603f3d011682016040523d82523d5f602084013e6102a5565b606091505b50915091506102b58583836102dd565b95945050505050565b34156100da5760405163b398979f60e01b815260040160405180910390fd5b6060826102f2576102ed8261033c565b610335565b815115801561030957506001600160a01b0384163b155b1561033257604051639996b31560e01b81526001600160a01b0385166004820152602401610202565b50805b9392505050565b80511561034c5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b5f8085851115610373575f80fd5b8386111561037f575f80fd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f80604083850312156103b1575f80fd5b82356001600160a01b03811681146103c7575f80fd5b9150602083013567ffffffffffffffff8111156103e2575f80fd5b8301601f810185136103f2575f80fd5b803567ffffffffffffffff81111561040c5761040c61038c565b604051601f8201601f19908116603f0116810167ffffffffffffffff8111828210171561043b5761043b61038c565b604052818152828201602001871015610452575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fea26469706673582212205f12e4d638be8d591db7c67d942f3e9eeb14e9e44f78ba8cddaca37631bdc49764736f6c634300081a0033",
         | 
| 127 | 
            +
              "linkReferences": {},
         | 
| 128 | 
            +
              "deployedLinkReferences": {}
         | 
| 129 | 
            +
            }
         | 
| @@ -0,0 +1,262 @@ | |
| 1 | 
            +
            // SPDX-License-Identifier: Apache-2.0
         | 
| 2 | 
            +
            pragma solidity ^0.8.20;
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            import {Amount, AmountLib} from "../type/Amount.sol";
         | 
| 5 | 
            +
            import {Fee} from "../type/Fee.sol";
         | 
| 6 | 
            +
            import {IAccountingService} from "./IAccountingService.sol";
         | 
| 7 | 
            +
            import {InstanceStore} from "../instance/InstanceStore.sol";
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            import {Amount, AmountLib} from "../type/Amount.sol";
         | 
| 10 | 
            +
            import {Fee} from "../type/Fee.sol";
         | 
| 11 | 
            +
            import {NftId} from "../type/NftId.sol";
         | 
| 12 | 
            +
            import {ObjectType, ACCOUNTING, BUNDLE, DISTRIBUTION, DISTRIBUTOR, POOL, PRODUCT} from "../type/ObjectType.sol";
         | 
| 13 | 
            +
            import {Service} from "../shared/Service.sol";
         | 
| 14 | 
            +
             | 
| 15 | 
            +
             | 
| 16 | 
            +
            contract AccountingService is
         | 
| 17 | 
            +
                Service,
         | 
| 18 | 
            +
                IAccountingService
         | 
| 19 | 
            +
            {
         | 
| 20 | 
            +
                bool private constant INCREASE = true;
         | 
| 21 | 
            +
                bool private constant DECREASE = false;
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                function _initialize(
         | 
| 24 | 
            +
                    address owner, 
         | 
| 25 | 
            +
                    bytes memory data
         | 
| 26 | 
            +
                )
         | 
| 27 | 
            +
                    internal
         | 
| 28 | 
            +
                    virtual override
         | 
| 29 | 
            +
                    initializer()
         | 
| 30 | 
            +
                {
         | 
| 31 | 
            +
                    (
         | 
| 32 | 
            +
                        address authority,
         | 
| 33 | 
            +
                        address registry
         | 
| 34 | 
            +
                    ) = abi.decode(data, (address, address));
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                    __Service_init(authority, registry, owner);
         | 
| 37 | 
            +
                    _registerInterface(type(IAccountingService).interfaceId);
         | 
| 38 | 
            +
                }
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                function decreaseComponentFees(
         | 
| 41 | 
            +
                    InstanceStore instanceStore, 
         | 
| 42 | 
            +
                    NftId componentNftId, 
         | 
| 43 | 
            +
                    Amount feeAmount
         | 
| 44 | 
            +
                ) 
         | 
| 45 | 
            +
                    external
         | 
| 46 | 
            +
                    virtual
         | 
| 47 | 
            +
                    restricted()
         | 
| 48 | 
            +
                {
         | 
| 49 | 
            +
                    _changeTargetBalance(DECREASE, instanceStore, componentNftId, AmountLib.zero(), feeAmount);    
         | 
| 50 | 
            +
                }
         | 
| 51 | 
            +
             | 
| 52 | 
            +
             | 
| 53 | 
            +
                function increaseProductFees(
         | 
| 54 | 
            +
                    InstanceStore instanceStore,
         | 
| 55 | 
            +
                    NftId productNftId, 
         | 
| 56 | 
            +
                    Amount feeAmount
         | 
| 57 | 
            +
                ) 
         | 
| 58 | 
            +
                    external 
         | 
| 59 | 
            +
                    virtual 
         | 
| 60 | 
            +
                    restricted()
         | 
| 61 | 
            +
                {
         | 
| 62 | 
            +
                    _checkNftType(productNftId, PRODUCT());
         | 
| 63 | 
            +
                    _changeTargetBalance(INCREASE, instanceStore, productNftId, AmountLib.zero(), feeAmount);
         | 
| 64 | 
            +
                }
         | 
| 65 | 
            +
             | 
| 66 | 
            +
             | 
| 67 | 
            +
                function decreaseProductFees(InstanceStore instanceStore, NftId productNftId, Amount feeAmount)
         | 
| 68 | 
            +
                    external 
         | 
| 69 | 
            +
                    virtual 
         | 
| 70 | 
            +
                    restricted()
         | 
| 71 | 
            +
                {
         | 
| 72 | 
            +
                    _checkNftType(productNftId, PRODUCT());
         | 
| 73 | 
            +
                    _changeTargetBalance(DECREASE, instanceStore, productNftId, AmountLib.zero(), feeAmount);
         | 
| 74 | 
            +
                }
         | 
| 75 | 
            +
             | 
| 76 | 
            +
                function increaseDistributionBalance(
         | 
| 77 | 
            +
                    InstanceStore instanceStore, 
         | 
| 78 | 
            +
                    NftId distributionNftId, 
         | 
| 79 | 
            +
                    Amount amount,
         | 
| 80 | 
            +
                    Amount feeAmount
         | 
| 81 | 
            +
                )
         | 
| 82 | 
            +
                    external
         | 
| 83 | 
            +
                    virtual
         | 
| 84 | 
            +
                    restricted()
         | 
| 85 | 
            +
                {
         | 
| 86 | 
            +
                    _checkNftType(distributionNftId, DISTRIBUTION());
         | 
| 87 | 
            +
                    _changeTargetBalance(INCREASE, instanceStore, distributionNftId, amount, feeAmount);
         | 
| 88 | 
            +
                }
         | 
| 89 | 
            +
             | 
| 90 | 
            +
             | 
| 91 | 
            +
                function decreaseDistributionBalance(
         | 
| 92 | 
            +
                    InstanceStore instanceStore, 
         | 
| 93 | 
            +
                    NftId distributionNftId, 
         | 
| 94 | 
            +
                    Amount amount,
         | 
| 95 | 
            +
                    Amount feeAmount
         | 
| 96 | 
            +
                )
         | 
| 97 | 
            +
                    external
         | 
| 98 | 
            +
                    virtual
         | 
| 99 | 
            +
                    restricted()
         | 
| 100 | 
            +
                {
         | 
| 101 | 
            +
                    _checkNftType(distributionNftId, DISTRIBUTION());
         | 
| 102 | 
            +
                    _changeTargetBalance(DECREASE, instanceStore, distributionNftId, amount, feeAmount);
         | 
| 103 | 
            +
                }
         | 
| 104 | 
            +
             | 
| 105 | 
            +
                function increaseDistributorBalance(
         | 
| 106 | 
            +
                    InstanceStore instanceStore, 
         | 
| 107 | 
            +
                    NftId distributorNftId, 
         | 
| 108 | 
            +
                    Amount amount, 
         | 
| 109 | 
            +
                    Amount feeAmount
         | 
| 110 | 
            +
                )
         | 
| 111 | 
            +
                    external
         | 
| 112 | 
            +
                    virtual
         | 
| 113 | 
            +
                    restricted()
         | 
| 114 | 
            +
                {
         | 
| 115 | 
            +
                    _checkNftType(distributorNftId, DISTRIBUTOR());
         | 
| 116 | 
            +
                    _changeTargetBalance(INCREASE, instanceStore, distributorNftId, amount, feeAmount);
         | 
| 117 | 
            +
                }
         | 
| 118 | 
            +
             | 
| 119 | 
            +
                function decreaseDistributorBalance(
         | 
| 120 | 
            +
                    InstanceStore instanceStore, 
         | 
| 121 | 
            +
                    NftId distributorNftId, 
         | 
| 122 | 
            +
                    Amount amount, 
         | 
| 123 | 
            +
                    Amount feeAmount
         | 
| 124 | 
            +
                )
         | 
| 125 | 
            +
                    external
         | 
| 126 | 
            +
                    virtual
         | 
| 127 | 
            +
                    restricted()
         | 
| 128 | 
            +
                {
         | 
| 129 | 
            +
                    _checkNftType(distributorNftId, DISTRIBUTOR());
         | 
| 130 | 
            +
                    _changeTargetBalance(DECREASE, instanceStore, distributorNftId, amount, feeAmount);
         | 
| 131 | 
            +
                }
         | 
| 132 | 
            +
             | 
| 133 | 
            +
                function increasePoolBalance(
         | 
| 134 | 
            +
                    InstanceStore instanceStore, 
         | 
| 135 | 
            +
                    NftId poolNftId, 
         | 
| 136 | 
            +
                    Amount amount, 
         | 
| 137 | 
            +
                    Amount feeAmount
         | 
| 138 | 
            +
                )
         | 
| 139 | 
            +
                    public 
         | 
| 140 | 
            +
                    virtual 
         | 
| 141 | 
            +
                    restricted()
         | 
| 142 | 
            +
                {
         | 
| 143 | 
            +
                    _checkNftType(poolNftId, POOL());
         | 
| 144 | 
            +
                    _changeTargetBalance(INCREASE, instanceStore, poolNftId, amount, feeAmount);
         | 
| 145 | 
            +
                }
         | 
| 146 | 
            +
             | 
| 147 | 
            +
                function decreasePoolBalance(
         | 
| 148 | 
            +
                    InstanceStore instanceStore, 
         | 
| 149 | 
            +
                    NftId poolNftId, 
         | 
| 150 | 
            +
                    Amount amount, 
         | 
| 151 | 
            +
                    Amount feeAmount
         | 
| 152 | 
            +
                )
         | 
| 153 | 
            +
                    public 
         | 
| 154 | 
            +
                    virtual 
         | 
| 155 | 
            +
                    // TODO re-enable once role granting is stable and fixed
         | 
| 156 | 
            +
                    // restricted()
         | 
| 157 | 
            +
                {
         | 
| 158 | 
            +
                    _checkNftType(poolNftId, POOL());
         | 
| 159 | 
            +
                    _changeTargetBalance(DECREASE, instanceStore, poolNftId, amount, feeAmount);
         | 
| 160 | 
            +
                }
         | 
| 161 | 
            +
             | 
| 162 | 
            +
                function increaseBundleBalance(
         | 
| 163 | 
            +
                    InstanceStore instanceStore, 
         | 
| 164 | 
            +
                    NftId bundleNftId, 
         | 
| 165 | 
            +
                    Amount amount, 
         | 
| 166 | 
            +
                    Amount feeAmount
         | 
| 167 | 
            +
                )
         | 
| 168 | 
            +
                    external
         | 
| 169 | 
            +
                    virtual
         | 
| 170 | 
            +
                    restricted()
         | 
| 171 | 
            +
                {
         | 
| 172 | 
            +
                    _checkNftType(bundleNftId, BUNDLE());
         | 
| 173 | 
            +
                    _changeTargetBalance(INCREASE, instanceStore, bundleNftId, amount, feeAmount);
         | 
| 174 | 
            +
                }
         | 
| 175 | 
            +
             | 
| 176 | 
            +
                function decreaseBundleBalance(
         | 
| 177 | 
            +
                    InstanceStore instanceStore, 
         | 
| 178 | 
            +
                    NftId bundleNftId, 
         | 
| 179 | 
            +
                    Amount amount, 
         | 
| 180 | 
            +
                    Amount feeAmount
         | 
| 181 | 
            +
                )
         | 
| 182 | 
            +
                    external
         | 
| 183 | 
            +
                    virtual
         | 
| 184 | 
            +
                    restricted()
         | 
| 185 | 
            +
                {
         | 
| 186 | 
            +
                    _checkNftType(bundleNftId, BUNDLE());
         | 
| 187 | 
            +
                    _changeTargetBalance(DECREASE, instanceStore, bundleNftId, amount, feeAmount);
         | 
| 188 | 
            +
                }
         | 
| 189 | 
            +
             | 
| 190 | 
            +
                function increaseBundleBalanceForPool(
         | 
| 191 | 
            +
                    InstanceStore instanceStore, 
         | 
| 192 | 
            +
                    NftId bundleNftId, 
         | 
| 193 | 
            +
                    Amount amount, 
         | 
| 194 | 
            +
                    Amount feeAmount
         | 
| 195 | 
            +
                )
         | 
| 196 | 
            +
                    external
         | 
| 197 | 
            +
                    virtual
         | 
| 198 | 
            +
                    restricted()
         | 
| 199 | 
            +
                {
         | 
| 200 | 
            +
                    _checkNftType(bundleNftId, BUNDLE());
         | 
| 201 | 
            +
                    _changeTargetBalance(INCREASE, instanceStore, bundleNftId, amount, feeAmount);
         | 
| 202 | 
            +
                }
         | 
| 203 | 
            +
             | 
| 204 | 
            +
                function decreaseBundleBalanceForPool(
         | 
| 205 | 
            +
                    InstanceStore instanceStore, 
         | 
| 206 | 
            +
                    NftId bundleNftId, 
         | 
| 207 | 
            +
                    Amount amount, 
         | 
| 208 | 
            +
                    Amount feeAmount
         | 
| 209 | 
            +
                )
         | 
| 210 | 
            +
                    external
         | 
| 211 | 
            +
                    virtual
         | 
| 212 | 
            +
                    restricted()
         | 
| 213 | 
            +
                {
         | 
| 214 | 
            +
                    _checkNftType(bundleNftId, BUNDLE());
         | 
| 215 | 
            +
                    _changeTargetBalance(DECREASE, instanceStore, bundleNftId, amount, feeAmount);
         | 
| 216 | 
            +
                }
         | 
| 217 | 
            +
             | 
| 218 | 
            +
             | 
| 219 | 
            +
                //-------- internal functions ------------------------------------------//
         | 
| 220 | 
            +
             | 
| 221 | 
            +
                function _changeTargetBalance(
         | 
| 222 | 
            +
                    bool increase,
         | 
| 223 | 
            +
                    InstanceStore instanceStore, 
         | 
| 224 | 
            +
                    NftId targetNftId, 
         | 
| 225 | 
            +
                    Amount amount, 
         | 
| 226 | 
            +
                    Amount feeAmount
         | 
| 227 | 
            +
                )
         | 
| 228 | 
            +
                    internal
         | 
| 229 | 
            +
                    virtual
         | 
| 230 | 
            +
                {
         | 
| 231 | 
            +
                    Amount totalAmount = amount + feeAmount;
         | 
| 232 | 
            +
             | 
| 233 | 
            +
                    if(increase) {
         | 
| 234 | 
            +
                        if(totalAmount.gtz()) { instanceStore.increaseBalance(targetNftId, totalAmount); }
         | 
| 235 | 
            +
                        if(feeAmount.gtz()) { instanceStore.increaseFees(targetNftId, feeAmount); }
         | 
| 236 | 
            +
                    } else {
         | 
| 237 | 
            +
                        if(totalAmount.gtz()) { instanceStore.decreaseBalance(targetNftId, totalAmount); }
         | 
| 238 | 
            +
                        if(feeAmount.gtz()) { instanceStore.decreaseFees(targetNftId, feeAmount); }
         | 
| 239 | 
            +
                    }
         | 
| 240 | 
            +
                }
         | 
| 241 | 
            +
             | 
| 242 | 
            +
             | 
| 243 | 
            +
                function _logUpdateFee(NftId productNftId, string memory name, Fee memory feeBefore, Fee memory feeAfter)
         | 
| 244 | 
            +
                    internal
         | 
| 245 | 
            +
                    virtual
         | 
| 246 | 
            +
                {
         | 
| 247 | 
            +
                    emit LogComponentServiceUpdateFee(
         | 
| 248 | 
            +
                        productNftId, 
         | 
| 249 | 
            +
                        name,
         | 
| 250 | 
            +
                        feeBefore.fractionalFee,
         | 
| 251 | 
            +
                        feeBefore.fixedFee,
         | 
| 252 | 
            +
                        feeAfter.fractionalFee,
         | 
| 253 | 
            +
                        feeAfter.fixedFee
         | 
| 254 | 
            +
                    );
         | 
| 255 | 
            +
                }
         | 
| 256 | 
            +
             | 
| 257 | 
            +
                function _getDomain() internal pure virtual override returns(ObjectType) {
         | 
| 258 | 
            +
                    return ACCOUNTING();
         | 
| 259 | 
            +
                }
         | 
| 260 | 
            +
             | 
| 261 | 
            +
             | 
| 262 | 
            +
            }
         | 
| @@ -0,0 +1,38 @@ | |
| 1 | 
            +
            // SPDX-License-Identifier: Apache-2.0
         | 
| 2 | 
            +
            pragma solidity ^0.8.20;
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            import {AccountingService} from "./AccountingService.sol";
         | 
| 5 | 
            +
            import {IVersionable} from "../upgradeability/IVersionable.sol";
         | 
| 6 | 
            +
            import {ProxyManager} from "../upgradeability/ProxyManager.sol";
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            contract AccountingServiceManager is ProxyManager {
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                AccountingService private _accountingService;
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                /// @dev initializes proxy manager with service implementation 
         | 
| 13 | 
            +
                constructor(
         | 
| 14 | 
            +
                    address authority, 
         | 
| 15 | 
            +
                    address registry,
         | 
| 16 | 
            +
                    bytes32 salt
         | 
| 17 | 
            +
                )
         | 
| 18 | 
            +
                {
         | 
| 19 | 
            +
                    AccountingService svc = new AccountingService();
         | 
| 20 | 
            +
                    bytes memory data = abi.encode(authority, registry);
         | 
| 21 | 
            +
                    IVersionable versionable = initialize(
         | 
| 22 | 
            +
                        registry,
         | 
| 23 | 
            +
                        address(svc), 
         | 
| 24 | 
            +
                        data,
         | 
| 25 | 
            +
                        salt);
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                    _accountingService = AccountingService(address(versionable));
         | 
| 28 | 
            +
                }
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                //--- view functions ----------------------------------------------------//
         | 
| 31 | 
            +
                function getAccountingService()
         | 
| 32 | 
            +
                    external
         | 
| 33 | 
            +
                    view
         | 
| 34 | 
            +
                    returns (AccountingService)
         | 
| 35 | 
            +
                {
         | 
| 36 | 
            +
                    return _accountingService;
         | 
| 37 | 
            +
                }
         | 
| 38 | 
            +
            }
         | 
| @@ -0,0 +1,45 @@ | |
| 1 | 
            +
            // SPDX-License-Identifier: Apache-2.0
         | 
| 2 | 
            +
            pragma solidity ^0.8.20;
         | 
| 3 | 
            +
             | 
| 4 | 
            +
             | 
| 5 | 
            +
            import {Amount} from "../type/Amount.sol";
         | 
| 6 | 
            +
            import {InstanceStore} from "../instance/InstanceStore.sol";
         | 
| 7 | 
            +
            import {IService} from "../shared/IService.sol";
         | 
| 8 | 
            +
            import {NftId} from "../type/NftId.sol";
         | 
| 9 | 
            +
            import {UFixed} from "../type/UFixed.sol";
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            /// @dev component base class
         | 
| 12 | 
            +
            /// component examples are staking, product, distribution, pool and oracle
         | 
| 13 | 
            +
            interface IAccountingService is 
         | 
| 14 | 
            +
                IService
         | 
| 15 | 
            +
            {
         | 
| 16 | 
            +
                event LogComponentServiceUpdateFee(
         | 
| 17 | 
            +
                    NftId nftId, 
         | 
| 18 | 
            +
                    string feeName, 
         | 
| 19 | 
            +
                    UFixed previousFractionalFee, 
         | 
| 20 | 
            +
                    uint256 previousFixedFee,
         | 
| 21 | 
            +
                    UFixed newFractionalFee, 
         | 
| 22 | 
            +
                    uint256 newFixedFee
         | 
| 23 | 
            +
                );
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                function decreaseComponentFees(InstanceStore instanceStore, NftId componentNftId, Amount feeAmount) external;
         | 
| 26 | 
            +
             | 
| 27 | 
            +
                function increaseProductFees(InstanceStore instanceStore, NftId productNftId, Amount feeAmount) external;
         | 
| 28 | 
            +
                function decreaseProductFees(InstanceStore instanceStore, NftId productNftId, Amount feeAmount) external;
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                function increaseDistributionBalance(InstanceStore instanceStore, NftId distributionNftId, Amount amount, Amount feeAmount) external;
         | 
| 31 | 
            +
                function decreaseDistributionBalance(InstanceStore instanceStore, NftId distributionNftId, Amount amount, Amount feeAmount) external;
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                function increaseDistributorBalance(InstanceStore instanceStore, NftId distributorNftId, Amount amount, Amount feeAmount) external;
         | 
| 34 | 
            +
                function decreaseDistributorBalance(InstanceStore instanceStore, NftId distributorNftId, Amount amount, Amount feeAmount) external;
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                function increasePoolBalance(InstanceStore instanceStore, NftId poolNftId, Amount amount, Amount feeAmount) external;
         | 
| 37 | 
            +
                function decreasePoolBalance(InstanceStore instanceStore, NftId poolNftId, Amount amount, Amount feeAmount) external;
         | 
| 38 | 
            +
             | 
| 39 | 
            +
                function increaseBundleBalance(InstanceStore instanceStore, NftId bundleNftId, Amount amount, Amount feeAmount) external;
         | 
| 40 | 
            +
                function decreaseBundleBalance(InstanceStore instanceStore, NftId bundleNftId, Amount amount, Amount feeAmount) external;
         | 
| 41 | 
            +
             | 
| 42 | 
            +
                function increaseBundleBalanceForPool(InstanceStore instanceStore, NftId bundleNftId, Amount amount, Amount feeAmount) external;
         | 
| 43 | 
            +
                function decreaseBundleBalanceForPool(InstanceStore instanceStore, NftId bundleNftId, Amount amount, Amount feeAmount) external;
         | 
| 44 | 
            +
             | 
| 45 | 
            +
            }
         |