@etherisc/gif-next 0.0.2-70d92f6-918 → 0.0.2-743affe-003

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.
Files changed (385) hide show
  1. package/README.md +160 -6
  2. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +4 -0
  3. package/artifacts/contracts/components/{Component.sol/Component.json → BaseComponent.sol/BaseComponent.json} +80 -72
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +445 -0
  6. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +4 -0
  7. package/artifacts/contracts/{instance/component/IComponent.sol/IComponentContract.json → components/IBaseComponent.sol/IBaseComponent.json} +58 -86
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
  9. package/artifacts/contracts/components/{IPool.sol/IPoolComponent.json → IDistributionComponent.sol/IDistributionComponent.json} +186 -98
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +4 -0
  11. package/artifacts/contracts/{instance/treasury/ITreasury.sol/ITreasuryModule.json → components/IPoolComponent.sol/IPoolComponent.json} +230 -246
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +4 -0
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +373 -0
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +385 -111
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +236 -80
  18. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
  19. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  20. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  21. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  22. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  23. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  24. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  26. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  28. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
  29. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
  30. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
  31. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
  32. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
  33. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +2 -2
  34. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
  35. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +2 -2
  36. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  37. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  38. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  39. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +1395 -702
  40. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +4 -0
  41. package/artifacts/contracts/instance/{component/IComponent.sol → IInstanceLinked.sol}/IInstanceLinked.json +1 -1
  42. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  43. package/artifacts/contracts/instance/Instance.sol/Instance.json +1678 -824
  44. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
  45. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +393 -0
  46. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
  47. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +113 -0
  48. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
  49. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +560 -0
  50. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
  51. package/artifacts/contracts/instance/{lifecycle/ILifecycle.sol/ILifecycleModule.json → base/ILifecycle.sol/ILifecycle.json} +10 -77
  52. package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +4 -0
  53. package/artifacts/contracts/instance/{component/ComponentModule.sol/ComponentModule.json → base/IService.sol/IService.json} +180 -135
  54. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +4 -0
  55. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +456 -0
  56. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
  57. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +710 -0
  58. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
  59. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +169 -0
  60. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +4 -0
  61. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.json +10 -0
  62. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +4 -0
  63. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.json +380 -0
  64. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +4 -0
  65. package/artifacts/contracts/instance/{access → module/access}/Access.sol/AccessModule.json +85 -152
  66. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +4 -0
  67. package/artifacts/contracts/instance/{access → module/access}/IAccess.sol/IAccess.json +1 -1
  68. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +4 -0
  69. package/artifacts/contracts/instance/{access → module/access}/IAccess.sol/IAccessModule.json +96 -99
  70. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +4 -0
  71. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +297 -0
  72. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +4 -0
  73. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.json +10 -0
  74. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +4 -0
  75. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +297 -0
  76. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +4 -0
  77. package/artifacts/contracts/instance/{pool/IPoolModule.sol/IPoolModule.json → module/component/ComponentModule.sol/ComponentModule.json} +49 -61
  78. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +4 -0
  79. package/artifacts/contracts/instance/{component → module/component}/IComponent.sol/IComponent.json +1 -1
  80. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +4 -0
  81. package/artifacts/contracts/instance/{product/IProductService.sol/IProductService.json → module/component/IComponent.sol/IComponentModule.json} +51 -61
  82. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +4 -0
  83. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +10 -0
  84. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +4 -0
  85. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.json +10 -0
  86. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +4 -0
  87. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.json +10 -0
  88. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +4 -0
  89. package/artifacts/contracts/instance/{policy → module/policy}/IPolicy.sol/IPolicy.json +1 -1
  90. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +4 -0
  91. package/artifacts/contracts/instance/{policy → module/policy}/IPolicy.sol/IPolicyModule.json +147 -117
  92. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +4 -0
  93. package/artifacts/contracts/instance/{policy → module/policy}/PolicyModule.sol/PolicyModule.json +148 -118
  94. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +4 -0
  95. package/artifacts/contracts/instance/{pool → module/pool}/IPoolModule.sol/IPool.json +1 -1
  96. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +4 -0
  97. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +164 -0
  98. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +4 -0
  99. package/artifacts/contracts/instance/{pool → module/pool}/PoolModule.sol/PoolModule.json +66 -57
  100. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +4 -0
  101. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.json +10 -0
  102. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +4 -0
  103. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +113 -0
  104. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +4 -0
  105. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +131 -0
  106. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +4 -0
  107. package/artifacts/contracts/instance/{treasury → module/treasury}/ITreasury.sol/ITreasury.json +1 -1
  108. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +4 -0
  109. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +638 -0
  110. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +4 -0
  111. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +76 -0
  112. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +4 -0
  113. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +638 -0
  114. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +4 -0
  115. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +690 -0
  116. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  117. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +526 -0
  118. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +4 -0
  119. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +389 -0
  120. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
  121. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +369 -0
  122. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +4 -0
  123. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +484 -0
  124. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +4 -0
  125. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +674 -0
  126. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +4 -0
  127. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +649 -0
  128. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +4 -0
  129. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +964 -0
  130. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  131. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +194 -2
  132. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
  133. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +5 -0
  134. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  135. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +415 -32
  136. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
  137. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +24 -0
  138. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
  139. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +668 -0
  140. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
  141. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +34 -0
  142. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  143. package/artifacts/contracts/registry/Registry.sol/Registry.json +631 -52
  144. package/artifacts/contracts/registry/RegistryInstaller.sol/RegistryInstaller.dbg.json +4 -0
  145. package/artifacts/contracts/registry/RegistryInstaller.sol/RegistryInstaller.json +344 -0
  146. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
  147. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +861 -0
  148. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +4 -0
  149. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +35 -0
  150. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +4 -0
  151. package/artifacts/contracts/{registry/IRegistry.sol → shared/IOwnable.sol}/IOwnable.json +1 -1
  152. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +4 -0
  153. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +124 -0
  154. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +4 -0
  155. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +205 -0
  156. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
  157. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +310 -0
  158. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +4 -0
  159. package/artifacts/contracts/{registry/Registry.sol → shared/Registerable.sol}/Registerable.json +71 -77
  160. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
  161. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
  162. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +4 -0
  163. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +228 -0
  164. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
  165. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +445 -0
  166. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +4 -0
  167. package/artifacts/contracts/test/TestFee.sol/TestFee.json +119 -0
  168. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +4 -0
  169. package/artifacts/contracts/test/TestPool.sol/TestPool.json +602 -0
  170. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +4 -0
  171. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +632 -0
  172. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +4 -0
  173. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +191 -0
  174. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +4 -0
  175. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +116 -0
  176. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +4 -0
  177. package/artifacts/contracts/test/TestService.sol/TestService.json +472 -0
  178. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +4 -0
  179. package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +338 -0
  180. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +4 -0
  181. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +218 -0
  182. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +4 -0
  183. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +270 -0
  184. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
  185. package/artifacts/contracts/{mock → test}/Usdc.sol/USDC.json +3 -3
  186. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +4 -0
  187. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.json +10 -0
  188. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  189. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  190. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +4 -0
  191. package/artifacts/contracts/types/Fee.sol/FeeLib.json +257 -0
  192. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
  193. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +111 -0
  194. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  195. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +65 -4
  196. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +4 -0
  197. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +10 -0
  198. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  199. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  200. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
  201. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
  202. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  203. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  204. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
  205. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +30 -0
  206. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  207. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  208. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  209. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +64 -2
  210. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
  211. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +58 -58
  212. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +4 -0
  213. package/artifacts/contracts/types/Version.sol/VersionLib.json +177 -0
  214. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +4 -0
  215. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +30 -0
  216. package/contracts/components/BaseComponent.sol +79 -0
  217. package/contracts/components/Distribution.sol +155 -0
  218. package/contracts/components/IBaseComponent.sol +19 -0
  219. package/contracts/components/IDistributionComponent.sol +47 -0
  220. package/contracts/components/IPoolComponent.sol +65 -0
  221. package/contracts/components/IProductComponent.sol +39 -0
  222. package/contracts/components/Pool.sol +218 -24
  223. package/contracts/components/Product.sol +248 -38
  224. package/contracts/instance/IInstance.sol +40 -11
  225. package/contracts/instance/IInstanceLinked.sol +8 -0
  226. package/contracts/instance/Instance.sol +58 -45
  227. package/contracts/instance/base/ComponentServiceBase.sol +49 -0
  228. package/contracts/instance/base/IInstanceBase.sol +23 -0
  229. package/contracts/instance/base/IKeyValueStore.sol +50 -0
  230. package/contracts/instance/{lifecycle → base}/ILifecycle.sol +4 -21
  231. package/contracts/instance/base/IService.sol +15 -0
  232. package/contracts/instance/base/InstanceBase.sol +89 -0
  233. package/contracts/instance/base/KeyValueStore.sol +161 -0
  234. package/contracts/instance/base/Lifecycle.sol +100 -0
  235. package/contracts/instance/base/ModuleBase.sol +57 -0
  236. package/contracts/instance/base/ServiceBase.sol +43 -0
  237. package/contracts/instance/module/access/Access.sol +149 -0
  238. package/contracts/instance/module/access/IAccess.sol +53 -0
  239. package/contracts/instance/module/bundle/BundleModule.sol +134 -0
  240. package/contracts/instance/module/bundle/IBundle.sol +53 -0
  241. package/contracts/instance/module/component/ComponentModule.sol +71 -0
  242. package/contracts/instance/module/component/IComponent.sol +28 -0
  243. package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
  244. package/contracts/instance/module/distribution/IDistribution.sol +10 -0
  245. package/contracts/instance/module/policy/IPolicy.sol +63 -0
  246. package/contracts/instance/module/policy/PolicyModule.sol +91 -0
  247. package/contracts/instance/module/pool/IPoolModule.sol +41 -0
  248. package/contracts/instance/module/pool/PoolModule.sol +95 -0
  249. package/contracts/instance/module/risk/IRisk.sol +26 -0
  250. package/contracts/instance/module/risk/RiskModule.sol +62 -0
  251. package/contracts/instance/module/treasury/ITreasury.sol +84 -0
  252. package/contracts/instance/module/treasury/TokenHandler.sol +48 -0
  253. package/contracts/instance/module/treasury/TreasuryModule.sol +131 -0
  254. package/contracts/instance/service/ComponentOwnerService.sol +272 -0
  255. package/contracts/instance/service/DistributionService.sol +54 -0
  256. package/contracts/instance/service/IComponentOwnerService.sol +20 -0
  257. package/contracts/instance/service/IDistributionService.sol +12 -0
  258. package/contracts/instance/service/IPoolService.sol +37 -0
  259. package/contracts/instance/service/IProductService.sol +107 -0
  260. package/contracts/instance/service/PoolService.sol +149 -0
  261. package/contracts/instance/service/ProductService.sol +509 -0
  262. package/contracts/registry/ChainNft.sol +94 -42
  263. package/contracts/registry/IChainNft.sol +3 -2
  264. package/contracts/registry/IRegistry.sol +52 -44
  265. package/contracts/registry/IRegistryLinked.sol +8 -0
  266. package/contracts/registry/IRegistryService.sol +29 -0
  267. package/contracts/registry/ITransferInterceptor.sol +6 -0
  268. package/contracts/registry/Registry.sol +447 -124
  269. package/contracts/registry/RegistryInstaller.sol +100 -0
  270. package/contracts/registry/RegistryService.sol +383 -0
  271. package/contracts/shared/ERC165.sol +21 -0
  272. package/contracts/shared/IOwnable.sol +6 -0
  273. package/contracts/shared/IRegisterable.sol +22 -0
  274. package/contracts/shared/IVersionable.sol +96 -0
  275. package/contracts/shared/ProxyManager.sol +115 -0
  276. package/contracts/shared/Registerable.sol +117 -0
  277. package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
  278. package/contracts/shared/Versionable.sol +147 -0
  279. package/contracts/test/TestDistribution.sol +22 -0
  280. package/contracts/test/TestFee.sol +25 -0
  281. package/contracts/test/TestPool.sol +27 -0
  282. package/contracts/test/TestProduct.sol +74 -0
  283. package/contracts/test/TestRegisterable.sol +18 -0
  284. package/contracts/test/TestRoleId.sol +14 -0
  285. package/contracts/test/TestService.sol +26 -0
  286. package/contracts/{mock/Dip.sol → test/TestToken.sol} +5 -5
  287. package/contracts/test/TestVersion.sol +44 -0
  288. package/contracts/test/TestVersionable.sol +17 -0
  289. package/contracts/{mock → test}/Usdc.sol +1 -1
  290. package/contracts/types/AddressSet.sol +58 -0
  291. package/contracts/types/Fee.sol +44 -20
  292. package/contracts/types/Key32.sol +45 -0
  293. package/contracts/types/NftId.sol +22 -1
  294. package/contracts/types/NftIdSet.sol +60 -0
  295. package/contracts/types/ObjectType.sol +37 -13
  296. package/contracts/types/ReferralId.sol +48 -0
  297. package/contracts/types/RiskId.sol +43 -0
  298. package/contracts/types/RoleId.sol +38 -0
  299. package/contracts/types/StateId.sol +13 -3
  300. package/contracts/types/Timestamp.sol +22 -1
  301. package/contracts/types/UFixed.sol +12 -13
  302. package/contracts/types/Version.sol +104 -0
  303. package/package.json +8 -3
  304. package/artifacts/contracts/components/Component.sol/Component.dbg.json +0 -4
  305. package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +0 -4
  306. package/artifacts/contracts/components/Component.sol/InstanceLinked.json +0 -35
  307. package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +0 -4
  308. package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +0 -4
  309. package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +0 -74
  310. package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +0 -4
  311. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +0 -4
  312. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +0 -4
  313. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.json +0 -35
  314. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +0 -4
  315. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.json +0 -50
  316. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +0 -4
  317. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
  318. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +0 -4
  319. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +0 -202
  320. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +0 -4
  321. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +0 -4
  322. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +0 -4
  323. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +0 -217
  324. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +0 -4
  325. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +0 -141
  326. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +0 -4
  327. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
  328. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
  329. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
  330. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
  331. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
  332. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
  333. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
  334. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
  335. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +0 -4
  336. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
  337. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
  338. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +0 -4
  339. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.json +0 -75
  340. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +0 -4
  341. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +0 -4
  342. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.json +0 -75
  343. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +0 -4
  344. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +0 -196
  345. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.dbg.json +0 -4
  346. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.dbg.json +0 -4
  347. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.dbg.json +0 -4
  348. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.json +0 -45
  349. package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +0 -4
  350. package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.json +0 -490
  351. package/artifacts/contracts/mock/Dip.sol/DIP.dbg.json +0 -4
  352. package/artifacts/contracts/mock/Dip.sol/DIP.json +0 -338
  353. package/artifacts/contracts/mock/TestPool.sol/TestPool.dbg.json +0 -4
  354. package/artifacts/contracts/mock/TestPool.sol/TestPool.json +0 -294
  355. package/artifacts/contracts/mock/TestProduct.sol/TestProduct.dbg.json +0 -4
  356. package/artifacts/contracts/mock/TestProduct.sol/TestProduct.json +0 -384
  357. package/artifacts/contracts/mock/Usdc.sol/USDC.dbg.json +0 -4
  358. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +0 -4
  359. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +0 -4
  360. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.json +0 -166
  361. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +0 -4
  362. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.json +0 -49
  363. package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +0 -4
  364. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +0 -4
  365. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +0 -60
  366. package/contracts/components/Component.sol +0 -77
  367. package/contracts/components/IPool.sol +0 -15
  368. package/contracts/components/IProduct.sol +0 -16
  369. package/contracts/experiment/statemachine/README.md +0 -112
  370. package/contracts/instance/access/Access.sol +0 -165
  371. package/contracts/instance/access/IAccess.sol +0 -63
  372. package/contracts/instance/component/ComponentModule.sol +0 -274
  373. package/contracts/instance/component/IComponent.sol +0 -74
  374. package/contracts/instance/lifecycle/LifecycleModule.sol +0 -88
  375. package/contracts/instance/policy/IPolicy.sol +0 -50
  376. package/contracts/instance/policy/PolicyModule.sol +0 -114
  377. package/contracts/instance/pool/IPoolModule.sol +0 -23
  378. package/contracts/instance/pool/PoolModule.sol +0 -81
  379. package/contracts/instance/product/IProductService.sol +0 -36
  380. package/contracts/instance/product/ProductService.sol +0 -136
  381. package/contracts/instance/treasury/ITreasury.sol +0 -91
  382. package/contracts/instance/treasury/TokenHandler.sol +0 -24
  383. package/contracts/instance/treasury/TreasuryModule.sol +0 -168
  384. package/contracts/mock/TestPool.sol +0 -16
  385. package/contracts/mock/TestProduct.sol +0 -39
@@ -1,41 +1,76 @@
1
1
  {
2
2
  "_format": "hh-sol-artifact-1",
3
- "contractName": "IPoolComponent",
4
- "sourceName": "contracts/components/IPool.sol",
3
+ "contractName": "IDistributionComponent",
4
+ "sourceName": "contracts/components/IDistributionComponent.sol",
5
5
  "abi": [
6
6
  {
7
- "anonymous": false,
8
7
  "inputs": [
9
8
  {
10
- "indexed": false,
9
+ "internalType": "ReferralId",
10
+ "name": "referralId",
11
+ "type": "bytes8"
12
+ },
13
+ {
11
14
  "internalType": "uint256",
12
- "name": "idx",
15
+ "name": "netPremiumAmount",
13
16
  "type": "uint256"
14
- },
17
+ }
18
+ ],
19
+ "name": "calculateFeeAmount",
20
+ "outputs": [
15
21
  {
16
- "indexed": false,
17
- "internalType": "address",
18
- "name": "module",
19
- "type": "address"
22
+ "internalType": "uint256",
23
+ "name": "feeAmount",
24
+ "type": "uint256"
25
+ }
26
+ ],
27
+ "stateMutability": "view",
28
+ "type": "function"
29
+ },
30
+ {
31
+ "inputs": [
32
+ {
33
+ "internalType": "ReferralId",
34
+ "name": "referralId",
35
+ "type": "bytes8"
20
36
  },
21
37
  {
22
- "indexed": false,
23
- "internalType": "string",
24
- "name": "comment",
25
- "type": "string"
38
+ "internalType": "uint256",
39
+ "name": "netPremiumAmount",
40
+ "type": "uint256"
26
41
  }
27
42
  ],
28
- "name": "LogDebug",
29
- "type": "event"
43
+ "name": "calculateRenewalFeeAmount",
44
+ "outputs": [
45
+ {
46
+ "internalType": "uint256",
47
+ "name": "feeAmount",
48
+ "type": "uint256"
49
+ }
50
+ ],
51
+ "stateMutability": "view",
52
+ "type": "function"
30
53
  },
31
54
  {
32
55
  "inputs": [],
33
- "name": "getData",
56
+ "name": "getDistributionFee",
34
57
  "outputs": [
35
58
  {
36
- "internalType": "bytes",
37
- "name": "data",
38
- "type": "bytes"
59
+ "components": [
60
+ {
61
+ "internalType": "UFixed",
62
+ "name": "fractionalFee",
63
+ "type": "uint256"
64
+ },
65
+ {
66
+ "internalType": "uint256",
67
+ "name": "fixedFee",
68
+ "type": "uint256"
69
+ }
70
+ ],
71
+ "internalType": "struct Fee",
72
+ "name": "distributionFee",
73
+ "type": "tuple"
39
74
  }
40
75
  ],
41
76
  "stateMutability": "view",
@@ -43,12 +78,54 @@
43
78
  },
44
79
  {
45
80
  "inputs": [],
46
- "name": "getInitialOwner",
81
+ "name": "getInitialInfo",
47
82
  "outputs": [
48
83
  {
49
- "internalType": "address",
50
- "name": "initialOwner",
51
- "type": "address"
84
+ "components": [
85
+ {
86
+ "internalType": "NftId",
87
+ "name": "nftId",
88
+ "type": "uint96"
89
+ },
90
+ {
91
+ "internalType": "NftId",
92
+ "name": "parentNftId",
93
+ "type": "uint96"
94
+ },
95
+ {
96
+ "internalType": "ObjectType",
97
+ "name": "objectType",
98
+ "type": "uint8"
99
+ },
100
+ {
101
+ "internalType": "bool",
102
+ "name": "isInterceptor",
103
+ "type": "bool"
104
+ },
105
+ {
106
+ "internalType": "address",
107
+ "name": "objectAddress",
108
+ "type": "address"
109
+ },
110
+ {
111
+ "internalType": "address",
112
+ "name": "initialOwner",
113
+ "type": "address"
114
+ },
115
+ {
116
+ "internalType": "bytes",
117
+ "name": "data",
118
+ "type": "bytes"
119
+ }
120
+ ],
121
+ "internalType": "struct IRegistry.ObjectInfo",
122
+ "name": "",
123
+ "type": "tuple"
124
+ },
125
+ {
126
+ "internalType": "bytes",
127
+ "name": "data",
128
+ "type": "bytes"
52
129
  }
53
130
  ],
54
131
  "stateMutability": "view",
@@ -95,12 +172,12 @@
95
172
  },
96
173
  {
97
174
  "inputs": [],
98
- "name": "getParentNftId",
175
+ "name": "getRegistry",
99
176
  "outputs": [
100
177
  {
101
- "internalType": "NftId",
102
- "name": "parentNftId",
103
- "type": "uint96"
178
+ "internalType": "contract IRegistry",
179
+ "name": "registry",
180
+ "type": "address"
104
181
  }
105
182
  ],
106
183
  "stateMutability": "view",
@@ -108,24 +185,12 @@
108
185
  },
109
186
  {
110
187
  "inputs": [],
111
- "name": "getPerformanceFee",
188
+ "name": "getToken",
112
189
  "outputs": [
113
190
  {
114
- "components": [
115
- {
116
- "internalType": "UFixed",
117
- "name": "fractionalFee",
118
- "type": "uint256"
119
- },
120
- {
121
- "internalType": "uint256",
122
- "name": "fixedFee",
123
- "type": "uint256"
124
- }
125
- ],
126
- "internalType": "struct Fee",
127
- "name": "performanceFee",
128
- "type": "tuple"
191
+ "internalType": "contract IERC20Metadata",
192
+ "name": "token",
193
+ "type": "address"
129
194
  }
130
195
  ],
131
196
  "stateMutability": "view",
@@ -133,11 +198,11 @@
133
198
  },
134
199
  {
135
200
  "inputs": [],
136
- "name": "getRegistry",
201
+ "name": "getWallet",
137
202
  "outputs": [
138
203
  {
139
- "internalType": "contract IRegistry",
140
- "name": "registry",
204
+ "internalType": "address",
205
+ "name": "walletAddress",
141
206
  "type": "address"
142
207
  }
143
208
  ],
@@ -146,24 +211,12 @@
146
211
  },
147
212
  {
148
213
  "inputs": [],
149
- "name": "getStakingFee",
214
+ "name": "isVerifying",
150
215
  "outputs": [
151
216
  {
152
- "components": [
153
- {
154
- "internalType": "UFixed",
155
- "name": "fractionalFee",
156
- "type": "uint256"
157
- },
158
- {
159
- "internalType": "uint256",
160
- "name": "fixedFee",
161
- "type": "uint256"
162
- }
163
- ],
164
- "internalType": "struct Fee",
165
- "name": "stakingFee",
166
- "type": "tuple"
217
+ "internalType": "bool",
218
+ "name": "verifying",
219
+ "type": "bool"
167
220
  }
168
221
  ],
169
222
  "stateMutability": "view",
@@ -171,59 +224,100 @@
171
224
  },
172
225
  {
173
226
  "inputs": [],
174
- "name": "getToken",
175
- "outputs": [
227
+ "name": "lock",
228
+ "outputs": [],
229
+ "stateMutability": "nonpayable",
230
+ "type": "function"
231
+ },
232
+ {
233
+ "inputs": [
176
234
  {
177
- "internalType": "contract IERC20Metadata",
178
- "name": "token",
179
- "type": "address"
235
+ "internalType": "ReferralId",
236
+ "name": "referralId",
237
+ "type": "bytes8"
238
+ },
239
+ {
240
+ "internalType": "uint256",
241
+ "name": "feeAmount",
242
+ "type": "uint256"
180
243
  }
181
244
  ],
182
- "stateMutability": "view",
245
+ "name": "processRenewal",
246
+ "outputs": [],
247
+ "stateMutability": "nonpayable",
183
248
  "type": "function"
184
249
  },
185
250
  {
186
- "inputs": [],
187
- "name": "getType",
188
- "outputs": [
251
+ "inputs": [
252
+ {
253
+ "internalType": "ReferralId",
254
+ "name": "referralId",
255
+ "type": "bytes8"
256
+ },
189
257
  {
190
- "internalType": "ObjectType",
191
- "name": "objectType",
192
- "type": "uint8"
258
+ "internalType": "uint256",
259
+ "name": "feeAmount",
260
+ "type": "uint256"
193
261
  }
194
262
  ],
195
- "stateMutability": "view",
263
+ "name": "processSale",
264
+ "outputs": [],
265
+ "stateMutability": "nonpayable",
196
266
  "type": "function"
197
267
  },
198
268
  {
199
- "inputs": [],
200
- "name": "getWallet",
269
+ "inputs": [
270
+ {
271
+ "internalType": "ReferralId",
272
+ "name": "referralId",
273
+ "type": "bytes8"
274
+ }
275
+ ],
276
+ "name": "referralIsValid",
201
277
  "outputs": [
202
278
  {
203
- "internalType": "address",
204
- "name": "walletAddress",
205
- "type": "address"
279
+ "internalType": "bool",
280
+ "name": "isValid",
281
+ "type": "bool"
206
282
  }
207
283
  ],
208
284
  "stateMutability": "view",
209
285
  "type": "function"
210
286
  },
211
287
  {
212
- "inputs": [],
213
- "name": "isRegisterable",
214
- "outputs": [
288
+ "inputs": [
215
289
  {
216
- "internalType": "bool",
217
- "name": "",
218
- "type": "bool"
290
+ "components": [
291
+ {
292
+ "internalType": "UFixed",
293
+ "name": "fractionalFee",
294
+ "type": "uint256"
295
+ },
296
+ {
297
+ "internalType": "uint256",
298
+ "name": "fixedFee",
299
+ "type": "uint256"
300
+ }
301
+ ],
302
+ "internalType": "struct Fee",
303
+ "name": "distributionFee",
304
+ "type": "tuple"
219
305
  }
220
306
  ],
221
- "stateMutability": "pure",
307
+ "name": "setFees",
308
+ "outputs": [],
309
+ "stateMutability": "nonpayable",
222
310
  "type": "function"
223
311
  },
224
312
  {
225
- "inputs": [],
226
- "name": "isRegistered",
313
+ "inputs": [
314
+ {
315
+ "internalType": "bytes4",
316
+ "name": "interfaceId",
317
+ "type": "bytes4"
318
+ }
319
+ ],
320
+ "name": "supportsInterface",
227
321
  "outputs": [
228
322
  {
229
323
  "internalType": "bool",
@@ -236,14 +330,8 @@
236
330
  },
237
331
  {
238
332
  "inputs": [],
239
- "name": "register",
240
- "outputs": [
241
- {
242
- "internalType": "NftId",
243
- "name": "nftId",
244
- "type": "uint96"
245
- }
246
- ],
333
+ "name": "unlock",
334
+ "outputs": [],
247
335
  "stateMutability": "nonpayable",
248
336
  "type": "function"
249
337
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/2c78228c851a60b159426de30077d024.json"
4
+ }