@etherisc/gif-next 0.0.2-299fe4a-464 → 0.0.2-2e256e3-524
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 +84 -6
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +1 -1
- package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +166 -39
- package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
- package/artifacts/contracts/components/Distribution.sol/Distribution.json +557 -0
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +119 -39
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +177 -0
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +108 -156
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
- package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +67 -139
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
- package/artifacts/contracts/components/Pool.sol/Pool.json +417 -88
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
- package/artifacts/contracts/components/Product.sol/Product.json +360 -51
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
- package/artifacts/contracts/experiment/errors/Require.sol/Require.json +2 -2
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +2 -2
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/A.json +2 -2
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +2 -2
- package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +2 -2
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
- package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +2 -2
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +2 -2
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +2 -2
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +854 -627
- package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
- package/artifacts/contracts/instance/Instance.sol/Instance.json +1121 -726
- package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/{InstanceBase.sol/InstanceBase.json → base/ComponentServiceBase.sol/ComponentServiceBase.json} +230 -62
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +113 -0
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +560 -0
- package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/{module/lifecycle/ILifecycle.sol/ILifecycleModule.json → base/ILifecycle.sol/ILifecycle.json} +10 -77
- package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +4 -0
- package/artifacts/contracts/instance/{service → base}/IService.sol/IService.json +180 -59
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +544 -0
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
- package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +710 -0
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
- package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +169 -0
- package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +4 -0
- package/artifacts/contracts/instance/{module/product/ProductModule.sol/ProductModule.json → base/ModuleBase.sol/ModuleBase.json} +2 -2
- package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +4 -0
- package/artifacts/contracts/instance/{service → base}/ServiceBase.sol/ServiceBase.json +226 -58
- package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +1 -1
- package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +71 -50
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +1 -1
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +71 -50
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +22 -93
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +1 -1
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +22 -93
- package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +10 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +4 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.json +10 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.json +10 -0
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +61 -51
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +61 -51
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +1 -1
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +29 -14
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +28 -13
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +4 -0
- package/artifacts/contracts/instance/module/{product/IProductModule.sol/IProductModule.json → risk/IRisk.sol/IRisk.json} +2 -2
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +113 -0
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +4 -0
- package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +131 -0
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +326 -226
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +2 -2
- package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +1 -1
- package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +326 -226
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +368 -93
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +630 -0
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +181 -79
- package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
- package/artifacts/contracts/instance/service/{ComponentServiceBase.sol/ComponentServiceBase.json → IDistributionService.sol/IDistributionService.json} +209 -63
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +240 -55
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +330 -56
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +332 -78
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
- package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +473 -90
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +141 -12
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +5 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +298 -39
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +745 -0
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
- package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +34 -0
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
- package/artifacts/contracts/registry/Registry.sol/Registry.json +489 -120
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +997 -0
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
- package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +494 -0
- package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +4 -0
- package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.json +107 -0
- package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
- package/artifacts/contracts/shared/ERC165.sol/ERC165.json +2 -2
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +4 -0
- package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +127 -0
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
- package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +117 -37
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
- package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +60 -19
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +4 -0
- package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +158 -0
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
- package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +370 -0
- package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
- package/artifacts/contracts/shared/Registerable.sol/Registerable.json +190 -37
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
- package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
- package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
- package/artifacts/contracts/shared/Versionable.sol/Versionable.json +83 -19
- package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
- package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +557 -0
- package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
- package/artifacts/contracts/test/TestFee.sol/TestFee.json +28 -4
- package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +1 -1
- package/artifacts/contracts/test/TestPool.sol/TestPool.json +417 -88
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +1 -1
- package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +407 -56
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
- package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +204 -36
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
- package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +38 -4
- package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
- package/artifacts/contracts/test/TestService.sol/TestService.json +262 -85
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
- package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +2 -2
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +14 -18
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
- package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +93 -53
- package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
- package/artifacts/contracts/test/Usdc.sol/USDC.json +338 -0
- package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
- package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.json +2 -2
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +2 -2
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +2 -2
- package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +4 -0
- package/artifacts/contracts/types/Fee.sol/FeeLib.json +257 -0
- package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
- package/artifacts/contracts/types/Key32.sol/Key32Lib.json +111 -0
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +65 -4
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
- package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
- package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
- package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +30 -0
- package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
- package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +2 -2
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +34 -8
- package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionLib.json +101 -2
- package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
- package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
- package/contracts/components/BaseComponent.sol +12 -22
- package/contracts/components/Distribution.sol +155 -0
- package/contracts/components/IBaseComponent.sol +2 -2
- package/contracts/components/IDistributionComponent.sol +46 -0
- package/contracts/components/IPoolComponent.sol +15 -8
- package/contracts/components/IProductComponent.sol +26 -8
- package/contracts/components/Pool.sol +99 -27
- package/contracts/components/Product.sol +204 -22
- package/contracts/instance/IInstance.sol +20 -16
- package/contracts/instance/Instance.sol +37 -12
- package/contracts/instance/{service → base}/ComponentServiceBase.sol +13 -5
- package/contracts/instance/base/IInstanceBase.sol +23 -0
- package/contracts/instance/base/IKeyValueStore.sol +50 -0
- package/contracts/instance/base/ILifecycle.sol +30 -0
- package/contracts/instance/base/InstanceBase.sol +89 -0
- package/contracts/instance/base/KeyValueStore.sol +161 -0
- package/contracts/instance/{module/lifecycle/LifecycleModule.sol → base/Lifecycle.sol} +50 -39
- package/contracts/instance/base/ModuleBase.sol +57 -0
- package/contracts/instance/base/ServiceBase.sol +44 -0
- package/contracts/instance/module/access/Access.sol +6 -6
- package/contracts/instance/module/bundle/BundleModule.sol +24 -118
- package/contracts/instance/module/bundle/IBundle.sol +9 -9
- package/contracts/instance/module/component/ComponentModule.sol +32 -65
- package/contracts/instance/module/component/IComponent.sol +7 -32
- package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
- package/contracts/instance/module/distribution/IDistribution.sol +10 -0
- package/contracts/instance/module/policy/IPolicy.sol +13 -10
- package/contracts/instance/module/policy/PolicyModule.sol +33 -26
- package/contracts/instance/module/pool/IPoolModule.sol +4 -4
- package/contracts/instance/module/pool/PoolModule.sol +23 -15
- package/contracts/instance/module/risk/IRisk.sol +26 -0
- package/contracts/instance/module/risk/RiskModule.sol +62 -0
- package/contracts/instance/module/treasury/ITreasury.sol +33 -53
- package/contracts/instance/module/treasury/TokenHandler.sol +2 -2
- package/contracts/instance/module/treasury/TreasuryModule.sol +72 -89
- package/contracts/instance/service/ComponentOwnerService.sol +202 -101
- package/contracts/instance/service/DistributionService.sol +54 -0
- package/contracts/instance/service/IComponentOwnerService.sol +1 -3
- package/contracts/instance/service/IDistributionService.sol +12 -0
- package/contracts/instance/service/IPoolService.sol +8 -1
- package/contracts/instance/service/IProductService.sol +56 -7
- package/contracts/instance/service/PoolService.sol +81 -30
- package/contracts/instance/service/ProductService.sol +252 -100
- package/contracts/registry/ChainNft.sol +43 -15
- package/contracts/registry/IChainNft.sol +3 -2
- package/contracts/registry/IRegistry.sol +42 -26
- package/contracts/registry/IRegistryService.sol +29 -0
- package/contracts/registry/ITransferInterceptor.sol +6 -0
- package/contracts/registry/Registry.sol +385 -275
- package/contracts/registry/RegistryService.sol +368 -0
- package/contracts/registry/RegistryServiceManager.sol +52 -0
- package/contracts/shared/ContractDeployerLib.sol +72 -0
- package/contracts/shared/ERC165.sol +1 -1
- package/contracts/shared/INftOwnable.sol +22 -0
- package/contracts/shared/IRegisterable.sol +9 -16
- package/contracts/shared/IVersionable.sol +56 -12
- package/contracts/shared/NftOwnable.sol +122 -0
- package/contracts/shared/ProxyManager.sol +103 -0
- package/contracts/shared/Registerable.sol +62 -59
- package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
- package/contracts/shared/Versionable.sol +111 -56
- package/contracts/test/TestDistribution.sol +22 -0
- package/contracts/test/TestFee.sol +3 -3
- package/contracts/test/TestPool.sol +8 -3
- package/contracts/test/TestProduct.sol +38 -8
- package/contracts/test/TestRegisterable.sol +5 -6
- package/contracts/test/TestRoleId.sol +2 -2
- package/contracts/test/TestService.sol +7 -16
- package/contracts/test/TestVersion.sol +4 -7
- package/contracts/test/TestVersionable.sol +2 -5
- package/contracts/test/Usdc.sol +26 -0
- package/contracts/types/Fee.sol +44 -20
- package/contracts/types/Key32.sol +45 -0
- package/contracts/types/NftId.sol +16 -1
- package/contracts/types/ObjectType.sol +24 -8
- package/contracts/types/ReferralId.sol +48 -0
- package/contracts/types/RiskId.sol +43 -0
- package/contracts/types/RoleId.sol +12 -10
- package/contracts/types/StateId.sol +7 -1
- package/contracts/types/UFixed.sol +19 -16
- package/contracts/types/Version.sol +38 -25
- package/package.json +5 -2
- package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.dbg.json +0 -4
- package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.json +0 -50
- package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
- package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
- package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
- package/artifacts/contracts/instance/module/product/IProductModule.sol/IProductModule.dbg.json +0 -4
- package/artifacts/contracts/instance/module/product/ProductModule.sol/ProductModule.dbg.json +0 -4
- package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
- package/artifacts/contracts/instance/service/IService.sol/IService.dbg.json +0 -4
- package/artifacts/contracts/instance/service/ServiceBase.sol/ServiceBase.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +0 -4
- package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +0 -24
- package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +0 -4
- package/artifacts/contracts/shared/IOwnable.sol/IOwnable.json +0 -24
- package/contracts/experiment/statemachine/README.md +0 -112
- package/contracts/instance/IServiceLinked.sol +0 -12
- package/contracts/instance/InstanceBase.sol +0 -74
- package/contracts/instance/module/lifecycle/ILifecycle.sol +0 -47
- package/contracts/instance/module/product/IProductModule.sol +0 -6
- package/contracts/instance/module/product/ProductModule.sol +0 -8
- package/contracts/instance/service/ServiceBase.sol +0 -39
- package/contracts/registry/IRegistryLinked.sol +0 -8
- package/contracts/shared/IOwnable.sol +0 -6
- /package/contracts/instance/{service → base}/IService.sol +0 -0
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
# State Machines
|
|
2
|
-
|
|
3
|
-
Most GIF objects have a life cycle defined by a state machine.
|
|
4
|
-
|
|
5
|
-
For each object type the set of possible states is defined together with its initial state and the set of valid state transitions.
|
|
6
|
-
|
|
7
|
-
## Object Types without States
|
|
8
|
-
|
|
9
|
-
* Protocol
|
|
10
|
-
* Chains
|
|
11
|
-
* Registries (both chain and main registry)
|
|
12
|
-
|
|
13
|
-
## Object Types with States
|
|
14
|
-
|
|
15
|
-
* Tokens
|
|
16
|
-
* Instances
|
|
17
|
-
* Products
|
|
18
|
-
* Oracles
|
|
19
|
-
* Pools
|
|
20
|
-
* Bundles
|
|
21
|
-
* Policies
|
|
22
|
-
* Claim (non-NFT)
|
|
23
|
-
* Payout (non-NFT)
|
|
24
|
-
|
|
25
|
-
### Simple State Machine
|
|
26
|
-
|
|
27
|
-
Valid states
|
|
28
|
-
|
|
29
|
-
* Active (initial state)
|
|
30
|
-
* Paused
|
|
31
|
-
* Archived (final state)
|
|
32
|
-
|
|
33
|
-
Valid state transitions:
|
|
34
|
-
|
|
35
|
-
* Active -> Paused
|
|
36
|
-
* Paused -> Active
|
|
37
|
-
* Paused -> Archived
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Candidate object types for simple state machine
|
|
41
|
-
|
|
42
|
-
* Token
|
|
43
|
-
* Instance
|
|
44
|
-
* Product
|
|
45
|
-
* Oracle
|
|
46
|
-
* Pool
|
|
47
|
-
|
|
48
|
-
To discuss:
|
|
49
|
-
|
|
50
|
-
* Archived is final state
|
|
51
|
-
* What mechanism should exist to revert an unintended transition to 'Archived' state. Should there be such a mechanism?
|
|
52
|
-
* What mechanism should exist when the NFT of such an object is burned prematurely. Should there be such a mechanism
|
|
53
|
-
|
|
54
|
-
### Bundle State Machine
|
|
55
|
-
|
|
56
|
-
Valid states
|
|
57
|
-
|
|
58
|
-
* Active (initial state)
|
|
59
|
-
* Paused
|
|
60
|
-
* Expired (implicit state)
|
|
61
|
-
* Closed (final state)
|
|
62
|
-
|
|
63
|
-
Expired is not an explicit state.
|
|
64
|
-
A bundle is expired for block.timestamp >= expiredAt
|
|
65
|
-
|
|
66
|
-
### Policy State Machine
|
|
67
|
-
|
|
68
|
-
Valid states
|
|
69
|
-
|
|
70
|
-
* Applied (initial state)
|
|
71
|
-
* Revoked (final state)
|
|
72
|
-
* Declined (final state)
|
|
73
|
-
* Active
|
|
74
|
-
* Expired (implicit state)
|
|
75
|
-
* Closed (final state)
|
|
76
|
-
|
|
77
|
-
Expired is not an explicit state.
|
|
78
|
-
A policy is expired for block.timestamp >= expiredAt
|
|
79
|
-
|
|
80
|
-
To discuss:
|
|
81
|
-
|
|
82
|
-
* Should 'Closed' be less explicit using a closedAt state variable?
|
|
83
|
-
* Or even more lighweight? ie. block.timestamp >= expiredAt and no open claims
|
|
84
|
-
|
|
85
|
-
Valid state transitions:
|
|
86
|
-
|
|
87
|
-
* Applied -> Revoked
|
|
88
|
-
* Applied -> Declined
|
|
89
|
-
* Applied -> Active
|
|
90
|
-
* Active -> Closed (needs to be expired)
|
|
91
|
-
|
|
92
|
-
### Claim State Machine
|
|
93
|
-
|
|
94
|
-
Valid states
|
|
95
|
-
* Applied (initial state)
|
|
96
|
-
* Confirmed
|
|
97
|
-
* Declined (final state)
|
|
98
|
-
* Closed (final state)
|
|
99
|
-
|
|
100
|
-
Valid state transitions:
|
|
101
|
-
* Applied -> Confirmed
|
|
102
|
-
* Applied -> Declined
|
|
103
|
-
* Confirmed -> Closed
|
|
104
|
-
|
|
105
|
-
### Payout State Machine
|
|
106
|
-
|
|
107
|
-
Valid states
|
|
108
|
-
* Expected
|
|
109
|
-
* PaidOut
|
|
110
|
-
|
|
111
|
-
Valid state transitions:
|
|
112
|
-
* Expected -> PaidOut
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
pragma solidity ^0.8.19;
|
|
3
|
-
|
|
4
|
-
import {IComponentOwnerService} from "./service/IComponentOwnerService.sol";
|
|
5
|
-
import {IProductService} from "./service/IProductService.sol";
|
|
6
|
-
import {IPoolService} from "./service/IPoolService.sol";
|
|
7
|
-
|
|
8
|
-
interface IServiceLinked {
|
|
9
|
-
function getComponentOwnerService() external view returns(IComponentOwnerService service);
|
|
10
|
-
function getProductService() external view returns(IProductService service);
|
|
11
|
-
function getPoolService() external view returns(IPoolService service);
|
|
12
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
pragma solidity ^0.8.19;
|
|
3
|
-
|
|
4
|
-
import {Versionable} from "../shared/Versionable.sol";
|
|
5
|
-
import {Registerable} from "../shared/Registerable.sol";
|
|
6
|
-
// import {IRegistry} from "../registry/IRegistry.sol";
|
|
7
|
-
|
|
8
|
-
// import {IInstance} from "./IInstance.sol";
|
|
9
|
-
import {ObjectType, INSTANCE} from "../types/ObjectType.sol";
|
|
10
|
-
import {NftId} from "../types/NftId.sol";
|
|
11
|
-
import {Version, VersionPart, toVersion, toVersionPart} from "../types/Version.sol";
|
|
12
|
-
|
|
13
|
-
import {IComponentOwnerService} from "./service/IComponentOwnerService.sol";
|
|
14
|
-
import {IProductService} from "./service/IProductService.sol";
|
|
15
|
-
import {IPoolService} from "./service/IPoolService.sol";
|
|
16
|
-
|
|
17
|
-
import {IServiceLinked} from "./IServiceLinked.sol";
|
|
18
|
-
import {IInstance} from "./IInstance.sol";
|
|
19
|
-
|
|
20
|
-
abstract contract InstanceBase is
|
|
21
|
-
Versionable,
|
|
22
|
-
Registerable,
|
|
23
|
-
IServiceLinked
|
|
24
|
-
{
|
|
25
|
-
IComponentOwnerService internal _componentOwnerService;
|
|
26
|
-
IProductService internal _productService;
|
|
27
|
-
IPoolService internal _poolService;
|
|
28
|
-
|
|
29
|
-
constructor(
|
|
30
|
-
address registry,
|
|
31
|
-
NftId registryNftId
|
|
32
|
-
)
|
|
33
|
-
Registerable(registry, registryNftId)
|
|
34
|
-
Versionable()
|
|
35
|
-
{
|
|
36
|
-
_registerInterface(type(IInstance).interfaceId);
|
|
37
|
-
_linkToServicesInRegistry();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// from versionable
|
|
41
|
-
function getVersion()
|
|
42
|
-
public
|
|
43
|
-
pure
|
|
44
|
-
virtual override
|
|
45
|
-
returns(Version)
|
|
46
|
-
{
|
|
47
|
-
return toVersion(
|
|
48
|
-
toVersionPart(3),
|
|
49
|
-
toVersionPart(0),
|
|
50
|
-
toVersionPart(0));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// from registerable
|
|
54
|
-
function getType() external pure override returns (ObjectType objectType) {
|
|
55
|
-
return INSTANCE();
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
// internal / private functions
|
|
60
|
-
function _linkToServicesInRegistry() internal {
|
|
61
|
-
VersionPart majorVersion = getVersion().toMajorPart();
|
|
62
|
-
_componentOwnerService = IComponentOwnerService(_getAndCheck("ComponentOwnerService", majorVersion));
|
|
63
|
-
_productService = IProductService(_getAndCheck("ProductService", majorVersion));
|
|
64
|
-
_poolService = IPoolService(_getAndCheck("PoolService", majorVersion));
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function _getAndCheck(string memory serviceName, VersionPart majorVersion) internal view returns (address serviceAddress) {
|
|
68
|
-
serviceAddress = _registry.getServiceAddress(serviceName, majorVersion);
|
|
69
|
-
require(
|
|
70
|
-
serviceAddress != address(0),
|
|
71
|
-
"ERROR:INS-001:NOT_REGISTERED"
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
pragma solidity ^0.8.19;
|
|
3
|
-
|
|
4
|
-
import {ObjectType} from "../../../types/ObjectType.sol";
|
|
5
|
-
import {StateId, toStateId, zeroStateId} from "../../../types/StateId.sol";
|
|
6
|
-
import {NftId} from "../../../types/NftId.sol";
|
|
7
|
-
|
|
8
|
-
interface ILifecycle {
|
|
9
|
-
event LogComponentStateChanged(
|
|
10
|
-
NftId nftId,
|
|
11
|
-
ObjectType objectType,
|
|
12
|
-
StateId fromStateId,
|
|
13
|
-
StateId toStateId
|
|
14
|
-
);
|
|
15
|
-
event LogBundleStateChanged(
|
|
16
|
-
NftId nftId,
|
|
17
|
-
StateId fromStateId,
|
|
18
|
-
StateId toStateId
|
|
19
|
-
);
|
|
20
|
-
event LogPolicyStateChanged(
|
|
21
|
-
NftId nftId,
|
|
22
|
-
StateId fromStateId,
|
|
23
|
-
StateId toStateId
|
|
24
|
-
);
|
|
25
|
-
// event LogClaimStateChanged(NftId nftId, ClaimId claimId, StateId fromStateId, StateId toStateId);
|
|
26
|
-
// event LogPayoutStateChanged(NftId nftId, ClaimId claimId, PayoutId payoutId, StateId fromStateId, StateId toStateId);
|
|
27
|
-
|
|
28
|
-
error ErrorNoLifecycle(NftId nftId, ObjectType objectType);
|
|
29
|
-
error ErrorInvalidStateTransition(
|
|
30
|
-
NftId nftId,
|
|
31
|
-
ObjectType objectType,
|
|
32
|
-
StateId fromStateId,
|
|
33
|
-
StateId toStateId
|
|
34
|
-
);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
interface ILifecycleModule is ILifecycle {
|
|
38
|
-
function getInitialState(
|
|
39
|
-
ObjectType objectType
|
|
40
|
-
) external view returns (StateId);
|
|
41
|
-
|
|
42
|
-
function isValidTransition(
|
|
43
|
-
ObjectType objectType,
|
|
44
|
-
StateId fromId,
|
|
45
|
-
StateId toId
|
|
46
|
-
) external view returns (bool);
|
|
47
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
pragma solidity ^0.8.19;
|
|
3
|
-
|
|
4
|
-
// import {IRegistry} from "../../registry/IRegistry.sol";
|
|
5
|
-
// import {ITreasury, ITreasuryModule, TokenHandler} from "../../instance/module/treasury/ITreasury.sol";
|
|
6
|
-
import {NftId, zeroNftId} from "../../types/NftId.sol";
|
|
7
|
-
import {ObjectType, SERVICE} from "../../types/ObjectType.sol";
|
|
8
|
-
import {Version, VersionPart, toVersion, toVersionPart} from "../../types/Version.sol";
|
|
9
|
-
|
|
10
|
-
import {Registerable} from "../../shared/Registerable.sol";
|
|
11
|
-
import {IVersionable} from "../../shared/IVersionable.sol";
|
|
12
|
-
import {Versionable} from "../../shared/Versionable.sol";
|
|
13
|
-
|
|
14
|
-
import {IService} from "./IService.sol";
|
|
15
|
-
|
|
16
|
-
abstract contract ServiceBase is
|
|
17
|
-
Registerable,
|
|
18
|
-
Versionable,
|
|
19
|
-
IService
|
|
20
|
-
{
|
|
21
|
-
|
|
22
|
-
constructor(
|
|
23
|
-
address registry,
|
|
24
|
-
NftId registryNftId
|
|
25
|
-
)
|
|
26
|
-
Registerable(registry, registryNftId)
|
|
27
|
-
Versionable()
|
|
28
|
-
{
|
|
29
|
-
_registerInterface(type(IService).interfaceId);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function getMajorVersion() external view override returns(VersionPart majorVersion) {
|
|
33
|
-
return this.getVersion().toMajorPart();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function getType() external pure override returns (ObjectType) {
|
|
37
|
-
return SERVICE();
|
|
38
|
-
}
|
|
39
|
-
}
|
|
File without changes
|