@etherisc/gif-next 0.0.2-754ba48-078 → 0.0.2-7560591-936
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 +53 -0
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingService.sol/AccountingService.json +8 -8
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/accounting/AccountingServiceManager.sol/AccountingServiceManager.json +40 -40
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.dbg.json +1 -1
- package/artifacts/contracts/accounting/IAccountingService.sol/IAccountingService.json +6 -6
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdmin.sol/AccessAdmin.json +33 -33
- package/artifacts/contracts/authorization/AccessAdmin.sol/IAccessManagedChecker.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessAdminLib.sol/AccessAdminLib.json +18 -18
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.dbg.json +1 -1
- package/artifacts/contracts/authorization/AccessManagerCloneable.sol/AccessManagerCloneable.json +2 -2
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/Authorization.sol/Authorization.json +19 -19
- package/artifacts/contracts/authorization/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAccessAdmin.sol/IAccessAdmin.json +5 -5
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/IAuthorization.sol/IAuthorization.json +5 -5
- package/artifacts/contracts/authorization/IServiceAuthorization.sol/IServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.dbg.json +1 -1
- package/artifacts/contracts/authorization/ServiceAuthorization.sol/ServiceAuthorization.json +2 -2
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistribution.sol/BasicDistribution.json +32 -145
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/distribution/BasicDistributionAuthorization.sol/BasicDistributionAuthorization.json +20 -20
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.dbg.json +1 -1
- package/artifacts/contracts/distribution/Distribution.sol/Distribution.json +1 -87
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionService.sol/DistributionService.json +90 -90
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
- package/artifacts/contracts/distribution/DistributionServiceManager.sol/DistributionServiceManager.json +67 -67
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionComponent.sol/IDistributionComponent.json +1 -87
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.dbg.json +1 -1
- package/artifacts/contracts/distribution/IDistributionService.sol/IDistributionService.json +4 -4
- package/artifacts/contracts/examples/fire/DamageLevel.sol/DamageLevelLib.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePool.sol/FirePool.json +44 -74
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FirePoolAuthorization.sol/FirePoolAuthorization.json +20 -20
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProduct.sol/FireProduct.json +89 -119
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/fire/FireProductAuthorization.sol/FireProductAuthorization.json +20 -20
- package/artifacts/contracts/examples/fire/FireUSD.sol/FireUSD.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistribution.sol/SimpleDistribution.json +39 -174
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleDistributionAuthorization.sol/SimpleDistributionAuthorization.json +20 -20
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleOracle.sol/SimpleOracle.json +18 -61
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePool.sol/SimplePool.json +69 -112
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimplePoolAuthorization.sol/SimplePoolAuthorization.json +20 -20
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProduct.sol/SimpleProduct.json +93 -136
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/examples/unpermissioned/SimpleProductAuthorization.sol/SimpleProductAuthorization.json +20 -20
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.dbg.json +1 -1
- package/artifacts/contracts/instance/BundleSet.sol/BundleSet.json +2 -2
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +19 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +8 -2
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +36 -13
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAdmin.sol/InstanceAdmin.json +81 -81
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceAuthorizationV3.sol/InstanceAuthorizationV3.json +26 -26
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +195 -200
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +34 -28
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +37 -37
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/InstanceStore.sol/InstanceStore.json +344 -354
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.dbg.json +1 -1
- package/artifacts/contracts/instance/RiskSet.sol/RiskSet.json +2 -2
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.dbg.json +1 -1
- package/artifacts/contracts/instance/base/BalanceStore.sol/BalanceStore.json +2 -2
- package/artifacts/contracts/instance/base/Cloneable.sol/Cloneable.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectCounter.sol/ObjectCounter.json +2 -2
- package/artifacts/contracts/instance/base/ObjectLifecycle.sol/ObjectLifecycle.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSet.sol/ObjectSet.json +2 -2
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.dbg.json +1 -1
- package/artifacts/contracts/instance/base/ObjectSetHelperLib.sol/ObjectSetHelperLib.json +20 -20
- package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
- package/artifacts/contracts/mock/Dip.sol/Dip.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracle.sol/BasicOracle.json +10 -31
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.dbg.json +1 -1
- package/artifacts/contracts/oracle/BasicOracleAuthorization.sol/BasicOracleAuthorization.json +20 -20
- package/artifacts/contracts/oracle/IOracle.sol/IOracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.dbg.json +1 -1
- package/artifacts/contracts/oracle/IOracleComponent.sol/IOracleComponent.json +0 -21
- package/artifacts/contracts/oracle/IOracleService.sol/IOracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.dbg.json +1 -1
- package/artifacts/contracts/oracle/Oracle.sol/Oracle.json +0 -21
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleService.sol/OracleService.json +32 -32
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/oracle/OracleServiceManager.sol/OracleServiceManager.json +45 -45
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPool.sol/BasicPool.json +22 -43
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.dbg.json +1 -1
- package/artifacts/contracts/pool/BasicPoolAuthorization.sol/BasicPoolAuthorization.json +20 -20
- package/artifacts/contracts/pool/BundleService.sol/BundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleService.sol/BundleService.json +60 -60
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/BundleServiceManager.sol/BundleServiceManager.json +53 -53
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.dbg.json +1 -1
- package/artifacts/contracts/pool/IBundleService.sol/IBundleService.json +6 -6
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolComponent.sol/IPoolComponent.json +10 -31
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/IPoolService.sol/IPoolService.json +18 -18
- package/artifacts/contracts/pool/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/pool/Pool.sol/Pool.json +10 -31
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolLib.sol/PoolLib.json +34 -34
- package/artifacts/contracts/pool/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolService.sol/PoolService.json +42 -42
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
- package/artifacts/contracts/pool/PoolServiceManager.sol/PoolServiceManager.json +55 -55
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationService.sol/ApplicationService.json +12 -12
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ApplicationServiceManager.sol/ApplicationServiceManager.json +38 -38
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProduct.sol/BasicProduct.json +27 -48
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.dbg.json +1 -1
- package/artifacts/contracts/product/BasicProductAuthorization.sol/BasicProductAuthorization.json +20 -20
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimService.sol/ClaimService.json +64 -64
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/ClaimServiceManager.sol/ClaimServiceManager.json +64 -64
- package/artifacts/contracts/product/IApplicationService.sol/IApplicationService.dbg.json +1 -1
- package/artifacts/contracts/product/IClaimService.sol/IClaimService.dbg.json +1 -1
- package/artifacts/contracts/product/IPolicyService.sol/IPolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/IPricingService.sol/IPricingService.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/product/IProductComponent.sol/IProductComponent.json +21 -42
- package/artifacts/contracts/product/IRiskService.sol/IRiskService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyService.sol/PolicyService.json +60 -60
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceLib.sol/PolicyServiceLib.json +32 -32
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PolicyServiceManager.sol/PolicyServiceManager.json +55 -55
- package/artifacts/contracts/product/PricingService.sol/PricingService.dbg.json +1 -1
- package/artifacts/contracts/product/PricingService.sol/PricingService.json +32 -72
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/PricingServiceManager.sol/PricingServiceManager.json +45 -65
- package/artifacts/contracts/product/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/product/Product.sol/Product.json +21 -42
- package/artifacts/contracts/product/RiskService.sol/RiskService.dbg.json +1 -1
- package/artifacts/contracts/product/RiskService.sol/RiskService.json +2 -2
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.dbg.json +1 -1
- package/artifacts/contracts/product/RiskServiceManager.sol/RiskServiceManager.json +38 -38
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +15 -15
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/IRelease.sol/IRelease.dbg.json +1 -1
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +17 -17
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAdmin.sol/RegistryAdmin.json +83 -83
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryAuthorization.sol/RegistryAuthorization.json +31 -31
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +2 -2
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +33 -33
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseAdmin.sol/ReleaseAdmin.json +91 -91
- package/artifacts/contracts/registry/ReleaseLifecycle.sol/ReleaseLifecycle.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/ReleaseRegistry.sol/ReleaseRegistry.json +88 -88
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.dbg.json +1 -1
- package/artifacts/contracts/registry/ServiceAuthorizationV3.sol/ServiceAuthorizationV3.json +2 -2
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +14 -14
- package/artifacts/contracts/shared/Component.sol/Component.dbg.json +1 -1
- package/artifacts/contracts/shared/Component.sol/Component.json +0 -21
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentService.sol/ComponentService.json +105 -81
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.dbg.json +1 -1
- package/artifacts/contracts/shared/ComponentServiceManager.sol/ComponentServiceManager.json +59 -55
- package/artifacts/contracts/shared/ComponentVerifyingService.sol/ComponentVerifyingService.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ContractLib.json +2 -2
- package/artifacts/contracts/shared/ContractLib.sol/IInstanceAdminHelper.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ITargetHelper.dbg.json +1 -1
- package/artifacts/contracts/shared/ContractLib.sol/ITokenRegistryHelper.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponent.sol/IComponent.json +0 -21
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.dbg.json +1 -1
- package/artifacts/contracts/shared/IComponentService.sol/IComponentService.json +43 -27
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/IInstanceLinkedComponent.sol/IInstanceLinkedComponent.json +0 -21
- package/artifacts/contracts/shared/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/ILifecycle.sol/ILifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
- package/artifacts/contracts/shared/InitializableERC165.sol/InitializableERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.dbg.json +1 -1
- package/artifacts/contracts/shared/InstanceLinkedComponent.sol/InstanceLinkedComponent.json +0 -21
- package/artifacts/contracts/shared/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
- package/artifacts/contracts/shared/Lifecycle.sol/Lifecycle.dbg.json +1 -1
- package/artifacts/contracts/shared/NftIdSet.sol/NftIdSet.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +2 -2
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
- package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +2 -2
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
- package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -2
- package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +2 -2
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandler.sol/TokenHandlerBase.json +2 -2
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.dbg.json +1 -1
- package/artifacts/contracts/shared/TokenHandlerDeployerLib.sol/TokenHandlerDeployerLib.json +2 -2
- package/artifacts/contracts/staking/IStaking.sol/IStaking.dbg.json +1 -1
- package/artifacts/contracts/staking/IStaking.sol/IStaking.json +9 -30
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/IStakingService.sol/IStakingService.json +4 -4
- package/artifacts/contracts/staking/Staking.sol/Staking.dbg.json +1 -1
- package/artifacts/contracts/staking/Staking.sol/Staking.json +67 -96
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingLib.sol/StakingLib.json +42 -42
- package/artifacts/contracts/staking/StakingLifecycle.sol/StakingLifecycle.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingManager.sol/StakingManager.json +47 -51
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingReader.sol/StakingReader.json +21 -21
- package/artifacts/contracts/staking/StakingService.sol/StakingService.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingService.sol/StakingService.json +20 -20
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingServiceManager.sol/StakingServiceManager.json +38 -38
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.dbg.json +1 -1
- package/artifacts/contracts/staking/StakingStore.sol/StakingStore.json +159 -159
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.dbg.json +1 -1
- package/artifacts/contracts/staking/TargetManagerLib.sol/TargetManagerLib.json +59 -59
- package/artifacts/contracts/type/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.dbg.json +1 -1
- package/artifacts/contracts/type/Amount.sol/AmountLib.json +10 -10
- package/artifacts/contracts/type/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/type/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.dbg.json +1 -1
- package/artifacts/contracts/type/Fee.sol/FeeLib.json +93 -37
- package/artifacts/contracts/type/Key32.sol/Key32Lib.dbg.json +1 -1
- package/artifacts/contracts/type/Key32Set.sol/LibKey32Set.dbg.json +1 -1
- package/artifacts/contracts/type/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/type/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/type/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/Referral.sol/ReferralLib.dbg.json +1 -1
- package/artifacts/contracts/type/RequestId.sol/RequestIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RiskId.sol/RiskIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/RoleId.sol/RoleIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/Seconds.sol/SecondsLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorLib.dbg.json +1 -1
- package/artifacts/contracts/type/Selector.sol/SelectorSetLib.dbg.json +1 -1
- package/artifacts/contracts/type/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/type/String.sol/StrLib.dbg.json +1 -1
- package/artifacts/contracts/type/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.dbg.json +1 -1
- package/artifacts/contracts/type/UFixed.sol/UFixedLib.json +60 -36
- package/artifacts/contracts/type/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/type/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/ProxyManager.sol/ProxyManager.json +18 -18
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
- package/artifacts/contracts/upgradeability/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +15 -2
- package/artifacts/contracts/upgradeability/Versionable.sol/Versionable.dbg.json +1 -1
- package/contracts/accounting/IAccountingService.sol +2 -2
- package/contracts/authorization/IAccess.sol +13 -5
- package/contracts/distribution/BasicDistribution.sol +6 -6
- package/contracts/distribution/Distribution.sol +3 -48
- package/contracts/distribution/DistributionService.sol +28 -28
- package/contracts/distribution/IDistributionComponent.sol +0 -9
- package/contracts/examples/fire/FirePool.sol +0 -4
- package/contracts/examples/fire/FireProduct.sol +0 -4
- package/contracts/examples/unpermissioned/SimpleDistribution.sol +4 -8
- package/contracts/examples/unpermissioned/SimpleOracle.sol +4 -8
- package/contracts/examples/unpermissioned/SimplePool.sol +0 -4
- package/contracts/examples/unpermissioned/SimpleProduct.sol +0 -4
- package/contracts/instance/IInstance.sol +2 -1
- package/contracts/instance/IInstanceService.sol +5 -1
- package/contracts/instance/Instance.sol +11 -3
- package/contracts/instance/InstanceService.sol +11 -14
- package/contracts/instance/module/IBundle.sol +6 -5
- package/contracts/instance/module/IComponents.sol +16 -5
- package/contracts/instance/module/IDistribution.sol +17 -7
- package/contracts/instance/module/IPolicy.sol +28 -8
- package/contracts/instance/module/IRisk.sol +2 -0
- package/contracts/oracle/BasicOracle.sol +1 -3
- package/contracts/oracle/IOracle.sol +9 -4
- package/contracts/oracle/Oracle.sol +0 -2
- package/contracts/pool/BasicPool.sol +0 -2
- package/contracts/pool/Pool.sol +0 -2
- package/contracts/pool/PoolService.sol +1 -3
- package/contracts/product/BasicProduct.sol +0 -2
- package/contracts/product/PricingService.sol +6 -6
- package/contracts/product/Product.sol +0 -2
- package/contracts/registry/IRegistry.sol +4 -0
- package/contracts/registry/IRelease.sol +6 -3
- package/contracts/registry/TokenRegistry.sol +4 -1
- package/contracts/shared/Component.sol +8 -25
- package/contracts/shared/ComponentService.sol +34 -15
- package/contracts/shared/IComponent.sol +0 -3
- package/contracts/shared/IComponentService.sol +5 -3
- package/contracts/shared/InstanceLinkedComponent.sol +0 -2
- package/contracts/staking/IStaking.sol +7 -3
- package/contracts/staking/Staking.sol +2 -2
- package/contracts/type/Fee.sol +8 -8
- package/contracts/type/UFixed.sol +27 -10
- package/contracts/upgradeability/ProxyManager.sol +11 -9
- package/contracts/upgradeability/UpgradableProxyWithAdmin.sol +7 -1
- package/package.json +1 -1
@@ -93,17 +93,17 @@ contract DistributionService is
|
|
93
93
|
}
|
94
94
|
|
95
95
|
distributorType = DistributorTypeLib.toDistributorType(distributionNftId, name);
|
96
|
-
IDistribution.DistributorTypeInfo memory info = IDistribution.DistributorTypeInfo(
|
97
|
-
name,
|
98
|
-
distributionNftId,
|
99
|
-
minDiscountPercentage,
|
100
|
-
maxDiscountPercentage,
|
101
|
-
commissionPercentage,
|
102
|
-
maxReferralCount,
|
103
|
-
maxReferralLifetime,
|
104
|
-
allowSelfReferrals,
|
105
|
-
allowRenewals,
|
106
|
-
data);
|
96
|
+
IDistribution.DistributorTypeInfo memory info = IDistribution.DistributorTypeInfo({
|
97
|
+
name: name,
|
98
|
+
distributionNftId: distributionNftId,
|
99
|
+
minDiscountPercentage: minDiscountPercentage,
|
100
|
+
maxDiscountPercentage: maxDiscountPercentage,
|
101
|
+
commissionPercentage: commissionPercentage,
|
102
|
+
maxReferralCount: maxReferralCount,
|
103
|
+
maxReferralLifetime: maxReferralLifetime,
|
104
|
+
allowSelfReferrals: allowSelfReferrals,
|
105
|
+
allowRenewals: allowRenewals,
|
106
|
+
data: data});
|
107
107
|
|
108
108
|
instance.getInstanceStore().createDistributorType(distributorType, info);
|
109
109
|
}
|
@@ -132,11 +132,11 @@ contract DistributionService is
|
|
132
132
|
""
|
133
133
|
));
|
134
134
|
|
135
|
-
IDistribution.DistributorInfo memory info = IDistribution.DistributorInfo(
|
136
|
-
distributorType,
|
137
|
-
true,
|
138
|
-
|
139
|
-
|
135
|
+
IDistribution.DistributorInfo memory info = IDistribution.DistributorInfo({
|
136
|
+
distributorType: distributorType,
|
137
|
+
active: true,
|
138
|
+
numPoliciesSold: 0,
|
139
|
+
data: data});
|
140
140
|
|
141
141
|
instance.getInstanceStore().createDistributor(distributorNftId, info);
|
142
142
|
}
|
@@ -208,16 +208,16 @@ contract DistributionService is
|
|
208
208
|
|
209
209
|
{
|
210
210
|
referralId = ReferralLib.toReferralId(distributionNftId, code);
|
211
|
-
IDistribution.ReferralInfo memory info = IDistribution.ReferralInfo(
|
212
|
-
distributionNftId,
|
213
|
-
distributorNftId,
|
214
|
-
code,
|
215
|
-
discountPercentage,
|
216
|
-
maxReferrals,
|
217
|
-
0,
|
218
|
-
expiryAt,
|
219
|
-
data
|
220
|
-
);
|
211
|
+
IDistribution.ReferralInfo memory info = IDistribution.ReferralInfo({
|
212
|
+
distributionNftId: distributionNftId,
|
213
|
+
distributorNftId: distributorNftId,
|
214
|
+
referralCode: code,
|
215
|
+
discountPercentage: discountPercentage,
|
216
|
+
maxReferrals: maxReferrals,
|
217
|
+
usedReferrals: 0,
|
218
|
+
expiryAt: expiryAt,
|
219
|
+
data: data
|
220
|
+
});
|
221
221
|
|
222
222
|
instance.getInstanceStore().createReferral(referralId, info);
|
223
223
|
}
|
@@ -298,7 +298,7 @@ contract DistributionService is
|
|
298
298
|
InstanceReader reader = instance.getInstanceReader();
|
299
299
|
|
300
300
|
IComponents.ComponentInfo memory distributionInfo = reader.getComponentInfo(distributionNftId);
|
301
|
-
address distributionWallet = distributionInfo.tokenHandler.getWallet();
|
301
|
+
// address distributionWallet = distributionInfo.tokenHandler.getWallet();
|
302
302
|
|
303
303
|
Amount commissionAmount = reader.getFeeAmount(distributorNftId);
|
304
304
|
|
@@ -324,7 +324,7 @@ contract DistributionService is
|
|
324
324
|
// transfer amount to distributor
|
325
325
|
{
|
326
326
|
address distributor = getRegistry().ownerOf(distributorNftId);
|
327
|
-
emit LogDistributionServiceCommissionWithdrawn(distributorNftId, distributor, address(distributionInfo.
|
327
|
+
emit LogDistributionServiceCommissionWithdrawn(distributorNftId, distributor, address(distributionInfo.tokenHandler.TOKEN()), withdrawnAmount);
|
328
328
|
distributionInfo.tokenHandler.pushToken(distributor, withdrawnAmount);
|
329
329
|
}
|
330
330
|
}
|
@@ -9,17 +9,8 @@ import {UFixed} from "../type/UFixed.sol";
|
|
9
9
|
|
10
10
|
interface IDistributionComponent is IInstanceLinkedComponent {
|
11
11
|
|
12
|
-
error ErrorDistributionNotDistributor(address distributor);
|
13
|
-
error ErrorDistributionAlreadyDistributor(address distributor, NftId distributorNftId);
|
14
|
-
|
15
12
|
event LogDistributorUpdated(address to, address operator);
|
16
13
|
|
17
|
-
/// @dev Returns true iff the provided address is registered as a distributor with this distribution component.
|
18
|
-
function isDistributor(address candidate) external view returns (bool);
|
19
|
-
|
20
|
-
/// @dev Returns the distributor Nft Id for the provided address
|
21
|
-
function getDistributorNftId(address distributor) external view returns (NftId distributorNftId);
|
22
|
-
|
23
14
|
function getDiscountPercentage(
|
24
15
|
string memory referralCode
|
25
16
|
) external view returns (UFixed discountPercentage, ReferralStatus status);
|
@@ -19,7 +19,6 @@ contract FirePool is
|
|
19
19
|
address registry,
|
20
20
|
NftId fireProductNftId,
|
21
21
|
string memory componentName,
|
22
|
-
address token,
|
23
22
|
IAuthorization authorization
|
24
23
|
)
|
25
24
|
{
|
@@ -28,7 +27,6 @@ contract FirePool is
|
|
28
27
|
registry,
|
29
28
|
fireProductNftId,
|
30
29
|
componentName,
|
31
|
-
token,
|
32
30
|
IComponents.PoolInfo({
|
33
31
|
maxBalanceAmount: AmountLib.max(),
|
34
32
|
isInterceptingBundleTransfers: false,
|
@@ -46,7 +44,6 @@ contract FirePool is
|
|
46
44
|
address registry,
|
47
45
|
NftId fireProductNftId,
|
48
46
|
string memory componentName,
|
49
|
-
address token,
|
50
47
|
IComponents.PoolInfo memory poolInfo,
|
51
48
|
IAuthorization authorization,
|
52
49
|
address initialOwner
|
@@ -58,7 +55,6 @@ contract FirePool is
|
|
58
55
|
registry,
|
59
56
|
fireProductNftId,
|
60
57
|
componentName,
|
61
|
-
token,
|
62
58
|
poolInfo,
|
63
59
|
authorization,
|
64
60
|
initialOwner);
|
@@ -68,7 +68,6 @@ contract FireProduct is
|
|
68
68
|
address registry,
|
69
69
|
NftId instanceNftid,
|
70
70
|
string memory componentName,
|
71
|
-
address token,
|
72
71
|
IAuthorization authorization
|
73
72
|
)
|
74
73
|
{
|
@@ -78,7 +77,6 @@ contract FireProduct is
|
|
78
77
|
registry,
|
79
78
|
instanceNftid,
|
80
79
|
componentName,
|
81
|
-
token,
|
82
80
|
authorization,
|
83
81
|
initialOwner);
|
84
82
|
}
|
@@ -87,7 +85,6 @@ contract FireProduct is
|
|
87
85
|
address registry,
|
88
86
|
NftId instanceNftId,
|
89
87
|
string memory componentName,
|
90
|
-
address token,
|
91
88
|
IAuthorization authorization,
|
92
89
|
address initialOwner
|
93
90
|
)
|
@@ -98,7 +95,6 @@ contract FireProduct is
|
|
98
95
|
registry,
|
99
96
|
instanceNftId,
|
100
97
|
componentName,
|
101
|
-
token,
|
102
98
|
IComponents.ProductInfo({
|
103
99
|
isProcessingFundedClaims: false,
|
104
100
|
isInterceptingPolicyTransfers: false,
|
@@ -20,8 +20,7 @@ contract SimpleDistribution is
|
|
20
20
|
address registry,
|
21
21
|
NftId productNftId,
|
22
22
|
IAuthorization authorization,
|
23
|
-
address initialOwner
|
24
|
-
address token
|
23
|
+
address initialOwner
|
25
24
|
)
|
26
25
|
{
|
27
26
|
initialize(
|
@@ -29,8 +28,7 @@ contract SimpleDistribution is
|
|
29
28
|
productNftId,
|
30
29
|
authorization,
|
31
30
|
initialOwner,
|
32
|
-
"SimpleDistribution"
|
33
|
-
token);
|
31
|
+
"SimpleDistribution");
|
34
32
|
}
|
35
33
|
|
36
34
|
function initialize(
|
@@ -38,8 +36,7 @@ contract SimpleDistribution is
|
|
38
36
|
NftId productNftId,
|
39
37
|
IAuthorization authorization,
|
40
38
|
address initialOwner,
|
41
|
-
string memory name
|
42
|
-
address token
|
39
|
+
string memory name
|
43
40
|
)
|
44
41
|
public
|
45
42
|
virtual
|
@@ -50,8 +47,7 @@ contract SimpleDistribution is
|
|
50
47
|
productNftId,
|
51
48
|
authorization,
|
52
49
|
initialOwner,
|
53
|
-
name
|
54
|
-
token);
|
50
|
+
name);
|
55
51
|
}
|
56
52
|
|
57
53
|
function approveTokenHandler(IERC20Metadata token, Amount amount) external restricted() onlyOwner() { _approveTokenHandler(token, amount); }
|
@@ -34,8 +34,7 @@ contract SimpleOracle is
|
|
34
34
|
address registry,
|
35
35
|
NftId productNftId,
|
36
36
|
IAuthorization authorization,
|
37
|
-
address initialOwner
|
38
|
-
address token
|
37
|
+
address initialOwner
|
39
38
|
)
|
40
39
|
{
|
41
40
|
initialize(
|
@@ -43,8 +42,7 @@ contract SimpleOracle is
|
|
43
42
|
productNftId,
|
44
43
|
authorization,
|
45
44
|
initialOwner,
|
46
|
-
"SimpleOracle"
|
47
|
-
token
|
45
|
+
"SimpleOracle"
|
48
46
|
);
|
49
47
|
}
|
50
48
|
|
@@ -53,8 +51,7 @@ contract SimpleOracle is
|
|
53
51
|
NftId productNftId,
|
54
52
|
IAuthorization authorization,
|
55
53
|
address initialOwner,
|
56
|
-
string memory name
|
57
|
-
address token
|
54
|
+
string memory name
|
58
55
|
)
|
59
56
|
public
|
60
57
|
virtual
|
@@ -65,8 +62,7 @@ contract SimpleOracle is
|
|
65
62
|
productNftId,
|
66
63
|
authorization,
|
67
64
|
initialOwner,
|
68
|
-
name
|
69
|
-
token);
|
65
|
+
name);
|
70
66
|
}
|
71
67
|
|
72
68
|
/// @dev use case specific handling of oracle requests
|
@@ -19,7 +19,6 @@ contract SimplePool is
|
|
19
19
|
constructor(
|
20
20
|
address registry,
|
21
21
|
NftId productNftId,
|
22
|
-
address token,
|
23
22
|
IComponents.PoolInfo memory poolInfo,
|
24
23
|
IAuthorization authorization,
|
25
24
|
address initialOwner
|
@@ -28,7 +27,6 @@ contract SimplePool is
|
|
28
27
|
initialize(
|
29
28
|
registry,
|
30
29
|
productNftId,
|
31
|
-
token,
|
32
30
|
poolInfo,
|
33
31
|
authorization,
|
34
32
|
initialOwner
|
@@ -39,7 +37,6 @@ contract SimplePool is
|
|
39
37
|
function initialize(
|
40
38
|
address registry,
|
41
39
|
NftId productNftId,
|
42
|
-
address token,
|
43
40
|
IComponents.PoolInfo memory poolInfo,
|
44
41
|
IAuthorization authorization,
|
45
42
|
address initialOwner
|
@@ -52,7 +49,6 @@ contract SimplePool is
|
|
52
49
|
registry,
|
53
50
|
productNftId,
|
54
51
|
"SimplePool",
|
55
|
-
token,
|
56
52
|
poolInfo,
|
57
53
|
authorization,
|
58
54
|
initialOwner);
|
@@ -37,7 +37,6 @@ contract SimpleProduct is
|
|
37
37
|
address registry,
|
38
38
|
NftId instanceNftId,
|
39
39
|
string memory name,
|
40
|
-
address token,
|
41
40
|
IComponents.ProductInfo memory productInfo,
|
42
41
|
IComponents.FeeInfo memory feeInfo,
|
43
42
|
IAuthorization authorization,
|
@@ -48,7 +47,6 @@ contract SimpleProduct is
|
|
48
47
|
registry,
|
49
48
|
instanceNftId,
|
50
49
|
name,
|
51
|
-
token,
|
52
50
|
productInfo,
|
53
51
|
feeInfo,
|
54
52
|
authorization,
|
@@ -60,7 +58,6 @@ contract SimpleProduct is
|
|
60
58
|
address registry,
|
61
59
|
NftId instanceNftid,
|
62
60
|
string memory name,
|
63
|
-
address token,
|
64
61
|
IComponents.ProductInfo memory productInfo,
|
65
62
|
IComponents.FeeInfo memory feeInfo,
|
66
63
|
IAuthorization authorization,
|
@@ -74,7 +71,6 @@ contract SimpleProduct is
|
|
74
71
|
registry,
|
75
72
|
instanceNftid,
|
76
73
|
name,
|
77
|
-
token,
|
78
74
|
productInfo,
|
79
75
|
feeInfo,
|
80
76
|
authorization,
|
@@ -73,7 +73,7 @@ interface IInstance is
|
|
73
73
|
function setTargetLocked(address target, bool locked) external;
|
74
74
|
|
75
75
|
/// @dev Register a product with the instance.
|
76
|
-
function registerProduct(address product) external returns (NftId productNftId);
|
76
|
+
function registerProduct(address product, address token) external returns (NftId productNftId);
|
77
77
|
|
78
78
|
///--- authz ------------------------------------------------------------//
|
79
79
|
|
@@ -102,4 +102,5 @@ interface IInstance is
|
|
102
102
|
function getRiskSet() external view returns (RiskSet);
|
103
103
|
function getInstanceAdmin() external view returns (InstanceAdmin);
|
104
104
|
function getInstanceStore() external view returns (InstanceStore);
|
105
|
+
function isTokenRegistryDisabled() external view returns (bool);
|
105
106
|
}
|
@@ -64,7 +64,11 @@ interface IInstanceService is IService {
|
|
64
64
|
/// Creation of a new instance is achieved by this service through the creation and registration
|
65
65
|
/// of a new clone of the master instance and then setting up the initial wiring and authorization
|
66
66
|
/// of the necessary components.
|
67
|
-
|
67
|
+
/// @param allowAnyToken specifies whether the new instance is allowed to use any token or
|
68
|
+
/// only tokens that are registered in the `TokenRegistry`. Use of tokens **not** registered in the
|
69
|
+
/// `TokenRegistry` may result in problems with token handline and is therefor not recommended. The
|
70
|
+
/// use of such instances **is not supported** by Etherisc.
|
71
|
+
function createInstance(bool allowAnyToken)
|
68
72
|
external
|
69
73
|
returns (
|
70
74
|
IInstance instance,
|
@@ -35,6 +35,7 @@ contract Instance is
|
|
35
35
|
RiskSet internal _riskSet;
|
36
36
|
InstanceStore internal _instanceStore;
|
37
37
|
NftId [] internal _products;
|
38
|
+
bool internal _tokenRegistryDisabled;
|
38
39
|
|
39
40
|
modifier onlyChainNft() {
|
40
41
|
if(msg.sender != getRegistry().getChainNftAddress()) {
|
@@ -51,7 +52,8 @@ contract Instance is
|
|
51
52
|
InstanceReader instanceReader,
|
52
53
|
IRegistry registry,
|
53
54
|
VersionPart release,
|
54
|
-
address initialOwner
|
55
|
+
address initialOwner,
|
56
|
+
bool tokenRegistryDisabled
|
55
57
|
)
|
56
58
|
external
|
57
59
|
initializer()
|
@@ -94,6 +96,8 @@ contract Instance is
|
|
94
96
|
INSTANCE(),
|
95
97
|
release));
|
96
98
|
|
99
|
+
_tokenRegistryDisabled = tokenRegistryDisabled;
|
100
|
+
|
97
101
|
_registerInterface(type(IInstance).interfaceId);
|
98
102
|
}
|
99
103
|
|
@@ -118,13 +122,13 @@ contract Instance is
|
|
118
122
|
|
119
123
|
//--- ProductRegistration ----------------------------------------------//
|
120
124
|
|
121
|
-
function registerProduct(address product)
|
125
|
+
function registerProduct(address product, address token)
|
122
126
|
external
|
123
127
|
restricted()
|
124
128
|
onlyOwner()
|
125
129
|
returns (NftId productNftId)
|
126
130
|
{
|
127
|
-
productNftId = _componentService.registerProduct(product);
|
131
|
+
productNftId = _componentService.registerProduct(product, token);
|
128
132
|
_products.push(productNftId);
|
129
133
|
}
|
130
134
|
|
@@ -292,5 +296,9 @@ contract Instance is
|
|
292
296
|
return _instanceStore;
|
293
297
|
}
|
294
298
|
|
299
|
+
function isTokenRegistryDisabled() external view returns (bool) {
|
300
|
+
return _tokenRegistryDisabled;
|
301
|
+
}
|
302
|
+
|
295
303
|
//--- internal view/pure functions --------------------------------------//
|
296
304
|
}
|
@@ -95,8 +95,8 @@ contract InstanceService is
|
|
95
95
|
IInstance(instanceAddress).getInstanceAdmin().setTargetLocked(target, locked);
|
96
96
|
}
|
97
97
|
|
98
|
-
|
99
|
-
function createInstance()
|
98
|
+
/// @inheritdoc IInstanceService
|
99
|
+
function createInstance(bool allowAnyToken)
|
100
100
|
external
|
101
101
|
virtual
|
102
102
|
restricted()
|
@@ -110,7 +110,7 @@ contract InstanceService is
|
|
110
110
|
|
111
111
|
// create instance admin and instance
|
112
112
|
InstanceAdmin instanceAdmin = _cloneNewInstanceAdmin();
|
113
|
-
instance = _createInstance(instanceAdmin, instanceOwner);
|
113
|
+
instance = _createInstance(instanceAdmin, instanceOwner, allowAnyToken);
|
114
114
|
|
115
115
|
// register cloned instance with registry
|
116
116
|
instanceNftId = _registryService.registerInstance(
|
@@ -318,28 +318,25 @@ contract InstanceService is
|
|
318
318
|
/// function used to setup a new instance
|
319
319
|
function _createInstance(
|
320
320
|
InstanceAdmin instanceAdmin,
|
321
|
-
address instanceOwner
|
321
|
+
address instanceOwner,
|
322
|
+
bool allowAnyToken
|
322
323
|
)
|
323
324
|
internal
|
324
325
|
virtual
|
325
326
|
returns (IInstance)
|
326
327
|
{
|
327
|
-
InstanceStore clonedInstanceStore = InstanceStore(Clones.clone(address(_masterInstanceStore)));
|
328
|
-
BundleSet clonedBundleSet = BundleSet(Clones.clone(_masterInstanceBundleSet));
|
329
|
-
RiskSet clonedRiskSet = RiskSet(Clones.clone(_masterInstanceRiskSet));
|
330
|
-
InstanceReader clonedInstanceReader = InstanceReader(Clones.clone(address(_masterInstanceReader)));
|
331
|
-
|
332
328
|
// clone instance
|
333
329
|
Instance clonedInstance = Instance(Clones.clone(_masterInstance));
|
334
330
|
clonedInstance.initialize(
|
335
331
|
instanceAdmin,
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
332
|
+
InstanceStore(Clones.clone(address(_masterInstanceStore))),
|
333
|
+
BundleSet(Clones.clone(_masterInstanceBundleSet)),
|
334
|
+
RiskSet(Clones.clone(_masterInstanceRiskSet)),
|
335
|
+
InstanceReader(Clones.clone(address(_masterInstanceReader))),
|
340
336
|
getRegistry(),
|
341
337
|
getRelease(),
|
342
|
-
instanceOwner
|
338
|
+
instanceOwner,
|
339
|
+
allowAnyToken);
|
343
340
|
|
344
341
|
return clonedInstance;
|
345
342
|
}
|
@@ -1,20 +1,21 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {Amount} from "../../type/Amount.sol";
|
5
4
|
import {NftId} from "../../type/NftId.sol";
|
6
5
|
import {Fee} from "../../type/Fee.sol";
|
7
|
-
import {Seconds} from "../../type/Seconds.sol";
|
8
6
|
import {Timestamp} from "../../type/Timestamp.sol";
|
9
7
|
|
10
8
|
interface IBundle {
|
11
9
|
|
12
10
|
struct BundleInfo {
|
13
|
-
|
14
|
-
Fee fee; // bundle fee on net premium amounts
|
15
|
-
bytes filter; // required conditions for applications to be considered for collateralization by this bundle
|
11
|
+
// slot 0
|
16
12
|
Timestamp activatedAt;
|
17
13
|
Timestamp expiredAt; // no new policies starting with this timestamp
|
18
14
|
Timestamp closedAt; // no open policies, locked amount = 0
|
15
|
+
NftId poolNftId;
|
16
|
+
// slot 1
|
17
|
+
Fee fee; // bundle fee on net premium amounts
|
18
|
+
// slot 2
|
19
|
+
bytes filter; // required conditions for applications to be considered for collateralization by this bundle
|
19
20
|
}
|
20
21
|
}
|
@@ -1,8 +1,6 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
|
5
|
-
|
6
4
|
import {Amount} from "../../type/Amount.sol";
|
7
5
|
import {Fee} from "../../type/Fee.sol";
|
8
6
|
import {NftId} from "../../type/NftId.sol";
|
@@ -12,13 +10,16 @@ import {UFixed} from "../../type/UFixed.sol";
|
|
12
10
|
interface IComponents {
|
13
11
|
|
14
12
|
struct ComponentInfo {
|
13
|
+
// slot 0
|
15
14
|
string name; // component name (needs to be unique per instance)
|
16
|
-
|
15
|
+
// slot 1
|
17
16
|
TokenHandler tokenHandler;
|
17
|
+
// slot 2
|
18
18
|
bytes data; // will hold component type specific additional info (eg encoded pool info)
|
19
19
|
}
|
20
20
|
|
21
21
|
struct ProductInfo {
|
22
|
+
// slot 0
|
22
23
|
bool isProcessingFundedClaims; // custom logic to react to pool events for funded claims
|
23
24
|
bool isInterceptingPolicyTransfers; // custom logic for policy nft transfers
|
24
25
|
bool hasDistribution; // flag to indicate if distribution is enabled
|
@@ -26,26 +27,36 @@ interface IComponents {
|
|
26
27
|
uint8 numberOfOracles; // actual number of oracles
|
27
28
|
NftId poolNftId; // mandatory
|
28
29
|
NftId distributionNftId; // 0..1 (optional)
|
30
|
+
// slot 1
|
29
31
|
NftId [] oracleNftId; // 0..n (optional)
|
30
32
|
}
|
31
33
|
|
32
34
|
struct FeeInfo {
|
35
|
+
// slot 0
|
33
36
|
Fee productFee; // product fee on net premium
|
37
|
+
// slot 1
|
34
38
|
Fee processingFee; // product fee on payout amounts
|
39
|
+
// slot 2
|
35
40
|
Fee distributionFee; // distribution fee for sales that do not include commissions
|
41
|
+
// slot 3
|
36
42
|
Fee minDistributionOwnerFee; // min fee required by distribution owner (not including commissions for distributors)
|
43
|
+
// slot 4
|
37
44
|
Fee poolFee; // pool fee on net premium
|
45
|
+
// slot 5
|
38
46
|
Fee stakingFee; // pool fee on staked capital from investor
|
47
|
+
// slot 6
|
39
48
|
Fee performanceFee; // pool fee on profits from capital investors
|
40
49
|
}
|
41
50
|
|
42
51
|
struct PoolInfo {
|
52
|
+
// slot 0
|
43
53
|
Amount maxBalanceAmount; // max balance amount allowed for pool
|
54
|
+
UFixed collateralizationLevel; // factor to calculate collateral for sum insurance (default 100%)
|
55
|
+
// slot 1
|
56
|
+
UFixed retentionLevel; // amount of collateral held in pool (default 100%)
|
44
57
|
bool isInterceptingBundleTransfers; // custom logic for bundle nft transfers
|
45
58
|
bool isProcessingConfirmedClaims; // custom logic for claims confirmation
|
46
59
|
bool isExternallyManaged; // funding bundles is restricted to book keeping, actual funds may be provided as needed to support payouts
|
47
60
|
bool isVerifyingApplications; // underwriting requires the pool component checks/confirms the applications
|
48
|
-
UFixed collateralizationLevel; // factor to calculate collateral for sum insurance (default 100%)
|
49
|
-
UFixed retentionLevel; // amount of collateral held in pool (default 100%)
|
50
61
|
}
|
51
62
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
2
2
|
pragma solidity ^0.8.20;
|
3
3
|
|
4
|
-
import {Amount} from "../../type/Amount.sol";
|
5
4
|
import {DistributorType} from "../../type/DistributorType.sol";
|
6
5
|
import {NftId} from "../../type/NftId.sol";
|
7
6
|
import {Seconds} from "../../type/Seconds.sol";
|
@@ -11,33 +10,44 @@ import {UFixed} from "../../type/UFixed.sol";
|
|
11
10
|
interface IDistribution {
|
12
11
|
|
13
12
|
struct DistributorTypeInfo {
|
14
|
-
|
15
|
-
NftId distributionNftId;
|
13
|
+
// slot 0
|
16
14
|
UFixed minDiscountPercentage;
|
15
|
+
NftId distributionNftId;
|
16
|
+
// slot 1
|
17
17
|
UFixed maxDiscountPercentage;
|
18
|
-
UFixed commissionPercentage;
|
19
18
|
uint32 maxReferralCount;
|
20
19
|
Seconds maxReferralLifetime;
|
21
20
|
bool allowSelfReferrals;
|
22
21
|
bool allowRenewals;
|
22
|
+
// slot 2
|
23
|
+
UFixed commissionPercentage;
|
24
|
+
// slot 3
|
25
|
+
string name;
|
26
|
+
// slot 4
|
23
27
|
bytes data;
|
24
28
|
}
|
25
29
|
|
26
30
|
struct DistributorInfo {
|
31
|
+
// slot 0
|
27
32
|
DistributorType distributorType;
|
28
33
|
bool active;
|
29
|
-
bytes data;
|
30
34
|
uint32 numPoliciesSold;
|
35
|
+
// slot 1
|
36
|
+
bytes data;
|
31
37
|
}
|
32
38
|
|
33
39
|
struct ReferralInfo {
|
40
|
+
// slot 0
|
34
41
|
NftId distributionNftId;
|
35
42
|
NftId distributorNftId;
|
36
|
-
string referralCode;
|
37
|
-
UFixed discountPercentage;
|
38
43
|
uint32 maxReferrals;
|
39
44
|
uint32 usedReferrals;
|
45
|
+
// slot 1
|
46
|
+
UFixed discountPercentage;
|
40
47
|
Timestamp expiryAt;
|
48
|
+
// slot 2
|
49
|
+
string referralCode;
|
50
|
+
// slot 3
|
41
51
|
bytes data;
|
42
52
|
}
|
43
53
|
|