@etherisc/gif-next 0.0.2-e875d61-189 → 0.0.2-e8a628e-326
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 +384 -45
 - package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +4 -0
 - package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +1075 -0
 - package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +790 -0
 - package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +4 -0
 - package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +843 -0
 - package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +4 -0
 - package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +1664 -0
 - package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.dbg.json +4 -0
 - package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.json +1289 -0
 - package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +4 -0
 - package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +1403 -0
 - package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +4 -0
 - package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +790 -0
 - package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +4 -0
 - package/artifacts/contracts/{instance/module/access → authorization}/IAccess.sol/IAccess.json +1 -1
 - package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +4 -0
 - package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.json +1372 -0
 - package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +455 -0
 - package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.json +397 -0
 - package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +646 -0
 - package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +4 -0
 - package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +1244 -0
 - package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +805 -0
 - package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +4 -0
 - package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +949 -0
 - package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +4 -0
 - package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +1809 -0
 - package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +930 -0
 - package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
 - package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +848 -0
 - package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +4 -0
 - package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +1284 -0
 - 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 +1484 -0
 - package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +805 -0
 - package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +4 -0
 - package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +2053 -0
 - package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +805 -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 +1439 -0
 - package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +805 -0
 - package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +4 -0
 - package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +1171 -0
 - package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +4 -0
 - package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +1647 -0
 - package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +805 -0
 - package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +4 -0
 - package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +2585 -0
 - package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +805 -0
 - package/artifacts/contracts/instance/BaseStore.sol/BaseStore.dbg.json +4 -0
 - package/artifacts/contracts/instance/BaseStore.sol/BaseStore.json +498 -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/IBaseStore.sol/IBaseStore.dbg.json +4 -0
 - package/artifacts/contracts/instance/IBaseStore.sol/IBaseStore.json +470 -0
 - package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
 - package/artifacts/contracts/instance/IInstance.sol/IInstance.json +585 -1289
 - package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +4 -0
 - package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +1092 -0
 - package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
 - package/artifacts/contracts/instance/Instance.sol/Instance.json +689 -1567
 - package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +4 -0
 - package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +2284 -0
 - package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +4 -0
 - package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +837 -0
 - package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +4 -0
 - package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +2646 -0
 - package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +4 -0
 - package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +1338 -0
 - package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +772 -0
 - package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +4 -0
 - package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +3378 -0
 - package/artifacts/contracts/instance/ProductStore.sol/ProductStore.dbg.json +4 -0
 - package/artifacts/contracts/instance/ProductStore.sol/ProductStore.json +1759 -0
 - package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +4 -0
 - package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +866 -0
 - package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +4 -0
 - package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +318 -0
 - package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +4 -0
 - package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.json +137 -0
 - package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +4 -0
 - package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +10 -0
 - package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +4 -0
 - package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.json +223 -0
 - 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 +4 -0
 - package/artifacts/contracts/instance/module/{bundle/IBundle.sol → IBundle.sol}/IBundle.json +1 -1
 - package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +4 -0
 - package/artifacts/contracts/instance/{base/ModuleBase.sol/ModuleBase.json → module/IComponents.sol/IComponents.json} +2 -2
 - package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +4 -0
 - package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.json +10 -0
 - package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +4 -0
 - package/artifacts/contracts/instance/module/{policy/IPolicy.sol → IPolicy.sol}/IPolicy.json +1 -1
 - package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +4 -0
 - package/artifacts/contracts/instance/module/{risk/IRisk.sol → IRisk.sol}/IRisk.json +1 -1
 - package/artifacts/contracts/mock/Dip.sol/Dip.dbg.json +4 -0
 - package/artifacts/contracts/mock/Dip.sol/Dip.json +376 -0
 - package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +4 -0
 - package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +957 -0
 - package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +810 -0
 - package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +4 -0
 - package/artifacts/contracts/oracle/IOracle.sol/IOracle.json +52 -0
 - package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +4 -0
 - package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +772 -0
 - package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +4 -0
 - package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.json +762 -0
 - package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +4 -0
 - package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +873 -0
 - package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +4 -0
 - package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +1042 -0
 - package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +810 -0
 - package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +4 -0
 - package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +1242 -0
 - package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +805 -0
 - package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +4 -0
 - package/artifacts/contracts/pool/BundleService.sol/BundleService.json +1438 -0
 - package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +866 -0
 - package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +4 -0
 - package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +1033 -0
 - package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +4 -0
 - package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +905 -0
 - package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +4 -0
 - package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +1449 -0
 - package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +4 -0
 - package/artifacts/contracts/pool/Pool.sol/Pool.json +1025 -0
 - package/artifacts/contracts/pool/PoolLib.sol/PoolLib.dbg.json +4 -0
 - package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +522 -0
 - package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +4 -0
 - package/artifacts/contracts/pool/PoolService.sol/PoolService.json +1833 -0
 - package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +866 -0
 - package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +4 -0
 - package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +1036 -0
 - package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +790 -0
 - package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +4 -0
 - package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +1159 -0
 - package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +805 -0
 - package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +4 -0
 - package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +1536 -0
 - package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +886 -0
 - package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +4 -0
 - package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.json +804 -0
 - package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +4 -0
 - package/artifacts/contracts/product/IClaimService.sol/IClaimService.json +1104 -0
 - package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +4 -0
 - package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.json +1036 -0
 - package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +4 -0
 - package/artifacts/contracts/product/IPricingService.sol/IPricingService.json +652 -0
 - package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +4 -0
 - package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +1016 -0
 - package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +4 -0
 - package/artifacts/contracts/product/IRiskService.sol/IRiskService.json +665 -0
 - package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +4 -0
 - package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +1404 -0
 - package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +4 -0
 - package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +783 -0
 - package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +854 -0
 - package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +4 -0
 - package/artifacts/contracts/product/PricingService.sol/PricingService.json +932 -0
 - package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +814 -0
 - package/artifacts/contracts/product/Product.sol/Product.dbg.json +4 -0
 - package/artifacts/contracts/product/Product.sol/Product.json +1117 -0
 - package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +4 -0
 - package/artifacts/contracts/product/RiskService.sol/RiskService.json +873 -0
 - package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +774 -0
 - package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
 - package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +242 -12
 - package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
 - package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +1035 -119
 - package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
 - package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +1072 -0
 - package/artifacts/contracts/registry/IRelease.sol/IRelease.dbg.json +4 -0
 - package/artifacts/contracts/{instance/IInstanceLinked.sol/IInstanceLinked.json → registry/IRelease.sol/IRelease.json} +6 -6
 - package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
 - package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +39 -0
 - package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
 - package/artifacts/contracts/registry/Registry.sol/Registry.json +1473 -231
 - package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +4 -0
 - package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +2160 -0
 - package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.dbg.json +4 -0
 - package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.json +1074 -0
 - package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
 - package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +1298 -0
 - package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +773 -0
 - package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +4 -0
 - package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +2152 -0
 - package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +4 -0
 - package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.json +205 -0
 - package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +4 -0
 - package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +1389 -0
 - package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +4 -0
 - package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +683 -0
 - package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +4 -0
 - package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +721 -0
 - package/artifacts/contracts/shared/Component.sol/Component.dbg.json +4 -0
 - package/artifacts/contracts/shared/Component.sol/Component.json +705 -0
 - package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +4 -0
 - package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +1551 -0
 - package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +862 -0
 - package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +4 -0
 - package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +632 -0
 - package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.dbg.json +4 -0
 - package/artifacts/contracts/shared/{IOwnable.sol/IOwnable.json → ContractLib.sol/IInstanceAdminHelper.json} +5 -5
 - 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 +4 -0
 - package/artifacts/contracts/shared/IComponent.sol/IComponent.json +630 -0
 - package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +4 -0
 - package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +1175 -0
 - package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +4 -0
 - package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +707 -0
 - package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
 - package/artifacts/contracts/{instance/base → shared}/IKeyValueStore.sol/IKeyValueStore.json +165 -178
 - package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +4 -0
 - package/artifacts/contracts/{instance/base → shared}/ILifecycle.sol/ILifecycle.json +35 -4
 - package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +4 -0
 - package/artifacts/contracts/{components/IBaseComponent.sol/IBaseComponent.json → shared/INftOwnable.sol/INftOwnable.json} +62 -70
 - package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +4 -0
 - package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +175 -0
 - package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
 - package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +248 -21
 - package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
 - package/artifacts/contracts/{registry → shared}/IRegistryLinked.sol/IRegistryLinked.json +13 -2
 - package/artifacts/contracts/shared/IService.sol/IService.dbg.json +4 -0
 - package/artifacts/contracts/{instance/service/IComponentOwnerService.sol/IComponentOwnerService.json → shared/IService.sol/IService.json} +224 -160
 - 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 +4 -0
 - package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +795 -0
 - package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
 - package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.json +575 -0
 - package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +4 -0
 - package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.json +174 -0
 - 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 +4 -0
 - package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +228 -0
 - package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +4 -0
 - package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +198 -0
 - package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
 - package/artifacts/contracts/shared/Registerable.sol/Registerable.json +294 -18
 - package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +4 -0
 - package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +58 -0
 - package/artifacts/contracts/shared/Service.sol/Service.dbg.json +4 -0
 - package/artifacts/contracts/{instance/service/IProductService.sol/IProductService.json → shared/Service.sol/Service.json} +239 -234
 - package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +4 -0
 - package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +723 -0
 - 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 +4 -0
 - package/artifacts/contracts/staking/IStaking.sol/IStaking.json +2757 -0
 - package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +4 -0
 - package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +1147 -0
 - package/artifacts/contracts/staking/ITargetLimitHandler.sol/ITargetLimitHandler.dbg.json +4 -0
 - package/artifacts/contracts/staking/ITargetLimitHandler.sol/ITargetLimitHandler.json +50 -0
 - package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +4 -0
 - package/artifacts/contracts/staking/Staking.sol/Staking.json +3185 -0
 - package/artifacts/contracts/staking/StakingLib.sol/StakingLib.dbg.json +4 -0
 - package/artifacts/contracts/staking/StakingLib.sol/StakingLib.json +470 -0
 - package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +4 -0
 - package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +847 -0
 - package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +4 -0
 - package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +704 -0
 - package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +4 -0
 - package/artifacts/contracts/staking/StakingService.sol/StakingService.json +1344 -0
 - package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +4 -0
 - package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +766 -0
 - package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +4 -0
 - package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +3097 -0
 - package/artifacts/contracts/staking/TargetHandler.sol/TargetHandler.dbg.json +4 -0
 - package/artifacts/contracts/staking/TargetHandler.sol/TargetHandler.json +309 -0
 - package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +4 -0
 - package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +679 -0
 - package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +4 -0
 - package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.json +10 -0
 - package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +4 -0
 - package/artifacts/contracts/type/Amount.sol/AmountLib.json +398 -0
 - package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +4 -0
 - package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.json +251 -0
 - package/artifacts/contracts/type/ChainId.sol/ChainIdLib.dbg.json +4 -0
 - package/artifacts/contracts/type/ChainId.sol/ChainIdLib.json +193 -0
 - package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +4 -0
 - package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.json +203 -0
 - package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +4 -0
 - package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.json +104 -0
 - package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +4 -0
 - package/artifacts/contracts/type/Fee.sol/FeeLib.json +373 -0
 - package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +4 -0
 - package/artifacts/contracts/type/Key32.sol/Key32Lib.json +125 -0
 - 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 +4 -0
 - package/artifacts/contracts/type/NftId.sol/NftIdLib.json +228 -0
 - package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +4 -0
 - package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.json +33 -0
 - package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +4 -0
 - package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.json +241 -0
 - package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +4 -0
 - package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.json +209 -0
 - package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +4 -0
 - package/artifacts/contracts/type/Referral.sol/ReferralLib.json +142 -0
 - package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +4 -0
 - package/artifacts/contracts/type/RequestId.sol/RequestIdLib.json +204 -0
 - package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +4 -0
 - package/artifacts/contracts/type/RiskId.sol/RiskIdLib.json +204 -0
 - package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +4 -0
 - package/artifacts/contracts/type/RoleId.sol/RoleIdLib.json +254 -0
 - package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +4 -0
 - package/artifacts/contracts/type/Seconds.sol/SecondsLib.json +289 -0
 - package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +4 -0
 - package/artifacts/contracts/type/Selector.sol/SelectorLib.json +148 -0
 - package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +4 -0
 - package/artifacts/contracts/type/Selector.sol/SelectorSetLib.json +10 -0
 - package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +4 -0
 - package/artifacts/contracts/type/StateId.sol/StateIdLib.json +105 -0
 - package/artifacts/contracts/type/String.sol/StrLib.dbg.json +4 -0
 - package/artifacts/contracts/type/String.sol/StrLib.json +180 -0
 - package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +4 -0
 - package/artifacts/contracts/type/Timestamp.sol/TimestampLib.json +312 -0
 - package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +4 -0
 - package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +572 -0
 - package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +4 -0
 - package/artifacts/contracts/type/Version.sol/VersionLib.json +158 -0
 - package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +4 -0
 - package/artifacts/contracts/type/Version.sol/VersionPartLib.json +167 -0
 - package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +4 -0
 - package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.json +65 -0
 - package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +4 -0
 - package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +656 -0
 - package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
 - package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +142 -0
 - package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +4 -0
 - package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.json +88 -0
 - package/contracts/accounting/AccountingService.sol +274 -0
 - package/contracts/accounting/AccountingServiceManager.sol +38 -0
 - package/contracts/accounting/IAccountingService.sol +47 -0
 - package/contracts/authorization/AccessAdmin.sol +780 -0
 - package/contracts/authorization/AccessAdminLib.sol +396 -0
 - package/contracts/authorization/AccessManagerCloneable.sol +158 -0
 - package/contracts/authorization/Authorization.sol +169 -0
 - package/contracts/authorization/IAccess.sol +67 -0
 - package/contracts/authorization/IAccessAdmin.sol +144 -0
 - package/contracts/authorization/IAuthorization.sol +26 -0
 - package/contracts/authorization/IServiceAuthorization.sol +78 -0
 - package/contracts/authorization/ServiceAuthorization.sol +320 -0
 - package/contracts/distribution/BasicDistribution.sol +141 -0
 - package/contracts/distribution/BasicDistributionAuthorization.sol +67 -0
 - package/contracts/distribution/Distribution.sol +247 -0
 - package/contracts/distribution/DistributionService.sol +448 -0
 - package/contracts/distribution/DistributionServiceManager.sol +39 -0
 - package/contracts/distribution/IDistributionComponent.sol +45 -0
 - package/contracts/distribution/IDistributionService.sol +115 -0
 - package/contracts/examples/fire/DamageLevel.sol +59 -0
 - package/contracts/examples/fire/FirePool.sol +86 -0
 - package/contracts/examples/fire/FirePoolAuthorization.sol +35 -0
 - package/contracts/examples/fire/FireProduct.sol +433 -0
 - package/contracts/examples/fire/FireProductAuthorization.sol +45 -0
 - package/contracts/examples/fire/FireUSD.sol +26 -0
 - package/contracts/examples/unpermissioned/SimpleDistribution.sol +81 -0
 - package/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol +28 -0
 - package/contracts/examples/unpermissioned/SimpleOracle.sol +133 -0
 - package/contracts/examples/unpermissioned/SimplePool.sol +102 -0
 - package/contracts/examples/unpermissioned/SimplePoolAuthorization.sol +28 -0
 - package/contracts/examples/unpermissioned/SimpleProduct.sol +437 -0
 - package/contracts/examples/unpermissioned/SimpleProductAuthorization.sol +28 -0
 - package/contracts/instance/BaseStore.sol +97 -0
 - package/contracts/instance/BundleSet.sol +130 -0
 - package/contracts/instance/IBaseStore.sol +43 -0
 - package/contracts/instance/IInstance.sol +150 -44
 - package/contracts/instance/IInstanceService.sol +119 -0
 - package/contracts/instance/Instance.sol +350 -63
 - package/contracts/instance/InstanceAdmin.sol +379 -0
 - package/contracts/instance/InstanceAuthorizationV3.sol +275 -0
 - package/contracts/instance/InstanceReader.sol +634 -0
 - package/contracts/instance/InstanceService.sol +514 -0
 - package/contracts/instance/InstanceServiceManager.sol +39 -0
 - package/contracts/instance/InstanceStore.sol +271 -0
 - package/contracts/instance/ProductStore.sol +110 -0
 - package/contracts/instance/RiskSet.sol +126 -0
 - package/contracts/instance/TargetNames.sol +10 -0
 - package/contracts/instance/base/BalanceStore.sol +121 -0
 - package/contracts/instance/base/Cloneable.sol +28 -0
 - package/contracts/instance/base/ObjectCounter.sol +20 -0
 - package/contracts/instance/base/ObjectLifecycle.sol +109 -0
 - package/contracts/instance/base/ObjectSet.sol +77 -0
 - package/contracts/instance/base/ObjectSetHelperLib.sol +30 -0
 - package/contracts/instance/module/IBundle.sol +21 -0
 - package/contracts/instance/module/IComponents.sol +62 -0
 - package/contracts/instance/module/IDistribution.sol +54 -0
 - package/contracts/instance/module/IPolicy.sol +105 -0
 - package/contracts/instance/module/IRisk.sol +16 -0
 - package/contracts/{test/Usdc.sol → mock/Dip.sol} +6 -6
 - package/contracts/oracle/BasicOracle.sol +45 -0
 - package/contracts/oracle/BasicOracleAuthorization.sol +53 -0
 - package/contracts/oracle/IOracle.sol +41 -0
 - package/contracts/oracle/IOracleComponent.sol +33 -0
 - package/contracts/oracle/IOracleService.sol +66 -0
 - package/contracts/oracle/Oracle.sol +154 -0
 - package/contracts/oracle/OracleService.sol +310 -0
 - package/contracts/oracle/OracleServiceManager.sol +39 -0
 - package/contracts/pool/BasicPool.sol +162 -0
 - package/contracts/pool/BasicPoolAuthorization.sol +81 -0
 - package/contracts/pool/BundleService.sol +386 -0
 - package/contracts/pool/BundleServiceManager.sol +39 -0
 - package/contracts/pool/IBundleService.sol +116 -0
 - package/contracts/pool/IPoolComponent.sol +62 -0
 - package/contracts/pool/IPoolService.sol +170 -0
 - package/contracts/pool/Pool.sol +333 -0
 - package/contracts/pool/PoolLib.sol +341 -0
 - package/contracts/pool/PoolService.sol +614 -0
 - package/contracts/pool/PoolServiceManager.sol +39 -0
 - package/contracts/product/ApplicationService.sol +327 -0
 - package/contracts/product/ApplicationServiceManager.sol +38 -0
 - package/contracts/product/BasicProduct.sol +49 -0
 - package/contracts/product/BasicProductAuthorization.sol +63 -0
 - package/contracts/product/ClaimService.sol +626 -0
 - package/contracts/product/ClaimServiceManager.sol +38 -0
 - package/contracts/product/IApplicationService.sol +88 -0
 - package/contracts/product/IClaimService.sol +136 -0
 - package/contracts/product/IPolicyService.sol +102 -0
 - package/contracts/product/IPricingService.sol +40 -0
 - package/contracts/product/IProductComponent.sol +62 -0
 - package/contracts/product/IRiskService.sol +48 -0
 - package/contracts/product/PolicyService.sol +645 -0
 - package/contracts/product/PolicyServiceLib.sol +139 -0
 - package/contracts/product/PolicyServiceManager.sol +39 -0
 - package/contracts/product/PricingService.sol +306 -0
 - package/contracts/product/PricingServiceManager.sol +39 -0
 - package/contracts/product/Product.sol +493 -0
 - package/contracts/product/RiskService.sol +190 -0
 - package/contracts/product/RiskServiceManager.sol +39 -0
 - package/contracts/registry/ChainNft.sol +130 -40
 - package/contracts/registry/IRegistry.sol +144 -29
 - package/contracts/registry/IRegistryService.sol +62 -0
 - package/contracts/registry/IRelease.sol +29 -0
 - package/contracts/registry/ITransferInterceptor.sol +6 -0
 - package/contracts/registry/Registry.sol +637 -282
 - package/contracts/registry/RegistryAdmin.sol +191 -0
 - package/contracts/registry/RegistryAuthorization.sol +336 -0
 - package/contracts/registry/RegistryService.sol +241 -0
 - package/contracts/registry/RegistryServiceManager.sol +53 -0
 - package/contracts/registry/ReleaseAdmin.sol +195 -0
 - package/contracts/registry/ReleaseLifecycle.sol +32 -0
 - package/contracts/registry/ReleaseRegistry.sol +525 -0
 - package/contracts/registry/ServiceAuthorizationV3.sol +342 -0
 - package/contracts/registry/TokenRegistry.sol +317 -0
 - package/contracts/shared/Component.sol +214 -0
 - package/contracts/shared/ComponentService.sol +687 -0
 - package/contracts/shared/ComponentServiceManager.sol +38 -0
 - package/contracts/shared/ContractLib.sol +312 -0
 - package/contracts/shared/IComponent.sol +58 -0
 - package/contracts/shared/IComponentService.sol +111 -0
 - package/contracts/shared/IInstanceLinkedComponent.sol +30 -0
 - package/contracts/shared/IKeyValueStore.sol +62 -0
 - package/contracts/{instance/base → shared}/ILifecycle.sol +6 -5
 - package/contracts/shared/INftOwnable.sol +27 -0
 - package/contracts/shared/IPolicyHolder.sol +35 -0
 - package/contracts/shared/IRegisterable.sol +31 -19
 - package/contracts/shared/IRegistryLinked.sol +11 -0
 - package/contracts/shared/IService.sol +23 -0
 - package/contracts/shared/InitializableERC165.sol +35 -0
 - package/contracts/shared/InstanceLinkedComponent.sol +194 -0
 - package/contracts/shared/KeyValueStore.sol +131 -0
 - package/contracts/shared/Lifecycle.sol +88 -0
 - package/contracts/shared/NftIdSet.sol +65 -0
 - package/contracts/shared/NftOwnable.sol +129 -0
 - package/contracts/shared/PolicyHolder.sol +63 -0
 - package/contracts/shared/Registerable.sol +80 -60
 - package/contracts/shared/RegistryLinked.sol +38 -0
 - package/contracts/shared/Service.sol +67 -0
 - package/contracts/shared/TokenHandler.sol +342 -0
 - package/contracts/shared/TokenHandlerDeployerLib.sol +20 -0
 - package/contracts/staking/IStaking.sol +367 -0
 - package/contracts/staking/IStakingService.sol +127 -0
 - package/contracts/staking/ITargetLimitHandler.sol +17 -0
 - package/contracts/staking/Staking.sol +798 -0
 - package/contracts/staking/StakingLib.sol +195 -0
 - package/contracts/staking/StakingManager.sol +53 -0
 - package/contracts/staking/StakingReader.sol +171 -0
 - package/contracts/staking/StakingService.sol +321 -0
 - package/contracts/staking/StakingServiceManager.sol +46 -0
 - package/contracts/staking/StakingStore.sol +1368 -0
 - package/contracts/staking/TargetHandler.sol +132 -0
 - package/contracts/staking/TargetManagerLib.sol +234 -0
 - package/contracts/{types → type}/AddressSet.sol +1 -1
 - package/contracts/type/Amount.sol +154 -0
 - package/contracts/{types → type}/Blocknumber.sol +36 -12
 - package/contracts/type/ChainId.sol +101 -0
 - package/contracts/type/ClaimId.sol +80 -0
 - package/contracts/type/DistributorType.sol +55 -0
 - package/contracts/type/Fee.sol +66 -0
 - package/contracts/{types → type}/Key32.sol +10 -5
 - package/contracts/type/Key32Set.sol +62 -0
 - package/contracts/{types → type}/NftId.sol +28 -15
 - package/contracts/type/NftIdSet.sol +62 -0
 - package/contracts/type/ObjectType.sol +307 -0
 - package/contracts/type/PayoutId.sol +82 -0
 - package/contracts/type/Referral.sol +90 -0
 - package/contracts/type/RequestId.sol +75 -0
 - package/contracts/type/RiskId.sol +75 -0
 - package/contracts/type/RoleId.sol +180 -0
 - package/contracts/type/Seconds.sol +120 -0
 - package/contracts/type/Selector.sol +107 -0
 - package/contracts/{types → type}/StateId.sol +53 -5
 - package/contracts/type/String.sol +65 -0
 - package/contracts/{types → type}/Timestamp.sol +39 -19
 - package/contracts/{types → type}/UFixed.sol +73 -19
 - package/contracts/type/Version.sol +159 -0
 - package/contracts/upgradeability/IVersionable.sol +56 -0
 - package/contracts/upgradeability/ProxyManager.sol +246 -0
 - package/contracts/upgradeability/UpgradableProxyWithAdmin.sol +24 -0
 - package/contracts/upgradeability/Versionable.sol +62 -0
 - package/package.json +13 -8
 - package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +0 -4
 - package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +0 -174
 - package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +0 -4
 - package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +0 -4
 - package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +0 -356
 - package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +0 -4
 - package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +0 -279
 - package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +0 -4
 - package/artifacts/contracts/components/Pool.sol/Pool.json +0 -455
 - package/artifacts/contracts/components/Product.sol/Product.dbg.json +0 -4
 - package/artifacts/contracts/components/Product.sol/Product.json +0 -348
 - package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +0 -4
 - package/artifacts/contracts/experiment/errors/Require.sol/Require.json +0 -105
 - package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +0 -4
 - package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +0 -105
 - package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +0 -4
 - package/artifacts/contracts/experiment/inheritance/A.sol/A.json +0 -128
 - package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +0 -4
 - package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +0 -42
 - package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +0 -4
 - package/artifacts/contracts/experiment/inheritance/B.sol/B.json +0 -76
 - package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +0 -4
 - package/artifacts/contracts/experiment/inheritance/C.sol/C.json +0 -89
 - package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +0 -4
 - package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +0 -128
 - package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +0 -4
 - package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +0 -37
 - package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +0 -4
 - package/artifacts/contracts/experiment/inheritance/IB.sol/IB.json +0 -50
 - package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +0 -4
 - package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +0 -63
 - package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +0 -4
 - package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +0 -59
 - package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +0 -4
 - package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +0 -124
 - package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +0 -4
 - package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +0 -74
 - package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +0 -4
 - package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +0 -124
 - package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +0 -4
 - package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +0 -207
 - package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +0 -4
 - package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +0 -10
 - package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +0 -4
 - package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +0 -10
 - package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +0 -4
 - package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
 - package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +0 -300
 - package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +0 -4
 - package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +0 -81
 - package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +0 -4
 - package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +0 -4
 - package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +0 -4
 - package/artifacts/contracts/instance/base/IService.sol/IService.json +0 -300
 - package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +0 -4
 - package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +0 -344
 - package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +0 -4
 - package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +0 -710
 - package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +0 -4
 - package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +0 -169
 - package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +0 -4
 - package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +0 -4
 - package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.json +0 -300
 - package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.json +0 -333
 - package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.json +0 -333
 - package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +0 -265
 - package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +0 -265
 - package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +0 -10
 - package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.json +0 -10
 - package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.json +0 -10
 - package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +0 -136
 - package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.json +0 -10
 - package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +0 -136
 - package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +0 -273
 - package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +0 -273
 - package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.json +0 -10
 - package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +0 -144
 - package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +0 -144
 - package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +0 -10
 - package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +0 -10
 - package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.json +0 -10
 - package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +0 -531
 - package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +0 -76
 - package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +0 -4
 - package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +0 -531
 - package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +0 -4
 - package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +0 -523
 - package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +0 -4
 - package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +0 -4
 - package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +0 -376
 - package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +0 -4
 - package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +0 -4
 - package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +0 -471
 - package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +0 -4
 - package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +0 -673
 - package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +0 -4
 - package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +0 -452
 - package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +0 -4
 - package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +0 -4
 - package/artifacts/contracts/shared/ERC165.sol/ERC165.json +0 -35
 - package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +0 -4
 - package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +0 -4
 - package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +0 -164
 - package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +0 -4
 - package/artifacts/contracts/shared/Versionable.sol/Versionable.json +0 -164
 - package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +0 -4
 - package/artifacts/contracts/test/TestFee.sol/TestFee.json +0 -119
 - package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +0 -4
 - package/artifacts/contracts/test/TestPool.sol/TestPool.json +0 -455
 - package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +0 -4
 - package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +0 -436
 - package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +0 -4
 - package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +0 -137
 - package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +0 -4
 - package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +0 -116
 - package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +0 -4
 - package/artifacts/contracts/test/TestService.sol/TestService.json +0 -379
 - package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +0 -4
 - package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +0 -338
 - package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +0 -4
 - package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +0 -218
 - package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +0 -4
 - package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +0 -206
 - package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +0 -4
 - package/artifacts/contracts/test/Usdc.sol/USDC.json +0 -338
 - package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +0 -4
 - package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.json +0 -10
 - package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +0 -4
 - package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +0 -174
 - package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +0 -4
 - package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +0 -10
 - package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +0 -4
 - package/artifacts/contracts/types/Fee.sol/FeeLib.json +0 -218
 - package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +0 -4
 - package/artifacts/contracts/types/Key32.sol/Key32Lib.json +0 -111
 - package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +0 -4
 - package/artifacts/contracts/types/NftId.sol/NftIdLib.json +0 -153
 - package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +0 -4
 - package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +0 -10
 - package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +0 -4
 - package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +0 -92
 - package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +0 -4
 - package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +0 -30
 - package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +0 -4
 - package/artifacts/contracts/types/StateId.sol/StateIdLib.json +0 -92
 - package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +0 -4
 - package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +0 -236
 - package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +0 -4
 - package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +0 -479
 - package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +0 -4
 - package/artifacts/contracts/types/Version.sol/VersionLib.json +0 -139
 - package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +0 -4
 - package/artifacts/contracts/types/Version.sol/VersionPartLib.json +0 -30
 - package/contracts/components/BaseComponent.sol +0 -94
 - package/contracts/components/IBaseComponent.sol +0 -19
 - package/contracts/components/IPoolComponent.sol +0 -57
 - package/contracts/components/IProductComponent.sol +0 -19
 - package/contracts/components/Pool.sol +0 -191
 - package/contracts/components/Product.sol +0 -134
 - package/contracts/experiment/errors/Require.sol +0 -38
 - package/contracts/experiment/errors/Revert.sol +0 -44
 - package/contracts/experiment/inheritance/A.sol +0 -53
 - package/contracts/experiment/inheritance/B.sol +0 -28
 - package/contracts/experiment/inheritance/C.sol +0 -34
 - package/contracts/experiment/inheritance/IA.sol +0 -13
 - package/contracts/experiment/inheritance/IB.sol +0 -10
 - package/contracts/experiment/inheritance/IC.sol +0 -12
 - package/contracts/experiment/statemachine/Dummy.sol +0 -27
 - package/contracts/experiment/statemachine/ISM.sol +0 -25
 - package/contracts/experiment/statemachine/README.md +0 -112
 - package/contracts/experiment/statemachine/SM.sol +0 -57
 - package/contracts/experiment/statemachine/SimpleStateMachine.sol +0 -31
 - package/contracts/experiment/types/TypeA.sol +0 -47
 - package/contracts/experiment/types/TypeB.sol +0 -29
 - package/contracts/instance/IInstanceLinked.sol +0 -8
 - package/contracts/instance/base/ComponentServiceBase.sol +0 -42
 - package/contracts/instance/base/IInstanceBase.sol +0 -19
 - package/contracts/instance/base/IKeyValueStore.sol +0 -50
 - package/contracts/instance/base/IService.sol +0 -15
 - package/contracts/instance/base/InstanceBase.sol +0 -84
 - package/contracts/instance/base/KeyValueStore.sol +0 -161
 - package/contracts/instance/base/Lifecycle.sol +0 -92
 - package/contracts/instance/base/ModuleBase.sol +0 -46
 - package/contracts/instance/base/ServiceBase.sol +0 -37
 - package/contracts/instance/module/access/Access.sol +0 -149
 - package/contracts/instance/module/access/IAccess.sol +0 -53
 - package/contracts/instance/module/bundle/BundleModule.sol +0 -135
 - package/contracts/instance/module/bundle/IBundle.sol +0 -51
 - package/contracts/instance/module/compensation/CompensationModule.sol +0 -17
 - package/contracts/instance/module/compensation/ICompensation.sol +0 -10
 - package/contracts/instance/module/component/ComponentModule.sol +0 -81
 - package/contracts/instance/module/component/IComponent.sol +0 -29
 - package/contracts/instance/module/policy/IPolicy.sol +0 -59
 - package/contracts/instance/module/policy/PolicyModule.sol +0 -89
 - package/contracts/instance/module/pool/IPoolModule.sol +0 -40
 - package/contracts/instance/module/pool/PoolModule.sol +0 -90
 - package/contracts/instance/module/risk/IRisk.sol +0 -10
 - package/contracts/instance/module/risk/RiskModule.sol +0 -17
 - package/contracts/instance/module/treasury/ITreasury.sol +0 -96
 - package/contracts/instance/module/treasury/TokenHandler.sol +0 -48
 - package/contracts/instance/module/treasury/TreasuryModule.sol +0 -171
 - package/contracts/instance/service/ComponentOwnerService.sol +0 -155
 - package/contracts/instance/service/IComponentOwnerService.sol +0 -22
 - package/contracts/instance/service/IPoolService.sol +0 -30
 - package/contracts/instance/service/IProductService.sol +0 -58
 - package/contracts/instance/service/PoolService.sol +0 -129
 - package/contracts/instance/service/ProductService.sol +0 -366
 - package/contracts/registry/IChainNft.sol +0 -21
 - package/contracts/registry/IRegistryLinked.sol +0 -8
 - package/contracts/shared/ERC165.sol +0 -21
 - package/contracts/shared/IOwnable.sol +0 -6
 - package/contracts/shared/IVersionable.sol +0 -52
 - package/contracts/shared/Versionable.sol +0 -89
 - package/contracts/test/TestFee.sol +0 -25
 - package/contracts/test/TestPool.sol +0 -24
 - package/contracts/test/TestProduct.sol +0 -51
 - package/contracts/test/TestRegisterable.sol +0 -19
 - package/contracts/test/TestRoleId.sol +0 -14
 - package/contracts/test/TestService.sol +0 -32
 - package/contracts/test/TestToken.sol +0 -26
 - package/contracts/test/TestVersion.sol +0 -44
 - package/contracts/test/TestVersionable.sol +0 -17
 - package/contracts/types/ChainId.sol +0 -38
 - package/contracts/types/Fee.sol +0 -51
 - package/contracts/types/NftIdSet.sol +0 -60
 - package/contracts/types/ObjectType.sol +0 -123
 - package/contracts/types/RoleId.sol +0 -38
 - package/contracts/types/Version.sol +0 -95
 
| 
         @@ -0,0 +1,142 @@ 
     | 
|
| 
      
 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": "getInitializationData",
         
     | 
| 
      
 114 
     | 
    
         
            +
                  "outputs": [
         
     | 
| 
      
 115 
     | 
    
         
            +
                    {
         
     | 
| 
      
 116 
     | 
    
         
            +
                      "internalType": "bytes",
         
     | 
| 
      
 117 
     | 
    
         
            +
                      "name": "",
         
     | 
| 
      
 118 
     | 
    
         
            +
                      "type": "bytes"
         
     | 
| 
      
 119 
     | 
    
         
            +
                    }
         
     | 
| 
      
 120 
     | 
    
         
            +
                  ],
         
     | 
| 
      
 121 
     | 
    
         
            +
                  "stateMutability": "view",
         
     | 
| 
      
 122 
     | 
    
         
            +
                  "type": "function"
         
     | 
| 
      
 123 
     | 
    
         
            +
                },
         
     | 
| 
      
 124 
     | 
    
         
            +
                {
         
     | 
| 
      
 125 
     | 
    
         
            +
                  "inputs": [],
         
     | 
| 
      
 126 
     | 
    
         
            +
                  "name": "getProxyAdmin",
         
     | 
| 
      
 127 
     | 
    
         
            +
                  "outputs": [
         
     | 
| 
      
 128 
     | 
    
         
            +
                    {
         
     | 
| 
      
 129 
     | 
    
         
            +
                      "internalType": "contract ProxyAdmin",
         
     | 
| 
      
 130 
     | 
    
         
            +
                      "name": "",
         
     | 
| 
      
 131 
     | 
    
         
            +
                      "type": "address"
         
     | 
| 
      
 132 
     | 
    
         
            +
                    }
         
     | 
| 
      
 133 
     | 
    
         
            +
                  ],
         
     | 
| 
      
 134 
     | 
    
         
            +
                  "stateMutability": "nonpayable",
         
     | 
| 
      
 135 
     | 
    
         
            +
                  "type": "function"
         
     | 
| 
      
 136 
     | 
    
         
            +
                }
         
     | 
| 
      
 137 
     | 
    
         
            +
              ],
         
     | 
| 
      
 138 
     | 
    
         
            +
              "bytecode": "0x60a060405234801561000f575f80fd5b506040516110c23803806110c283398101604081905261002e9161038a565b828282828161003d82826100ac565b50508160405161004c9061034e565b6001600160a01b039091168152602001604051809103905ff080158015610075573d5f803e3d5ffd5b506001600160a01b031660805261009361008e60805190565b61010a565b505f91506100a3905082826104de565b505050506105ae565b6100b582610177565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156100fe576100f982826101f5565b505050565b610106610268565b5050565b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6101495f805160206110a2833981519152546001600160a01b031690565b604080516001600160a01b03928316815291841660208301520160405180910390a161017481610289565b50565b806001600160a01b03163b5f036101b157604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b60605f80846001600160a01b0316846040516102119190610598565b5f60405180830381855af49150503d805f8114610249576040519150601f19603f3d011682016040523d82523d5f602084013e61024e565b606091505b50909250905061025f8583836102c6565b95945050505050565b34156102875760405163b398979f60e01b815260040160405180910390fd5b565b6001600160a01b0381166102b257604051633173bdd160e11b81525f60048201526024016101a8565b805f805160206110a28339815191526101d4565b6060826102db576102d682610325565b61031e565b81511580156102f257506001600160a01b0384163b155b1561031b57604051639996b31560e01b81526001600160a01b03851660048201526024016101a8565b50805b9392505050565b8051156103355780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6104ef80610bb383390190565b80516001600160a01b0381168114610371575f80fd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f805f6060848603121561039c575f80fd5b6103a58461035b565b92506103b36020850161035b565b60408501519092506001600160401b038111156103ce575f80fd5b8401601f810186136103de575f80fd5b80516001600160401b038111156103f7576103f7610376565b604051601f8201601f19908116603f011681016001600160401b038111828210171561042557610425610376565b60405281815282820160200188101561043c575f80fd5b8160208401602083015e5f602083830101528093505050509250925092565b600181811c9082168061046f57607f821691505b60208210810361048d57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156100f957805f5260205f20601f840160051c810160208510156104b85750805b601f840160051c820191505b818110156104d7575f81556001016104c4565b5050505050565b81516001600160401b038111156104f7576104f7610376565b61050b81610505845461045b565b84610493565b6020601f82116001811461053d575f83156105265750848201515b5f19600385901b1c1916600184901b1784556104d7565b5f84815260208120601f198516915b8281101561056c578785015182556020948501946001909201910161054c565b508482101561058957868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b5f82518060208501845e5f920191825250919050565b6080516105e86105cb5f395f81816075015260a101526105e85ff3fe608060405260043610610028575f3560e01c8063514e2d93146100325780638b3240a01461005c575b61003061009f565b005b34801561003d575f80fd5b50610046610113565b6040516100539190610423565b60405180910390f35b348015610067575f80fd5b506040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152602001610053565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361010b575f356001600160e01b03191663278f794360e11b14610101576040516334ad5dbb60e21b815260040160405180910390fd5b6101096101a7565b565b6101096101d5565b60605f805461012190610458565b80601f016020809104026020016040519081016040528092919081815260200182805461014d90610458565b80156101985780601f1061016f57610100808354040283529160200191610198565b820191905f5260205f20905b81548152906001019060200180831161017b57829003601f168201915b5050505050905090565b905090565b5f806101b63660048184610490565b8101906101c391906104cb565b915091506101d182826101e5565b5050565b6101096101e061023f565b610271565b6101ee8261028f565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a280511561023757610232828261030a565b505050565b6101d161037c565b5f6101a27f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b365f80375f80365f845af43d5f803e80801561028b573d5ff35b3d5ffd5b806001600160a01b03163b5f036102c957604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60605f80846001600160a01b031684604051610326919061059c565b5f60405180830381855af49150503d805f811461035e576040519150601f19603f3d011682016040523d82523d5f602084013e610363565b606091505b509150915061037385838361039b565b95945050505050565b34156101095760405163b398979f60e01b815260040160405180910390fd5b6060826103b0576103ab826103fa565b6103f3565b81511580156103c757506001600160a01b0384163b155b156103f057604051639996b31560e01b81526001600160a01b03851660048201526024016102c0565b50805b9392505050565b80511561040a5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b600181811c9082168061046c57607f821691505b60208210810361048a57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f808585111561049e575f80fd5b838611156104aa575f80fd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f80604083850312156104dc575f80fd5b82356001600160a01b03811681146104f2575f80fd5b9150602083013567ffffffffffffffff81111561050d575f80fd5b8301601f8101851361051d575f80fd5b803567ffffffffffffffff811115610537576105376104b7565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610566576105666104b7565b60405281815282820160200187101561057d575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fea264697066735822122068eb3582d94c42ef5e17bc746088d0b2e5458c9bbe06da2bc30decce86f2b96964736f6c634300081a0033608060405234801561000f575f80fd5b506040516104ef3803806104ef83398101604081905261002e916100bb565b806001600160a01b03811661005c57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b6100658161006c565b50506100e8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f602082840312156100cb575f80fd5b81516001600160a01b03811681146100e1575f80fd5b9392505050565b6103fa806100f55f395ff3fe608060405260043610610049575f3560e01c8063715018a61461004d5780638da5cb5b146100635780639623609d1461008e578063ad3cb1cc146100a1578063f2fde38b146100de575b5f80fd5b348015610058575f80fd5b506100616100fd565b005b34801561006e575f80fd5b505f546040516001600160a01b0390911681526020015b60405180910390f35b61006161009c366004610260565b610110565b3480156100ac575f80fd5b506100d1604051806040016040528060058152602001640352e302e360dc1b81525081565b6040516100859190610365565b3480156100e9575f80fd5b506100616100f836600461037e565b61017b565b6101056101bd565b61010e5f6101e9565b565b6101186101bd565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906101489086908690600401610399565b5f604051808303818588803b15801561015f575f80fd5b505af1158015610171573d5f803e3d5ffd5b5050505050505050565b6101836101bd565b6001600160a01b0381166101b157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101ba816101e9565b50565b5f546001600160a01b0316331461010e5760405163118cdaa760e01b81523360048201526024016101a8565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146101ba575f80fd5b634e487b7160e01b5f52604160045260245ffd5b5f805f60608486031215610272575f80fd5b833561027d81610238565b9250602084013561028d81610238565b9150604084013567ffffffffffffffff8111156102a8575f80fd5b8401601f810186136102b8575f80fd5b803567ffffffffffffffff8111156102d2576102d261024c565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156103015761030161024c565b604052818152828201602001881015610318575f80fd5b816020840160208301375f602083830101528093505050509250925092565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6103776020830184610337565b9392505050565b5f6020828403121561038e575f80fd5b813561037781610238565b6001600160a01b03831681526040602082018190525f906103bc90830184610337565b94935050505056fea264697066735822122063012ab3c3421087c307802be7295f03bec95db9eea702a4c2db9595befa162464736f6c634300081a0033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103",
         
     | 
| 
      
 139 
     | 
    
         
            +
              "deployedBytecode": "0x608060405260043610610028575f3560e01c8063514e2d93146100325780638b3240a01461005c575b61003061009f565b005b34801561003d575f80fd5b50610046610113565b6040516100539190610423565b60405180910390f35b348015610067575f80fd5b506040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152602001610053565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316330361010b575f356001600160e01b03191663278f794360e11b14610101576040516334ad5dbb60e21b815260040160405180910390fd5b6101096101a7565b565b6101096101d5565b60605f805461012190610458565b80601f016020809104026020016040519081016040528092919081815260200182805461014d90610458565b80156101985780601f1061016f57610100808354040283529160200191610198565b820191905f5260205f20905b81548152906001019060200180831161017b57829003601f168201915b5050505050905090565b905090565b5f806101b63660048184610490565b8101906101c391906104cb565b915091506101d182826101e5565b5050565b6101096101e061023f565b610271565b6101ee8261028f565b6040516001600160a01b038316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a280511561023757610232828261030a565b505050565b6101d161037c565b5f6101a27f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546001600160a01b031690565b365f80375f80365f845af43d5f803e80801561028b573d5ff35b3d5ffd5b806001600160a01b03163b5f036102c957604051634c9c8ce360e01b81526001600160a01b03821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80546001600160a01b0319166001600160a01b0392909216919091179055565b60605f80846001600160a01b031684604051610326919061059c565b5f60405180830381855af49150503d805f811461035e576040519150601f19603f3d011682016040523d82523d5f602084013e610363565b606091505b509150915061037385838361039b565b95945050505050565b34156101095760405163b398979f60e01b815260040160405180910390fd5b6060826103b0576103ab826103fa565b6103f3565b81511580156103c757506001600160a01b0384163b155b156103f057604051639996b31560e01b81526001600160a01b03851660048201526024016102c0565b50805b9392505050565b80511561040a5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b600181811c9082168061046c57607f821691505b60208210810361048a57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f808585111561049e575f80fd5b838611156104aa575f80fd5b5050820193919092039150565b634e487b7160e01b5f52604160045260245ffd5b5f80604083850312156104dc575f80fd5b82356001600160a01b03811681146104f2575f80fd5b9150602083013567ffffffffffffffff81111561050d575f80fd5b8301601f8101851361051d575f80fd5b803567ffffffffffffffff811115610537576105376104b7565b604051601f8201601f19908116603f0116810167ffffffffffffffff81118282101715610566576105666104b7565b60405281815282820160200187101561057d575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82518060208501845e5f92019182525091905056fea264697066735822122068eb3582d94c42ef5e17bc746088d0b2e5458c9bbe06da2bc30decce86f2b96964736f6c634300081a0033",
         
     | 
| 
      
 140 
     | 
    
         
            +
              "linkReferences": {},
         
     | 
| 
      
 141 
     | 
    
         
            +
              "deployedLinkReferences": {}
         
     | 
| 
      
 142 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -0,0 +1,88 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            {
         
     | 
| 
      
 2 
     | 
    
         
            +
              "_format": "hh-sol-artifact-1",
         
     | 
| 
      
 3 
     | 
    
         
            +
              "contractName": "Versionable",
         
     | 
| 
      
 4 
     | 
    
         
            +
              "sourceName": "contracts/upgradeability/Versionable.sol",
         
     | 
| 
      
 5 
     | 
    
         
            +
              "abi": [
         
     | 
| 
      
 6 
     | 
    
         
            +
                {
         
     | 
| 
      
 7 
     | 
    
         
            +
                  "inputs": [],
         
     | 
| 
      
 8 
     | 
    
         
            +
                  "name": "ErrorVersionableInitializeNotImplemented",
         
     | 
| 
      
 9 
     | 
    
         
            +
                  "type": "error"
         
     | 
| 
      
 10 
     | 
    
         
            +
                },
         
     | 
| 
      
 11 
     | 
    
         
            +
                {
         
     | 
| 
      
 12 
     | 
    
         
            +
                  "inputs": [],
         
     | 
| 
      
 13 
     | 
    
         
            +
                  "name": "ErrorVersionableUpgradeNotImplemented",
         
     | 
| 
      
 14 
     | 
    
         
            +
                  "type": "error"
         
     | 
| 
      
 15 
     | 
    
         
            +
                },
         
     | 
| 
      
 16 
     | 
    
         
            +
                {
         
     | 
| 
      
 17 
     | 
    
         
            +
                  "inputs": [],
         
     | 
| 
      
 18 
     | 
    
         
            +
                  "name": "InvalidInitialization",
         
     | 
| 
      
 19 
     | 
    
         
            +
                  "type": "error"
         
     | 
| 
      
 20 
     | 
    
         
            +
                },
         
     | 
| 
      
 21 
     | 
    
         
            +
                {
         
     | 
| 
      
 22 
     | 
    
         
            +
                  "inputs": [],
         
     | 
| 
      
 23 
     | 
    
         
            +
                  "name": "NotInitializing",
         
     | 
| 
      
 24 
     | 
    
         
            +
                  "type": "error"
         
     | 
| 
      
 25 
     | 
    
         
            +
                },
         
     | 
| 
      
 26 
     | 
    
         
            +
                {
         
     | 
| 
      
 27 
     | 
    
         
            +
                  "anonymous": false,
         
     | 
| 
      
 28 
     | 
    
         
            +
                  "inputs": [
         
     | 
| 
      
 29 
     | 
    
         
            +
                    {
         
     | 
| 
      
 30 
     | 
    
         
            +
                      "indexed": false,
         
     | 
| 
      
 31 
     | 
    
         
            +
                      "internalType": "uint64",
         
     | 
| 
      
 32 
     | 
    
         
            +
                      "name": "version",
         
     | 
| 
      
 33 
     | 
    
         
            +
                      "type": "uint64"
         
     | 
| 
      
 34 
     | 
    
         
            +
                    }
         
     | 
| 
      
 35 
     | 
    
         
            +
                  ],
         
     | 
| 
      
 36 
     | 
    
         
            +
                  "name": "Initialized",
         
     | 
| 
      
 37 
     | 
    
         
            +
                  "type": "event"
         
     | 
| 
      
 38 
     | 
    
         
            +
                },
         
     | 
| 
      
 39 
     | 
    
         
            +
                {
         
     | 
| 
      
 40 
     | 
    
         
            +
                  "inputs": [],
         
     | 
| 
      
 41 
     | 
    
         
            +
                  "name": "getVersion",
         
     | 
| 
      
 42 
     | 
    
         
            +
                  "outputs": [
         
     | 
| 
      
 43 
     | 
    
         
            +
                    {
         
     | 
| 
      
 44 
     | 
    
         
            +
                      "internalType": "Version",
         
     | 
| 
      
 45 
     | 
    
         
            +
                      "name": "",
         
     | 
| 
      
 46 
     | 
    
         
            +
                      "type": "uint24"
         
     | 
| 
      
 47 
     | 
    
         
            +
                    }
         
     | 
| 
      
 48 
     | 
    
         
            +
                  ],
         
     | 
| 
      
 49 
     | 
    
         
            +
                  "stateMutability": "pure",
         
     | 
| 
      
 50 
     | 
    
         
            +
                  "type": "function"
         
     | 
| 
      
 51 
     | 
    
         
            +
                },
         
     | 
| 
      
 52 
     | 
    
         
            +
                {
         
     | 
| 
      
 53 
     | 
    
         
            +
                  "inputs": [
         
     | 
| 
      
 54 
     | 
    
         
            +
                    {
         
     | 
| 
      
 55 
     | 
    
         
            +
                      "internalType": "address",
         
     | 
| 
      
 56 
     | 
    
         
            +
                      "name": "activatedBy",
         
     | 
| 
      
 57 
     | 
    
         
            +
                      "type": "address"
         
     | 
| 
      
 58 
     | 
    
         
            +
                    },
         
     | 
| 
      
 59 
     | 
    
         
            +
                    {
         
     | 
| 
      
 60 
     | 
    
         
            +
                      "internalType": "bytes",
         
     | 
| 
      
 61 
     | 
    
         
            +
                      "name": "data",
         
     | 
| 
      
 62 
     | 
    
         
            +
                      "type": "bytes"
         
     | 
| 
      
 63 
     | 
    
         
            +
                    }
         
     | 
| 
      
 64 
     | 
    
         
            +
                  ],
         
     | 
| 
      
 65 
     | 
    
         
            +
                  "name": "initializeVersionable",
         
     | 
| 
      
 66 
     | 
    
         
            +
                  "outputs": [],
         
     | 
| 
      
 67 
     | 
    
         
            +
                  "stateMutability": "nonpayable",
         
     | 
| 
      
 68 
     | 
    
         
            +
                  "type": "function"
         
     | 
| 
      
 69 
     | 
    
         
            +
                },
         
     | 
| 
      
 70 
     | 
    
         
            +
                {
         
     | 
| 
      
 71 
     | 
    
         
            +
                  "inputs": [
         
     | 
| 
      
 72 
     | 
    
         
            +
                    {
         
     | 
| 
      
 73 
     | 
    
         
            +
                      "internalType": "bytes",
         
     | 
| 
      
 74 
     | 
    
         
            +
                      "name": "data",
         
     | 
| 
      
 75 
     | 
    
         
            +
                      "type": "bytes"
         
     | 
| 
      
 76 
     | 
    
         
            +
                    }
         
     | 
| 
      
 77 
     | 
    
         
            +
                  ],
         
     | 
| 
      
 78 
     | 
    
         
            +
                  "name": "upgradeVersionable",
         
     | 
| 
      
 79 
     | 
    
         
            +
                  "outputs": [],
         
     | 
| 
      
 80 
     | 
    
         
            +
                  "stateMutability": "nonpayable",
         
     | 
| 
      
 81 
     | 
    
         
            +
                  "type": "function"
         
     | 
| 
      
 82 
     | 
    
         
            +
                }
         
     | 
| 
      
 83 
     | 
    
         
            +
              ],
         
     | 
| 
      
 84 
     | 
    
         
            +
              "bytecode": "0x",
         
     | 
| 
      
 85 
     | 
    
         
            +
              "deployedBytecode": "0x",
         
     | 
| 
      
 86 
     | 
    
         
            +
              "linkReferences": {},
         
     | 
| 
      
 87 
     | 
    
         
            +
              "deployedLinkReferences": {}
         
     | 
| 
      
 88 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -0,0 +1,274 @@ 
     | 
|
| 
      
 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 
     | 
    
         
            +
                function increaseProductFeesForPool(
         
     | 
| 
      
 67 
     | 
    
         
            +
                    InstanceStore instanceStore,
         
     | 
| 
      
 68 
     | 
    
         
            +
                    NftId productNftId, 
         
     | 
| 
      
 69 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 70 
     | 
    
         
            +
                ) 
         
     | 
| 
      
 71 
     | 
    
         
            +
                    external 
         
     | 
| 
      
 72 
     | 
    
         
            +
                    virtual 
         
     | 
| 
      
 73 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 74 
     | 
    
         
            +
                {
         
     | 
| 
      
 75 
     | 
    
         
            +
                    _checkNftType(productNftId, PRODUCT());
         
     | 
| 
      
 76 
     | 
    
         
            +
                    _changeTargetBalance(INCREASE, instanceStore, productNftId, AmountLib.zero(), feeAmount);
         
     | 
| 
      
 77 
     | 
    
         
            +
                }
         
     | 
| 
      
 78 
     | 
    
         
            +
             
     | 
| 
      
 79 
     | 
    
         
            +
             
     | 
| 
      
 80 
     | 
    
         
            +
                function decreaseProductFees(InstanceStore instanceStore, NftId productNftId, Amount feeAmount)
         
     | 
| 
      
 81 
     | 
    
         
            +
                    external 
         
     | 
| 
      
 82 
     | 
    
         
            +
                    virtual 
         
     | 
| 
      
 83 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 84 
     | 
    
         
            +
                {
         
     | 
| 
      
 85 
     | 
    
         
            +
                    _checkNftType(productNftId, PRODUCT());
         
     | 
| 
      
 86 
     | 
    
         
            +
                    _changeTargetBalance(DECREASE, instanceStore, productNftId, AmountLib.zero(), feeAmount);
         
     | 
| 
      
 87 
     | 
    
         
            +
                }
         
     | 
| 
      
 88 
     | 
    
         
            +
             
     | 
| 
      
 89 
     | 
    
         
            +
                function increaseDistributionBalance(
         
     | 
| 
      
 90 
     | 
    
         
            +
                    InstanceStore instanceStore, 
         
     | 
| 
      
 91 
     | 
    
         
            +
                    NftId distributionNftId, 
         
     | 
| 
      
 92 
     | 
    
         
            +
                    Amount amount,
         
     | 
| 
      
 93 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 94 
     | 
    
         
            +
                )
         
     | 
| 
      
 95 
     | 
    
         
            +
                    external
         
     | 
| 
      
 96 
     | 
    
         
            +
                    virtual
         
     | 
| 
      
 97 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 98 
     | 
    
         
            +
                {
         
     | 
| 
      
 99 
     | 
    
         
            +
                    _checkNftType(distributionNftId, DISTRIBUTION());
         
     | 
| 
      
 100 
     | 
    
         
            +
                    _changeTargetBalance(INCREASE, instanceStore, distributionNftId, amount, feeAmount);
         
     | 
| 
      
 101 
     | 
    
         
            +
                }
         
     | 
| 
      
 102 
     | 
    
         
            +
             
     | 
| 
      
 103 
     | 
    
         
            +
             
     | 
| 
      
 104 
     | 
    
         
            +
                function decreaseDistributionBalance(
         
     | 
| 
      
 105 
     | 
    
         
            +
                    InstanceStore instanceStore, 
         
     | 
| 
      
 106 
     | 
    
         
            +
                    NftId distributionNftId, 
         
     | 
| 
      
 107 
     | 
    
         
            +
                    Amount amount,
         
     | 
| 
      
 108 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 109 
     | 
    
         
            +
                )
         
     | 
| 
      
 110 
     | 
    
         
            +
                    external
         
     | 
| 
      
 111 
     | 
    
         
            +
                    virtual
         
     | 
| 
      
 112 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 113 
     | 
    
         
            +
                {
         
     | 
| 
      
 114 
     | 
    
         
            +
                    _checkNftType(distributionNftId, DISTRIBUTION());
         
     | 
| 
      
 115 
     | 
    
         
            +
                    _changeTargetBalance(DECREASE, instanceStore, distributionNftId, amount, feeAmount);
         
     | 
| 
      
 116 
     | 
    
         
            +
                }
         
     | 
| 
      
 117 
     | 
    
         
            +
             
     | 
| 
      
 118 
     | 
    
         
            +
                function increaseDistributorBalance(
         
     | 
| 
      
 119 
     | 
    
         
            +
                    InstanceStore instanceStore, 
         
     | 
| 
      
 120 
     | 
    
         
            +
                    NftId distributorNftId, 
         
     | 
| 
      
 121 
     | 
    
         
            +
                    Amount amount, 
         
     | 
| 
      
 122 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 123 
     | 
    
         
            +
                )
         
     | 
| 
      
 124 
     | 
    
         
            +
                    external
         
     | 
| 
      
 125 
     | 
    
         
            +
                    virtual
         
     | 
| 
      
 126 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 127 
     | 
    
         
            +
                {
         
     | 
| 
      
 128 
     | 
    
         
            +
                    _checkNftType(distributorNftId, DISTRIBUTOR());
         
     | 
| 
      
 129 
     | 
    
         
            +
                    _changeTargetBalance(INCREASE, instanceStore, distributorNftId, amount, feeAmount);
         
     | 
| 
      
 130 
     | 
    
         
            +
                }
         
     | 
| 
      
 131 
     | 
    
         
            +
             
     | 
| 
      
 132 
     | 
    
         
            +
                function decreaseDistributorBalance(
         
     | 
| 
      
 133 
     | 
    
         
            +
                    InstanceStore instanceStore, 
         
     | 
| 
      
 134 
     | 
    
         
            +
                    NftId distributorNftId, 
         
     | 
| 
      
 135 
     | 
    
         
            +
                    Amount amount, 
         
     | 
| 
      
 136 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 137 
     | 
    
         
            +
                )
         
     | 
| 
      
 138 
     | 
    
         
            +
                    external
         
     | 
| 
      
 139 
     | 
    
         
            +
                    virtual
         
     | 
| 
      
 140 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 141 
     | 
    
         
            +
                {
         
     | 
| 
      
 142 
     | 
    
         
            +
                    _checkNftType(distributorNftId, DISTRIBUTOR());
         
     | 
| 
      
 143 
     | 
    
         
            +
                    _changeTargetBalance(DECREASE, instanceStore, distributorNftId, amount, feeAmount);
         
     | 
| 
      
 144 
     | 
    
         
            +
                }
         
     | 
| 
      
 145 
     | 
    
         
            +
             
     | 
| 
      
 146 
     | 
    
         
            +
                function increasePoolBalance(
         
     | 
| 
      
 147 
     | 
    
         
            +
                    InstanceStore instanceStore, 
         
     | 
| 
      
 148 
     | 
    
         
            +
                    NftId poolNftId, 
         
     | 
| 
      
 149 
     | 
    
         
            +
                    Amount amount, 
         
     | 
| 
      
 150 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 151 
     | 
    
         
            +
                )
         
     | 
| 
      
 152 
     | 
    
         
            +
                    public 
         
     | 
| 
      
 153 
     | 
    
         
            +
                    virtual 
         
     | 
| 
      
 154 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 155 
     | 
    
         
            +
                {
         
     | 
| 
      
 156 
     | 
    
         
            +
                    _checkNftType(poolNftId, POOL());
         
     | 
| 
      
 157 
     | 
    
         
            +
                    _changeTargetBalance(INCREASE, instanceStore, poolNftId, amount, feeAmount);
         
     | 
| 
      
 158 
     | 
    
         
            +
                }
         
     | 
| 
      
 159 
     | 
    
         
            +
             
     | 
| 
      
 160 
     | 
    
         
            +
                function decreasePoolBalance(
         
     | 
| 
      
 161 
     | 
    
         
            +
                    InstanceStore instanceStore, 
         
     | 
| 
      
 162 
     | 
    
         
            +
                    NftId poolNftId, 
         
     | 
| 
      
 163 
     | 
    
         
            +
                    Amount amount, 
         
     | 
| 
      
 164 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 165 
     | 
    
         
            +
                )
         
     | 
| 
      
 166 
     | 
    
         
            +
                    public 
         
     | 
| 
      
 167 
     | 
    
         
            +
                    virtual
         
     | 
| 
      
 168 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 169 
     | 
    
         
            +
                {
         
     | 
| 
      
 170 
     | 
    
         
            +
                    _checkNftType(poolNftId, POOL());
         
     | 
| 
      
 171 
     | 
    
         
            +
                    _changeTargetBalance(DECREASE, instanceStore, poolNftId, amount, feeAmount);
         
     | 
| 
      
 172 
     | 
    
         
            +
                }
         
     | 
| 
      
 173 
     | 
    
         
            +
             
     | 
| 
      
 174 
     | 
    
         
            +
                function increaseBundleBalance(
         
     | 
| 
      
 175 
     | 
    
         
            +
                    InstanceStore instanceStore, 
         
     | 
| 
      
 176 
     | 
    
         
            +
                    NftId bundleNftId, 
         
     | 
| 
      
 177 
     | 
    
         
            +
                    Amount amount, 
         
     | 
| 
      
 178 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 179 
     | 
    
         
            +
                )
         
     | 
| 
      
 180 
     | 
    
         
            +
                    external
         
     | 
| 
      
 181 
     | 
    
         
            +
                    virtual
         
     | 
| 
      
 182 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 183 
     | 
    
         
            +
                {
         
     | 
| 
      
 184 
     | 
    
         
            +
                    _checkNftType(bundleNftId, BUNDLE());
         
     | 
| 
      
 185 
     | 
    
         
            +
                    _changeTargetBalance(INCREASE, instanceStore, bundleNftId, amount, feeAmount);
         
     | 
| 
      
 186 
     | 
    
         
            +
                }
         
     | 
| 
      
 187 
     | 
    
         
            +
             
     | 
| 
      
 188 
     | 
    
         
            +
                function decreaseBundleBalance(
         
     | 
| 
      
 189 
     | 
    
         
            +
                    InstanceStore instanceStore, 
         
     | 
| 
      
 190 
     | 
    
         
            +
                    NftId bundleNftId, 
         
     | 
| 
      
 191 
     | 
    
         
            +
                    Amount amount, 
         
     | 
| 
      
 192 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 193 
     | 
    
         
            +
                )
         
     | 
| 
      
 194 
     | 
    
         
            +
                    external
         
     | 
| 
      
 195 
     | 
    
         
            +
                    virtual
         
     | 
| 
      
 196 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 197 
     | 
    
         
            +
                {
         
     | 
| 
      
 198 
     | 
    
         
            +
                    _checkNftType(bundleNftId, BUNDLE());
         
     | 
| 
      
 199 
     | 
    
         
            +
                    _changeTargetBalance(DECREASE, instanceStore, bundleNftId, amount, feeAmount);
         
     | 
| 
      
 200 
     | 
    
         
            +
                }
         
     | 
| 
      
 201 
     | 
    
         
            +
             
     | 
| 
      
 202 
     | 
    
         
            +
                function increaseBundleBalanceForPool(
         
     | 
| 
      
 203 
     | 
    
         
            +
                    InstanceStore instanceStore, 
         
     | 
| 
      
 204 
     | 
    
         
            +
                    NftId bundleNftId, 
         
     | 
| 
      
 205 
     | 
    
         
            +
                    Amount amount, 
         
     | 
| 
      
 206 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 207 
     | 
    
         
            +
                )
         
     | 
| 
      
 208 
     | 
    
         
            +
                    external
         
     | 
| 
      
 209 
     | 
    
         
            +
                    virtual
         
     | 
| 
      
 210 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 211 
     | 
    
         
            +
                {
         
     | 
| 
      
 212 
     | 
    
         
            +
                    _checkNftType(bundleNftId, BUNDLE());
         
     | 
| 
      
 213 
     | 
    
         
            +
                    _changeTargetBalance(INCREASE, instanceStore, bundleNftId, amount, feeAmount);
         
     | 
| 
      
 214 
     | 
    
         
            +
                }
         
     | 
| 
      
 215 
     | 
    
         
            +
             
     | 
| 
      
 216 
     | 
    
         
            +
                function decreaseBundleBalanceForPool(
         
     | 
| 
      
 217 
     | 
    
         
            +
                    InstanceStore instanceStore, 
         
     | 
| 
      
 218 
     | 
    
         
            +
                    NftId bundleNftId, 
         
     | 
| 
      
 219 
     | 
    
         
            +
                    Amount amount, 
         
     | 
| 
      
 220 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 221 
     | 
    
         
            +
                )
         
     | 
| 
      
 222 
     | 
    
         
            +
                    external
         
     | 
| 
      
 223 
     | 
    
         
            +
                    virtual
         
     | 
| 
      
 224 
     | 
    
         
            +
                    restricted()
         
     | 
| 
      
 225 
     | 
    
         
            +
                {
         
     | 
| 
      
 226 
     | 
    
         
            +
                    _checkNftType(bundleNftId, BUNDLE());
         
     | 
| 
      
 227 
     | 
    
         
            +
                    _changeTargetBalance(DECREASE, instanceStore, bundleNftId, amount, feeAmount);
         
     | 
| 
      
 228 
     | 
    
         
            +
                }
         
     | 
| 
      
 229 
     | 
    
         
            +
             
     | 
| 
      
 230 
     | 
    
         
            +
             
     | 
| 
      
 231 
     | 
    
         
            +
                //-------- internal functions ------------------------------------------//
         
     | 
| 
      
 232 
     | 
    
         
            +
             
     | 
| 
      
 233 
     | 
    
         
            +
                function _changeTargetBalance(
         
     | 
| 
      
 234 
     | 
    
         
            +
                    bool increase,
         
     | 
| 
      
 235 
     | 
    
         
            +
                    InstanceStore instanceStore, 
         
     | 
| 
      
 236 
     | 
    
         
            +
                    NftId targetNftId, 
         
     | 
| 
      
 237 
     | 
    
         
            +
                    Amount amount, 
         
     | 
| 
      
 238 
     | 
    
         
            +
                    Amount feeAmount
         
     | 
| 
      
 239 
     | 
    
         
            +
                )
         
     | 
| 
      
 240 
     | 
    
         
            +
                    internal
         
     | 
| 
      
 241 
     | 
    
         
            +
                    virtual
         
     | 
| 
      
 242 
     | 
    
         
            +
                {
         
     | 
| 
      
 243 
     | 
    
         
            +
                    Amount totalAmount = amount + feeAmount;
         
     | 
| 
      
 244 
     | 
    
         
            +
             
     | 
| 
      
 245 
     | 
    
         
            +
                    if(increase) {
         
     | 
| 
      
 246 
     | 
    
         
            +
                        if(totalAmount.gtz()) { instanceStore.increaseBalance(targetNftId, totalAmount); }
         
     | 
| 
      
 247 
     | 
    
         
            +
                        if(feeAmount.gtz()) { instanceStore.increaseFees(targetNftId, feeAmount); }
         
     | 
| 
      
 248 
     | 
    
         
            +
                    } else {
         
     | 
| 
      
 249 
     | 
    
         
            +
                        if(totalAmount.gtz()) { instanceStore.decreaseBalance(targetNftId, totalAmount); }
         
     | 
| 
      
 250 
     | 
    
         
            +
                        if(feeAmount.gtz()) { instanceStore.decreaseFees(targetNftId, feeAmount); }
         
     | 
| 
      
 251 
     | 
    
         
            +
                    }
         
     | 
| 
      
 252 
     | 
    
         
            +
                }
         
     | 
| 
      
 253 
     | 
    
         
            +
             
     | 
| 
      
 254 
     | 
    
         
            +
             
     | 
| 
      
 255 
     | 
    
         
            +
                function _logUpdateFee(NftId productNftId, string memory name, Fee memory feeBefore, Fee memory feeAfter)
         
     | 
| 
      
 256 
     | 
    
         
            +
                    internal
         
     | 
| 
      
 257 
     | 
    
         
            +
                    virtual
         
     | 
| 
      
 258 
     | 
    
         
            +
                {
         
     | 
| 
      
 259 
     | 
    
         
            +
                    emit LogComponentServiceUpdateFee(
         
     | 
| 
      
 260 
     | 
    
         
            +
                        productNftId, 
         
     | 
| 
      
 261 
     | 
    
         
            +
                        name,
         
     | 
| 
      
 262 
     | 
    
         
            +
                        feeBefore.fractionalFee,
         
     | 
| 
      
 263 
     | 
    
         
            +
                        feeBefore.fixedFee,
         
     | 
| 
      
 264 
     | 
    
         
            +
                        feeAfter.fractionalFee,
         
     | 
| 
      
 265 
     | 
    
         
            +
                        feeAfter.fixedFee
         
     | 
| 
      
 266 
     | 
    
         
            +
                    );
         
     | 
| 
      
 267 
     | 
    
         
            +
                }
         
     | 
| 
      
 268 
     | 
    
         
            +
             
     | 
| 
      
 269 
     | 
    
         
            +
                function _getDomain() internal pure virtual override returns(ObjectType) {
         
     | 
| 
      
 270 
     | 
    
         
            +
                    return ACCOUNTING();
         
     | 
| 
      
 271 
     | 
    
         
            +
                }
         
     | 
| 
      
 272 
     | 
    
         
            +
             
     | 
| 
      
 273 
     | 
    
         
            +
             
     | 
| 
      
 274 
     | 
    
         
            +
            }
         
     | 
| 
         @@ -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,47 @@ 
     | 
|
| 
      
 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 
     | 
    
         
            +
                    Amount previousFixedFee,
         
     | 
| 
      
 21 
     | 
    
         
            +
                    UFixed newFractionalFee, 
         
     | 
| 
      
 22 
     | 
    
         
            +
                    Amount 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 increaseProductFeesForPool(InstanceStore instanceStore, NftId productNftId, Amount feeAmount) external;
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
                function increaseDistributionBalance(InstanceStore instanceStore, NftId distributionNftId, Amount amount, Amount feeAmount) external;
         
     | 
| 
      
 33 
     | 
    
         
            +
                function decreaseDistributionBalance(InstanceStore instanceStore, NftId distributionNftId, Amount amount, Amount feeAmount) external;
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
                function increaseDistributorBalance(InstanceStore instanceStore, NftId distributorNftId, Amount amount, Amount feeAmount) external;
         
     | 
| 
      
 36 
     | 
    
         
            +
                function decreaseDistributorBalance(InstanceStore instanceStore, NftId distributorNftId, Amount amount, Amount feeAmount) external;
         
     | 
| 
      
 37 
     | 
    
         
            +
             
     | 
| 
      
 38 
     | 
    
         
            +
                function increasePoolBalance(InstanceStore instanceStore, NftId poolNftId, Amount amount, Amount feeAmount) external;
         
     | 
| 
      
 39 
     | 
    
         
            +
                function decreasePoolBalance(InstanceStore instanceStore, NftId poolNftId, Amount amount, Amount feeAmount) external;
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
                function increaseBundleBalance(InstanceStore instanceStore, NftId bundleNftId, Amount amount, Amount feeAmount) external;
         
     | 
| 
      
 42 
     | 
    
         
            +
                function decreaseBundleBalance(InstanceStore instanceStore, NftId bundleNftId, Amount amount, Amount feeAmount) external;
         
     | 
| 
      
 43 
     | 
    
         
            +
             
     | 
| 
      
 44 
     | 
    
         
            +
                function increaseBundleBalanceForPool(InstanceStore instanceStore, NftId bundleNftId, Amount amount, Amount feeAmount) external;
         
     | 
| 
      
 45 
     | 
    
         
            +
                function decreaseBundleBalanceForPool(InstanceStore instanceStore, NftId bundleNftId, Amount amount, Amount feeAmount) external;
         
     | 
| 
      
 46 
     | 
    
         
            +
             
     | 
| 
      
 47 
     | 
    
         
            +
            }
         
     |