@etherisc/gif-next 0.0.2-ed4dd55 → 0.0.2-efef0ea-320

Sign up to get free protection for your applications and to get access to all the features.
Files changed (384) hide show
  1. package/README.md +178 -6
  2. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +4 -0
  3. package/artifacts/contracts/components/{IPool.sol/IPoolComponent.json → BaseComponent.sol/BaseComponent.json} +55 -60
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +405 -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} +54 -59
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
  9. package/artifacts/contracts/{instance/component/ComponentModule.sol/ComponentModule.json → components/IDistributionComponent.sol/IDistributionComponent.json} +164 -151
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +4 -0
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +487 -0
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +4 -0
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +370 -0
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +417 -34
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +273 -42
  18. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +4 -0
  19. package/artifacts/contracts/experiment/errors/Require.sol/Require.json +105 -0
  20. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +4 -0
  21. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +105 -0
  22. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  23. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +2 -2
  24. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +2 -2
  26. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  28. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  29. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  30. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  31. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  32. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +4 -0
  33. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +59 -0
  34. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +4 -0
  35. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +124 -0
  36. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +4 -0
  37. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +74 -0
  38. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +4 -0
  39. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +124 -0
  40. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +4 -0
  41. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +207 -0
  42. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  43. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +2 -2
  44. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  45. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +2 -2
  46. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  47. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +1427 -271
  48. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +4 -0
  49. package/artifacts/contracts/instance/{component/IComponent.sol → IInstanceLinked.sol}/IInstanceLinked.json +1 -1
  50. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  51. package/artifacts/contracts/instance/Instance.sol/Instance.json +1827 -364
  52. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
  53. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +387 -0
  54. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
  55. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +113 -0
  56. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
  57. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +560 -0
  58. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
  59. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.json +115 -0
  60. package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +4 -0
  61. package/artifacts/contracts/instance/base/IService.sol/IService.json +341 -0
  62. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +4 -0
  63. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +463 -0
  64. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
  65. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +710 -0
  66. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
  67. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +169 -0
  68. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +4 -0
  69. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.json +10 -0
  70. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +4 -0
  71. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.json +387 -0
  72. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +4 -0
  73. package/artifacts/contracts/instance/{access → module/access}/Access.sol/AccessModule.json +85 -152
  74. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +4 -0
  75. package/artifacts/contracts/instance/{access → module/access}/IAccess.sol/IAccess.json +1 -1
  76. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +4 -0
  77. package/artifacts/contracts/instance/{access → module/access}/IAccess.sol/IAccessModule.json +96 -99
  78. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +4 -0
  79. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +297 -0
  80. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +4 -0
  81. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.json +10 -0
  82. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +4 -0
  83. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +297 -0
  84. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +4 -0
  85. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +117 -0
  86. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +4 -0
  87. package/artifacts/contracts/instance/{component → module/component}/IComponent.sol/IComponent.json +1 -1
  88. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +4 -0
  89. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +117 -0
  90. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +4 -0
  91. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +10 -0
  92. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +4 -0
  93. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.json +10 -0
  94. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +4 -0
  95. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.json +10 -0
  96. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +4 -0
  97. package/artifacts/contracts/instance/{policy → module/policy}/IPolicy.sol/IPolicy.json +1 -1
  98. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +4 -0
  99. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +284 -0
  100. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +4 -0
  101. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +284 -0
  102. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +4 -0
  103. package/artifacts/contracts/instance/{pool → module/pool}/IPoolModule.sol/IPool.json +1 -1
  104. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +4 -0
  105. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +144 -0
  106. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +4 -0
  107. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +144 -0
  108. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +4 -0
  109. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.json +10 -0
  110. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +4 -0
  111. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +113 -0
  112. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +4 -0
  113. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +131 -0
  114. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +4 -0
  115. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.json +10 -0
  116. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +4 -0
  117. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +511 -0
  118. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +4 -0
  119. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +76 -0
  120. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +4 -0
  121. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +511 -0
  122. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +4 -0
  123. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +618 -0
  124. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  125. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +507 -0
  126. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +4 -0
  127. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +405 -0
  128. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
  129. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +366 -0
  130. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +4 -0
  131. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +481 -0
  132. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +4 -0
  133. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +671 -0
  134. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +4 -0
  135. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +630 -0
  136. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +4 -0
  137. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +945 -0
  138. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  139. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +65 -2
  140. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
  141. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  142. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +115 -89
  143. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
  144. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +24 -0
  145. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  146. package/artifacts/contracts/registry/Registry.sol/Registry.json +244 -77
  147. package/artifacts/contracts/registry/RegistryUpgradeable.sol/RegistryUpgradeable.dbg.json +4 -0
  148. package/artifacts/contracts/registry/RegistryUpgradeable.sol/RegistryUpgradeable.json +724 -0
  149. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +4 -0
  150. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +35 -0
  151. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +4 -0
  152. package/artifacts/contracts/{registry/IRegistry.sol → shared/IOwnable.sol}/IOwnable.json +1 -1
  153. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +4 -0
  154. package/artifacts/contracts/{registry/IRegistry.sol → shared/IRegisterable.sol}/IRegisterable.json +22 -67
  155. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +4 -0
  156. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +205 -0
  157. package/artifacts/contracts/shared/Proxy.sol/ProxyDeployer.dbg.json +4 -0
  158. package/artifacts/contracts/shared/Proxy.sol/ProxyDeployer.json +248 -0
  159. package/artifacts/contracts/shared/Proxy.sol/ProxyWithProxyAdminGetter.dbg.json +4 -0
  160. package/artifacts/contracts/shared/Proxy.sol/ProxyWithProxyAdminGetter.json +129 -0
  161. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +4 -0
  162. package/artifacts/contracts/{registry/Registry.sol → shared/Registerable.sol}/Registerable.json +23 -68
  163. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +4 -0
  164. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +251 -0
  165. package/artifacts/contracts/shared/VersionableUpgradeable.sol/VersionableUpgradeable.dbg.json +4 -0
  166. package/artifacts/contracts/shared/VersionableUpgradeable.sol/VersionableUpgradeable.json +228 -0
  167. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
  168. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +405 -0
  169. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +4 -0
  170. package/artifacts/contracts/test/TestFee.sol/TestFee.json +119 -0
  171. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +4 -0
  172. package/artifacts/contracts/test/TestPool.sol/TestPool.json +578 -0
  173. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +4 -0
  174. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +575 -0
  175. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +4 -0
  176. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +137 -0
  177. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +4 -0
  178. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +116 -0
  179. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +4 -0
  180. package/artifacts/contracts/test/TestService.sol/TestService.json +466 -0
  181. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +4 -0
  182. package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +338 -0
  183. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +4 -0
  184. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +218 -0
  185. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +4 -0
  186. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +293 -0
  187. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
  188. package/artifacts/contracts/test/Usdc.sol/USDC.json +338 -0
  189. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +4 -0
  190. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.json +10 -0
  191. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +4 -0
  192. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +174 -0
  193. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  194. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +2 -2
  195. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +4 -0
  196. package/artifacts/contracts/types/Fee.sol/FeeLib.json +257 -0
  197. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
  198. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +111 -0
  199. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  200. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +148 -5
  201. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +4 -0
  202. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +10 -0
  203. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +4 -0
  204. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +92 -0
  205. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
  206. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
  207. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  208. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  209. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
  210. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +30 -0
  211. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +4 -0
  212. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +92 -0
  213. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +4 -0
  214. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +236 -0
  215. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +4 -0
  216. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +479 -0
  217. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +4 -0
  218. package/artifacts/contracts/types/Version.sol/VersionLib.json +177 -0
  219. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +4 -0
  220. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +30 -0
  221. package/contracts/components/BaseComponent.sol +94 -0
  222. package/contracts/components/Distribution.sol +132 -0
  223. package/contracts/components/IBaseComponent.sol +19 -0
  224. package/contracts/components/IDistributionComponent.sol +47 -0
  225. package/contracts/components/IPoolComponent.sol +71 -0
  226. package/contracts/components/IProductComponent.sol +38 -0
  227. package/contracts/components/Pool.sol +222 -16
  228. package/contracts/components/Product.sol +195 -33
  229. package/contracts/experiment/errors/Require.sol +38 -0
  230. package/contracts/experiment/errors/Revert.sol +44 -0
  231. package/contracts/experiment/inheritance/A.sol +8 -11
  232. package/contracts/experiment/inheritance/B.sol +10 -5
  233. package/contracts/experiment/inheritance/C.sol +11 -5
  234. package/contracts/experiment/inheritance/IA.sol +2 -7
  235. package/contracts/experiment/inheritance/IB.sol +3 -2
  236. package/contracts/experiment/inheritance/IC.sol +4 -3
  237. package/contracts/experiment/statemachine/Dummy.sol +27 -0
  238. package/contracts/experiment/statemachine/ISM.sol +25 -0
  239. package/contracts/experiment/statemachine/README.md +112 -0
  240. package/contracts/experiment/statemachine/SM.sol +57 -0
  241. package/contracts/experiment/statemachine/SimpleStateMachine.sol +31 -0
  242. package/contracts/experiment/types/TypeA.sol +14 -9
  243. package/contracts/experiment/types/TypeB.sol +14 -9
  244. package/contracts/instance/IInstance.sol +41 -8
  245. package/contracts/instance/IInstanceLinked.sol +8 -0
  246. package/contracts/instance/Instance.sol +54 -43
  247. package/contracts/instance/base/ComponentServiceBase.sol +42 -0
  248. package/contracts/instance/base/IInstanceBase.sol +22 -0
  249. package/contracts/instance/base/IKeyValueStore.sol +50 -0
  250. package/contracts/instance/base/ILifecycle.sol +30 -0
  251. package/contracts/instance/base/IService.sol +15 -0
  252. package/contracts/instance/base/InstanceBase.sol +91 -0
  253. package/contracts/instance/base/KeyValueStore.sol +161 -0
  254. package/contracts/instance/base/Lifecycle.sol +100 -0
  255. package/contracts/instance/base/ModuleBase.sol +57 -0
  256. package/contracts/instance/base/ServiceBase.sol +37 -0
  257. package/contracts/instance/module/access/Access.sol +149 -0
  258. package/contracts/instance/module/access/IAccess.sol +53 -0
  259. package/contracts/instance/module/bundle/BundleModule.sol +134 -0
  260. package/contracts/instance/module/bundle/IBundle.sol +53 -0
  261. package/contracts/instance/module/component/ComponentModule.sol +70 -0
  262. package/contracts/instance/module/component/IComponent.sol +28 -0
  263. package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
  264. package/contracts/instance/module/distribution/IDistribution.sol +10 -0
  265. package/contracts/instance/module/policy/IPolicy.sol +63 -0
  266. package/contracts/instance/module/policy/PolicyModule.sol +91 -0
  267. package/contracts/instance/module/pool/IPoolModule.sol +40 -0
  268. package/contracts/instance/module/pool/PoolModule.sol +90 -0
  269. package/contracts/instance/module/risk/IRisk.sol +26 -0
  270. package/contracts/instance/module/risk/RiskModule.sol +62 -0
  271. package/contracts/instance/module/treasury/ITreasury.sol +82 -0
  272. package/contracts/instance/module/treasury/TokenHandler.sol +48 -0
  273. package/contracts/instance/module/treasury/TreasuryModule.sol +138 -0
  274. package/contracts/instance/service/ComponentOwnerService.sol +157 -0
  275. package/contracts/instance/service/DistributionService.sol +59 -0
  276. package/contracts/instance/service/IComponentOwnerService.sol +22 -0
  277. package/contracts/instance/service/IDistributionService.sol +12 -0
  278. package/contracts/instance/service/IPoolService.sol +37 -0
  279. package/contracts/instance/service/IProductService.sol +107 -0
  280. package/contracts/instance/service/PoolService.sol +149 -0
  281. package/contracts/instance/service/ProductService.sol +509 -0
  282. package/contracts/registry/ChainNft.sol +80 -94
  283. package/contracts/registry/IChainNft.sol +10 -7
  284. package/contracts/registry/IRegistry.sol +40 -51
  285. package/contracts/registry/IRegistryLinked.sol +8 -0
  286. package/contracts/registry/Registry.sol +312 -107
  287. package/contracts/registry/RegistryUpgradeable.sol +488 -0
  288. package/contracts/shared/ERC165.sol +21 -0
  289. package/contracts/shared/IOwnable.sol +6 -0
  290. package/contracts/shared/IRegisterable.sol +24 -0
  291. package/contracts/shared/IVersionable.sol +65 -0
  292. package/contracts/shared/Proxy.sol +94 -0
  293. package/contracts/shared/Registerable.sol +86 -0
  294. package/contracts/shared/Versionable.sol +99 -0
  295. package/contracts/shared/VersionableUpgradeable.sol +136 -0
  296. package/contracts/test/TestDistribution.sol +21 -0
  297. package/contracts/test/TestFee.sol +25 -0
  298. package/contracts/test/TestPool.sol +25 -0
  299. package/contracts/test/TestProduct.sol +72 -0
  300. package/contracts/test/TestRegisterable.sol +19 -0
  301. package/contracts/test/TestRoleId.sol +14 -0
  302. package/contracts/test/TestService.sol +32 -0
  303. package/contracts/test/TestToken.sol +26 -0
  304. package/contracts/test/TestVersion.sol +44 -0
  305. package/contracts/test/TestVersionable.sol +17 -0
  306. package/contracts/test/Usdc.sol +26 -0
  307. package/contracts/types/AddressSet.sol +58 -0
  308. package/contracts/types/Blocknumber.sol +118 -0
  309. package/contracts/types/ChainId.sol +24 -10
  310. package/contracts/types/Fee.sol +56 -0
  311. package/contracts/types/Key32.sol +45 -0
  312. package/contracts/types/NftId.sol +55 -8
  313. package/contracts/types/NftIdSet.sol +60 -0
  314. package/contracts/types/ObjectType.sol +131 -0
  315. package/contracts/types/ReferralId.sol +48 -0
  316. package/contracts/types/RiskId.sol +43 -0
  317. package/contracts/types/RoleId.sol +38 -0
  318. package/contracts/types/StateId.sol +101 -0
  319. package/contracts/types/Timestamp.sol +123 -0
  320. package/contracts/types/UFixed.sol +209 -0
  321. package/contracts/types/Version.sol +103 -0
  322. package/package.json +19 -5
  323. package/artifacts/contracts/components/Component.sol/Component.dbg.json +0 -4
  324. package/artifacts/contracts/components/Component.sol/Component.json +0 -179
  325. package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +0 -4
  326. package/artifacts/contracts/components/Component.sol/InstanceLinked.json +0 -35
  327. package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +0 -4
  328. package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +0 -4
  329. package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +0 -192
  330. package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +0 -4
  331. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +0 -4
  332. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +0 -4
  333. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.json +0 -35
  334. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +0 -4
  335. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.json +0 -50
  336. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +0 -4
  337. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
  338. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +0 -4
  339. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +0 -105
  340. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +0 -4
  341. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +0 -4
  342. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +0 -4
  343. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +0 -245
  344. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +0 -4
  345. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +0 -94
  346. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +0 -4
  347. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
  348. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
  349. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.json +0 -231
  350. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
  351. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.json +0 -231
  352. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +0 -4
  353. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
  354. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.json +0 -149
  355. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
  356. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.json +0 -162
  357. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +0 -4
  358. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.json +0 -75
  359. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +0 -4
  360. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.json +0 -114
  361. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +0 -4
  362. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.json +0 -75
  363. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +0 -4
  364. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +0 -125
  365. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +0 -4
  366. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +0 -4
  367. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +0 -4
  368. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.json +0 -49
  369. package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +0 -4
  370. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +0 -4
  371. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +0 -60
  372. package/contracts/components/Component.sol +0 -62
  373. package/contracts/components/IPool.sol +0 -9
  374. package/contracts/components/IProduct.sol +0 -11
  375. package/contracts/instance/access/Access.sol +0 -218
  376. package/contracts/instance/access/IAccess.sol +0 -83
  377. package/contracts/instance/component/ComponentModule.sol +0 -259
  378. package/contracts/instance/component/IComponent.sol +0 -94
  379. package/contracts/instance/policy/IPolicy.sol +0 -66
  380. package/contracts/instance/policy/PolicyModule.sol +0 -106
  381. package/contracts/instance/pool/IPoolModule.sol +0 -40
  382. package/contracts/instance/pool/PoolModule.sol +0 -83
  383. package/contracts/instance/product/IProductService.sol +0 -45
  384. package/contracts/instance/product/ProductService.sol +0 -105
@@ -8,129 +8,247 @@
8
8
  "inputs": [
9
9
  {
10
10
  "indexed": false,
11
- "internalType": "uint256",
12
- "name": "idx",
13
- "type": "uint256"
14
- },
15
- {
16
- "indexed": false,
17
- "internalType": "address",
18
- "name": "module",
19
- "type": "address"
11
+ "internalType": "RoleId",
12
+ "name": "role",
13
+ "type": "bytes8"
20
14
  },
21
15
  {
22
16
  "indexed": false,
23
17
  "internalType": "string",
24
- "name": "comment",
18
+ "name": "roleName",
25
19
  "type": "string"
26
20
  }
27
21
  ],
28
- "name": "LogDebug",
22
+ "name": "LogAccessRoleCreated",
29
23
  "type": "event"
30
24
  },
31
25
  {
32
- "inputs": [],
33
- "name": "ORACLE_OWNER_ROLE",
34
- "outputs": [
26
+ "anonymous": false,
27
+ "inputs": [
35
28
  {
36
- "internalType": "bytes32",
29
+ "indexed": false,
30
+ "internalType": "RoleId",
37
31
  "name": "role",
38
- "type": "bytes32"
32
+ "type": "bytes8"
33
+ },
34
+ {
35
+ "indexed": false,
36
+ "internalType": "address",
37
+ "name": "member",
38
+ "type": "address"
39
+ },
40
+ {
41
+ "indexed": false,
42
+ "internalType": "bool",
43
+ "name": "isMember",
44
+ "type": "bool"
39
45
  }
40
46
  ],
41
- "stateMutability": "view",
42
- "type": "function"
47
+ "name": "LogAccessRoleGranted",
48
+ "type": "event"
43
49
  },
44
50
  {
45
- "inputs": [],
46
- "name": "POOL_OWNER_ROLE",
47
- "outputs": [
51
+ "anonymous": false,
52
+ "inputs": [
48
53
  {
49
- "internalType": "bytes32",
54
+ "indexed": false,
55
+ "internalType": "RoleId",
50
56
  "name": "role",
51
- "type": "bytes32"
57
+ "type": "bytes8"
58
+ },
59
+ {
60
+ "indexed": false,
61
+ "internalType": "bool",
62
+ "name": "active",
63
+ "type": "bool"
52
64
  }
53
65
  ],
54
- "stateMutability": "view",
55
- "type": "function"
66
+ "name": "LogAccessRoleStateSet",
67
+ "type": "event"
56
68
  },
57
69
  {
58
- "inputs": [],
59
- "name": "PRODUCT_OWNER_ROLE",
60
- "outputs": [
70
+ "anonymous": false,
71
+ "inputs": [
61
72
  {
62
- "internalType": "bytes32",
63
- "name": "role",
64
- "type": "bytes32"
73
+ "indexed": false,
74
+ "internalType": "Version",
75
+ "name": "version",
76
+ "type": "uint24"
77
+ },
78
+ {
79
+ "indexed": false,
80
+ "internalType": "address",
81
+ "name": "implementation",
82
+ "type": "address"
83
+ },
84
+ {
85
+ "indexed": false,
86
+ "internalType": "address",
87
+ "name": "activatedBy",
88
+ "type": "address"
65
89
  }
66
90
  ],
67
- "stateMutability": "view",
68
- "type": "function"
91
+ "name": "LogVersionableActivated",
92
+ "type": "event"
69
93
  },
70
94
  {
71
95
  "inputs": [
96
+ {
97
+ "internalType": "NftId",
98
+ "name": "bundleNftId",
99
+ "type": "uint96"
100
+ },
101
+ {
102
+ "internalType": "NftId",
103
+ "name": "poolNftId",
104
+ "type": "uint96"
105
+ },
72
106
  {
73
107
  "internalType": "uint256",
74
- "name": "nftId",
108
+ "name": "amount",
75
109
  "type": "uint256"
76
110
  }
77
111
  ],
78
- "name": "activate",
112
+ "name": "addBundleToPool",
79
113
  "outputs": [],
80
114
  "stateMutability": "nonpayable",
81
115
  "type": "function"
82
116
  },
83
117
  {
84
- "inputs": [],
85
- "name": "components",
118
+ "inputs": [
119
+ {
120
+ "internalType": "uint256",
121
+ "name": "amount",
122
+ "type": "uint256"
123
+ },
124
+ {
125
+ "components": [
126
+ {
127
+ "internalType": "UFixed",
128
+ "name": "fractionalFee",
129
+ "type": "uint256"
130
+ },
131
+ {
132
+ "internalType": "uint256",
133
+ "name": "fixedFee",
134
+ "type": "uint256"
135
+ }
136
+ ],
137
+ "internalType": "struct Fee",
138
+ "name": "fee",
139
+ "type": "tuple"
140
+ }
141
+ ],
142
+ "name": "calculateFeeAmount",
86
143
  "outputs": [
87
144
  {
88
145
  "internalType": "uint256",
89
- "name": "numberOfCompnents",
146
+ "name": "feeAmount",
147
+ "type": "uint256"
148
+ },
149
+ {
150
+ "internalType": "uint256",
151
+ "name": "netAmount",
90
152
  "type": "uint256"
91
153
  }
92
154
  ],
93
- "stateMutability": "view",
155
+ "stateMutability": "pure",
156
+ "type": "function"
157
+ },
158
+ {
159
+ "inputs": [
160
+ {
161
+ "internalType": "NftId",
162
+ "name": "bundleNftId",
163
+ "type": "uint96"
164
+ },
165
+ {
166
+ "internalType": "NftId",
167
+ "name": "policyNftId",
168
+ "type": "uint96"
169
+ },
170
+ {
171
+ "internalType": "uint256",
172
+ "name": "amount",
173
+ "type": "uint256"
174
+ }
175
+ ],
176
+ "name": "collateralizePolicy",
177
+ "outputs": [],
178
+ "stateMutability": "nonpayable",
94
179
  "type": "function"
95
180
  },
96
181
  {
97
182
  "inputs": [
183
+ {
184
+ "internalType": "NftId",
185
+ "name": "bundleNftId",
186
+ "type": "uint96"
187
+ },
188
+ {
189
+ "internalType": "NftId",
190
+ "name": "poolNftId",
191
+ "type": "uint96"
192
+ },
98
193
  {
99
194
  "components": [
100
195
  {
101
- "internalType": "uint256",
102
- "name": "nftId",
103
- "type": "uint256"
104
- },
105
- {
106
- "internalType": "uint256",
107
- "name": "parentNftId",
196
+ "internalType": "UFixed",
197
+ "name": "fractionalFee",
108
198
  "type": "uint256"
109
199
  },
110
200
  {
111
201
  "internalType": "uint256",
112
- "name": "objectType",
202
+ "name": "fixedFee",
113
203
  "type": "uint256"
114
- },
115
- {
116
- "internalType": "address",
117
- "name": "objectAddress",
118
- "type": "address"
119
- },
120
- {
121
- "internalType": "address",
122
- "name": "initialOwner",
123
- "type": "address"
124
204
  }
125
205
  ],
126
- "internalType": "struct IRegistry.RegistryInfo",
127
- "name": "productInfo",
206
+ "internalType": "struct Fee",
207
+ "name": "fee",
128
208
  "type": "tuple"
129
209
  },
130
210
  {
131
- "internalType": "address",
132
- "name": "applicationOwner",
133
- "type": "address"
211
+ "internalType": "uint256",
212
+ "name": "amount",
213
+ "type": "uint256"
214
+ },
215
+ {
216
+ "internalType": "uint256",
217
+ "name": "lifetime",
218
+ "type": "uint256"
219
+ },
220
+ {
221
+ "internalType": "bytes",
222
+ "name": "filter",
223
+ "type": "bytes"
224
+ }
225
+ ],
226
+ "name": "createBundleInfo",
227
+ "outputs": [],
228
+ "stateMutability": "nonpayable",
229
+ "type": "function"
230
+ },
231
+ {
232
+ "inputs": [
233
+ {
234
+ "internalType": "NftId",
235
+ "name": "policyNftId",
236
+ "type": "uint96"
237
+ },
238
+ {
239
+ "internalType": "NftId",
240
+ "name": "productNftId",
241
+ "type": "uint96"
242
+ },
243
+ {
244
+ "internalType": "ReferralId",
245
+ "name": "referralId",
246
+ "type": "bytes8"
247
+ },
248
+ {
249
+ "internalType": "RiskId",
250
+ "name": "riskId",
251
+ "type": "bytes8"
134
252
  },
135
253
  {
136
254
  "internalType": "uint256",
@@ -148,41 +266,35 @@
148
266
  "type": "uint256"
149
267
  },
150
268
  {
151
- "internalType": "uint256",
269
+ "internalType": "NftId",
152
270
  "name": "bundleNftId",
153
- "type": "uint256"
154
- }
155
- ],
156
- "name": "createApplication",
157
- "outputs": [
158
- {
159
- "internalType": "uint256",
160
- "name": "nftId",
161
- "type": "uint256"
271
+ "type": "uint96"
162
272
  }
163
273
  ],
274
+ "name": "createPolicyInfo",
275
+ "outputs": [],
164
276
  "stateMutability": "nonpayable",
165
277
  "type": "function"
166
278
  },
167
279
  {
168
280
  "inputs": [
169
281
  {
170
- "internalType": "uint256",
171
- "name": "nftId",
172
- "type": "uint256"
282
+ "internalType": "RiskId",
283
+ "name": "riskId",
284
+ "type": "bytes8"
173
285
  },
174
286
  {
175
- "internalType": "address",
176
- "name": "wallet",
177
- "type": "address"
287
+ "internalType": "NftId",
288
+ "name": "productNftId",
289
+ "type": "uint96"
178
290
  },
179
291
  {
180
- "internalType": "address",
181
- "name": "token",
182
- "type": "address"
292
+ "internalType": "bytes",
293
+ "name": "data",
294
+ "type": "bytes"
183
295
  }
184
296
  ],
185
- "name": "createPoolInfo",
297
+ "name": "createRisk",
186
298
  "outputs": [],
187
299
  "stateMutability": "nonpayable",
188
300
  "type": "function"
@@ -198,9 +310,9 @@
198
310
  "name": "createRole",
199
311
  "outputs": [
200
312
  {
201
- "internalType": "bytes32",
313
+ "internalType": "RoleId",
202
314
  "name": "role",
203
- "type": "bytes32"
315
+ "type": "bytes8"
204
316
  }
205
317
  ],
206
318
  "stateMutability": "nonpayable",
@@ -209,61 +321,126 @@
209
321
  {
210
322
  "inputs": [
211
323
  {
212
- "internalType": "bytes32",
213
- "name": "role",
214
- "type": "bytes32"
324
+ "internalType": "NftId",
325
+ "name": "poolNftId",
326
+ "type": "uint96"
215
327
  }
216
328
  ],
217
- "name": "disableRole",
218
- "outputs": [],
219
- "stateMutability": "nonpayable",
329
+ "name": "getBundleCount",
330
+ "outputs": [
331
+ {
332
+ "internalType": "uint256",
333
+ "name": "bundleCount",
334
+ "type": "uint256"
335
+ }
336
+ ],
337
+ "stateMutability": "view",
220
338
  "type": "function"
221
339
  },
222
340
  {
223
341
  "inputs": [
224
342
  {
225
- "internalType": "bytes32",
226
- "name": "role",
227
- "type": "bytes32"
343
+ "internalType": "NftId",
344
+ "name": "nftId",
345
+ "type": "uint96"
228
346
  }
229
347
  ],
230
- "name": "enableRole",
231
- "outputs": [],
232
- "stateMutability": "nonpayable",
348
+ "name": "getBundleInfo",
349
+ "outputs": [
350
+ {
351
+ "components": [
352
+ {
353
+ "internalType": "NftId",
354
+ "name": "poolNftId",
355
+ "type": "uint96"
356
+ },
357
+ {
358
+ "components": [
359
+ {
360
+ "internalType": "UFixed",
361
+ "name": "fractionalFee",
362
+ "type": "uint256"
363
+ },
364
+ {
365
+ "internalType": "uint256",
366
+ "name": "fixedFee",
367
+ "type": "uint256"
368
+ }
369
+ ],
370
+ "internalType": "struct Fee",
371
+ "name": "fee",
372
+ "type": "tuple"
373
+ },
374
+ {
375
+ "internalType": "bytes",
376
+ "name": "filter",
377
+ "type": "bytes"
378
+ },
379
+ {
380
+ "internalType": "uint256",
381
+ "name": "capitalAmount",
382
+ "type": "uint256"
383
+ },
384
+ {
385
+ "internalType": "uint256",
386
+ "name": "lockedAmount",
387
+ "type": "uint256"
388
+ },
389
+ {
390
+ "internalType": "uint256",
391
+ "name": "balanceAmount",
392
+ "type": "uint256"
393
+ },
394
+ {
395
+ "internalType": "Timestamp",
396
+ "name": "expiredAt",
397
+ "type": "uint40"
398
+ },
399
+ {
400
+ "internalType": "Timestamp",
401
+ "name": "closedAt",
402
+ "type": "uint40"
403
+ }
404
+ ],
405
+ "internalType": "struct IBundle.BundleInfo",
406
+ "name": "bundleInfo",
407
+ "type": "tuple"
408
+ }
409
+ ],
410
+ "stateMutability": "view",
233
411
  "type": "function"
234
412
  },
235
413
  {
236
414
  "inputs": [
415
+ {
416
+ "internalType": "NftId",
417
+ "name": "poolNftId",
418
+ "type": "uint96"
419
+ },
237
420
  {
238
421
  "internalType": "uint256",
239
- "name": "nftId",
422
+ "name": "index",
240
423
  "type": "uint256"
241
424
  }
242
425
  ],
243
- "name": "getBundleNftForPolicy",
426
+ "name": "getBundleNftId",
244
427
  "outputs": [
245
428
  {
246
- "internalType": "uint256",
247
- "name": "bundleNft",
248
- "type": "uint256"
429
+ "internalType": "NftId",
430
+ "name": "bundleNftId",
431
+ "type": "uint96"
249
432
  }
250
433
  ],
251
434
  "stateMutability": "view",
252
435
  "type": "function"
253
436
  },
254
437
  {
255
- "inputs": [
256
- {
257
- "internalType": "address",
258
- "name": "componentAddress",
259
- "type": "address"
260
- }
261
- ],
262
- "name": "getComponentId",
438
+ "inputs": [],
439
+ "name": "getComponentCount",
263
440
  "outputs": [
264
441
  {
265
442
  "internalType": "uint256",
266
- "name": "id",
443
+ "name": "numberOfCompnents",
267
444
  "type": "uint256"
268
445
  }
269
446
  ],
@@ -281,40 +458,41 @@
281
458
  "name": "getComponentId",
282
459
  "outputs": [
283
460
  {
284
- "internalType": "uint256",
285
- "name": "id",
286
- "type": "uint256"
461
+ "internalType": "NftId",
462
+ "name": "nftId",
463
+ "type": "uint96"
287
464
  }
288
465
  ],
289
466
  "stateMutability": "view",
290
467
  "type": "function"
291
468
  },
292
469
  {
293
- "inputs": [
470
+ "inputs": [],
471
+ "name": "getComponentOwnerService",
472
+ "outputs": [
294
473
  {
295
- "internalType": "uint256",
296
- "name": "id",
297
- "type": "uint256"
474
+ "internalType": "contract IComponentOwnerService",
475
+ "name": "",
476
+ "type": "address"
477
+ }
478
+ ],
479
+ "stateMutability": "view",
480
+ "type": "function"
481
+ },
482
+ {
483
+ "inputs": [
484
+ {
485
+ "internalType": "NftId",
486
+ "name": "nftId",
487
+ "type": "uint96"
298
488
  }
299
489
  ],
300
- "name": "getComponentInfo",
490
+ "name": "getComponentToken",
301
491
  "outputs": [
302
492
  {
303
- "components": [
304
- {
305
- "internalType": "uint256",
306
- "name": "nftId",
307
- "type": "uint256"
308
- },
309
- {
310
- "internalType": "enum IComponent.CState",
311
- "name": "state",
312
- "type": "uint8"
313
- }
314
- ],
315
- "internalType": "struct IComponent.ComponentInfo",
316
- "name": "info",
317
- "type": "tuple"
493
+ "internalType": "contract IERC20Metadata",
494
+ "name": "token",
495
+ "type": "address"
318
496
  }
319
497
  ],
320
498
  "stateMutability": "view",
@@ -323,16 +501,16 @@
323
501
  {
324
502
  "inputs": [
325
503
  {
326
- "internalType": "uint256",
327
- "name": "id",
328
- "type": "uint256"
504
+ "internalType": "NftId",
505
+ "name": "nftId",
506
+ "type": "uint96"
329
507
  }
330
508
  ],
331
- "name": "getComponentOwner",
509
+ "name": "getComponentWallet",
332
510
  "outputs": [
333
511
  {
334
512
  "internalType": "address",
335
- "name": "owner",
513
+ "name": "wallet",
336
514
  "type": "address"
337
515
  }
338
516
  ],
@@ -341,10 +519,23 @@
341
519
  },
342
520
  {
343
521
  "inputs": [],
344
- "name": "getComponentOwnerService",
522
+ "name": "getData",
345
523
  "outputs": [
346
524
  {
347
- "internalType": "contract IComponentOwnerService",
525
+ "internalType": "bytes",
526
+ "name": "data",
527
+ "type": "bytes"
528
+ }
529
+ ],
530
+ "stateMutability": "view",
531
+ "type": "function"
532
+ },
533
+ {
534
+ "inputs": [],
535
+ "name": "getDistributionService",
536
+ "outputs": [
537
+ {
538
+ "internalType": "contract IDistributionService",
348
539
  "name": "",
349
540
  "type": "address"
350
541
  }
@@ -352,14 +543,50 @@
352
543
  "stateMutability": "view",
353
544
  "type": "function"
354
545
  },
546
+ {
547
+ "inputs": [
548
+ {
549
+ "internalType": "UFixed",
550
+ "name": "fractionalFee",
551
+ "type": "uint256"
552
+ },
553
+ {
554
+ "internalType": "uint256",
555
+ "name": "fixedFee",
556
+ "type": "uint256"
557
+ }
558
+ ],
559
+ "name": "getFee",
560
+ "outputs": [
561
+ {
562
+ "components": [
563
+ {
564
+ "internalType": "UFixed",
565
+ "name": "fractionalFee",
566
+ "type": "uint256"
567
+ },
568
+ {
569
+ "internalType": "uint256",
570
+ "name": "fixedFee",
571
+ "type": "uint256"
572
+ }
573
+ ],
574
+ "internalType": "struct Fee",
575
+ "name": "fee",
576
+ "type": "tuple"
577
+ }
578
+ ],
579
+ "stateMutability": "pure",
580
+ "type": "function"
581
+ },
355
582
  {
356
583
  "inputs": [],
357
- "name": "getData",
584
+ "name": "getInitializedVersion",
358
585
  "outputs": [
359
586
  {
360
- "internalType": "bytes",
361
- "name": "data",
362
- "type": "bytes"
587
+ "internalType": "uint64",
588
+ "name": "",
589
+ "type": "uint64"
363
590
  }
364
591
  ],
365
592
  "stateMutability": "view",
@@ -367,11 +594,11 @@
367
594
  },
368
595
  {
369
596
  "inputs": [],
370
- "name": "getInitialOwner",
597
+ "name": "getKeyValueStore",
371
598
  "outputs": [
372
599
  {
373
- "internalType": "address",
374
- "name": "initialOwner",
600
+ "internalType": "contract IKeyValueStore",
601
+ "name": "keyValueStore",
375
602
  "type": "address"
376
603
  }
377
604
  ],
@@ -383,9 +610,9 @@
383
610
  "name": "getNftId",
384
611
  "outputs": [
385
612
  {
386
- "internalType": "uint256",
613
+ "internalType": "NftId",
387
614
  "name": "nftId",
388
- "type": "uint256"
615
+ "type": "uint96"
389
616
  }
390
617
  ],
391
618
  "stateMutability": "view",
@@ -409,9 +636,9 @@
409
636
  "name": "getParentNftId",
410
637
  "outputs": [
411
638
  {
412
- "internalType": "uint256",
413
- "name": "parentNftId",
414
- "type": "uint256"
639
+ "internalType": "NftId",
640
+ "name": "nftId",
641
+ "type": "uint96"
415
642
  }
416
643
  ],
417
644
  "stateMutability": "view",
@@ -420,9 +647,9 @@
420
647
  {
421
648
  "inputs": [
422
649
  {
423
- "internalType": "uint256",
650
+ "internalType": "NftId",
424
651
  "name": "nftId",
425
- "type": "uint256"
652
+ "type": "uint96"
426
653
  }
427
654
  ],
428
655
  "name": "getPolicyInfo",
@@ -430,14 +657,29 @@
430
657
  {
431
658
  "components": [
432
659
  {
433
- "internalType": "uint256",
434
- "name": "nftId",
435
- "type": "uint256"
660
+ "internalType": "NftId",
661
+ "name": "productNftId",
662
+ "type": "uint96"
663
+ },
664
+ {
665
+ "internalType": "NftId",
666
+ "name": "bundleNftId",
667
+ "type": "uint96"
668
+ },
669
+ {
670
+ "internalType": "ReferralId",
671
+ "name": "referralId",
672
+ "type": "bytes8"
673
+ },
674
+ {
675
+ "internalType": "address",
676
+ "name": "beneficiary",
677
+ "type": "address"
436
678
  },
437
679
  {
438
- "internalType": "enum IPolicy.PolicyState",
439
- "name": "state",
440
- "type": "uint8"
680
+ "internalType": "RiskId",
681
+ "name": "riskId",
682
+ "type": "bytes8"
441
683
  },
442
684
  {
443
685
  "internalType": "uint256",
@@ -451,28 +693,38 @@
451
693
  },
452
694
  {
453
695
  "internalType": "uint256",
454
- "name": "lifetime",
696
+ "name": "premiumPaidAmount",
455
697
  "type": "uint256"
456
698
  },
457
699
  {
458
700
  "internalType": "uint256",
459
- "name": "createdAt",
701
+ "name": "lifetime",
460
702
  "type": "uint256"
461
703
  },
462
704
  {
463
- "internalType": "uint256",
705
+ "internalType": "bytes",
706
+ "name": "applicationData",
707
+ "type": "bytes"
708
+ },
709
+ {
710
+ "internalType": "bytes",
711
+ "name": "policyData",
712
+ "type": "bytes"
713
+ },
714
+ {
715
+ "internalType": "Timestamp",
464
716
  "name": "activatedAt",
465
- "type": "uint256"
717
+ "type": "uint40"
466
718
  },
467
719
  {
468
- "internalType": "uint256",
720
+ "internalType": "Timestamp",
469
721
  "name": "expiredAt",
470
- "type": "uint256"
722
+ "type": "uint40"
471
723
  },
472
724
  {
473
- "internalType": "uint256",
725
+ "internalType": "Timestamp",
474
726
  "name": "closedAt",
475
- "type": "uint256"
727
+ "type": "uint40"
476
728
  }
477
729
  ],
478
730
  "internalType": "struct IPolicy.PolicyInfo",
@@ -486,9 +738,9 @@
486
738
  {
487
739
  "inputs": [
488
740
  {
489
- "internalType": "uint256",
741
+ "internalType": "NftId",
490
742
  "name": "nftId",
491
- "type": "uint256"
743
+ "type": "uint96"
492
744
  }
493
745
  ],
494
746
  "name": "getPoolInfo",
@@ -496,28 +748,13 @@
496
748
  {
497
749
  "components": [
498
750
  {
499
- "internalType": "uint256",
500
- "name": "nftId",
501
- "type": "uint256"
502
- },
503
- {
504
- "internalType": "address",
505
- "name": "wallet",
506
- "type": "address"
507
- },
508
- {
509
- "internalType": "address",
510
- "name": "token",
511
- "type": "address"
512
- },
513
- {
514
- "internalType": "uint256",
515
- "name": "capital",
516
- "type": "uint256"
751
+ "internalType": "bool",
752
+ "name": "isVerifying",
753
+ "type": "bool"
517
754
  },
518
755
  {
519
- "internalType": "uint256",
520
- "name": "lockedCapital",
756
+ "internalType": "UFixed",
757
+ "name": "collateralizationLevel",
521
758
  "type": "uint256"
522
759
  }
523
760
  ],
@@ -529,20 +766,33 @@
529
766
  "stateMutability": "view",
530
767
  "type": "function"
531
768
  },
769
+ {
770
+ "inputs": [],
771
+ "name": "getPoolService",
772
+ "outputs": [
773
+ {
774
+ "internalType": "contract IPoolService",
775
+ "name": "",
776
+ "type": "address"
777
+ }
778
+ ],
779
+ "stateMutability": "view",
780
+ "type": "function"
781
+ },
532
782
  {
533
783
  "inputs": [
534
784
  {
535
- "internalType": "uint256",
536
- "name": "productNftId",
537
- "type": "uint256"
785
+ "internalType": "NftId",
786
+ "name": "componentNftId",
787
+ "type": "uint96"
538
788
  }
539
789
  ],
540
- "name": "getPoolNftId",
790
+ "name": "getProductNftId",
541
791
  "outputs": [
542
792
  {
543
- "internalType": "uint256",
544
- "name": "poolNftId",
545
- "type": "uint256"
793
+ "internalType": "NftId",
794
+ "name": "productNftId",
795
+ "type": "uint96"
546
796
  }
547
797
  ],
548
798
  "stateMutability": "view",
@@ -574,6 +824,37 @@
574
824
  "stateMutability": "view",
575
825
  "type": "function"
576
826
  },
827
+ {
828
+ "inputs": [
829
+ {
830
+ "internalType": "RiskId",
831
+ "name": "riskId",
832
+ "type": "bytes8"
833
+ }
834
+ ],
835
+ "name": "getRiskInfo",
836
+ "outputs": [
837
+ {
838
+ "components": [
839
+ {
840
+ "internalType": "NftId",
841
+ "name": "productNftId",
842
+ "type": "uint96"
843
+ },
844
+ {
845
+ "internalType": "bytes",
846
+ "name": "data",
847
+ "type": "bytes"
848
+ }
849
+ ],
850
+ "internalType": "struct IRisk.RiskInfo",
851
+ "name": "info",
852
+ "type": "tuple"
853
+ }
854
+ ],
855
+ "stateMutability": "view",
856
+ "type": "function"
857
+ },
577
858
  {
578
859
  "inputs": [
579
860
  {
@@ -585,9 +866,9 @@
585
866
  "name": "getRole",
586
867
  "outputs": [
587
868
  {
588
- "internalType": "bytes32",
869
+ "internalType": "RoleId",
589
870
  "name": "role",
590
- "type": "bytes32"
871
+ "type": "bytes8"
591
872
  }
592
873
  ],
593
874
  "stateMutability": "view",
@@ -614,12 +895,12 @@
614
895
  "type": "string"
615
896
  }
616
897
  ],
617
- "name": "getRoleForName",
898
+ "name": "getRoleId",
618
899
  "outputs": [
619
900
  {
620
- "internalType": "bytes32",
901
+ "internalType": "RoleId",
621
902
  "name": "role",
622
- "type": "bytes32"
903
+ "type": "bytes8"
623
904
  }
624
905
  ],
625
906
  "stateMutability": "pure",
@@ -628,9 +909,9 @@
628
909
  {
629
910
  "inputs": [
630
911
  {
631
- "internalType": "bytes32",
912
+ "internalType": "RoleId",
632
913
  "name": "role",
633
- "type": "bytes32"
914
+ "type": "bytes8"
634
915
  }
635
916
  ],
636
917
  "name": "getRoleInfo",
@@ -638,9 +919,9 @@
638
919
  {
639
920
  "components": [
640
921
  {
641
- "internalType": "bytes32",
922
+ "internalType": "RoleId",
642
923
  "name": "id",
643
- "type": "bytes32"
924
+ "type": "bytes8"
644
925
  },
645
926
  {
646
927
  "internalType": "string",
@@ -664,9 +945,9 @@
664
945
  {
665
946
  "inputs": [
666
947
  {
667
- "internalType": "bytes32",
948
+ "internalType": "RoleId",
668
949
  "name": "role",
669
- "type": "bytes32"
950
+ "type": "bytes8"
670
951
  },
671
952
  {
672
953
  "internalType": "uint256",
@@ -678,7 +959,7 @@
678
959
  "outputs": [
679
960
  {
680
961
  "internalType": "address",
681
- "name": "roleMembers",
962
+ "name": "roleMember",
682
963
  "type": "address"
683
964
  }
684
965
  ],
@@ -688,9 +969,9 @@
688
969
  {
689
970
  "inputs": [
690
971
  {
691
- "internalType": "bytes32",
972
+ "internalType": "RoleId",
692
973
  "name": "role",
693
- "type": "bytes32"
974
+ "type": "bytes8"
694
975
  }
695
976
  ],
696
977
  "name": "getRoleMemberCount",
@@ -705,13 +986,19 @@
705
986
  "type": "function"
706
987
  },
707
988
  {
708
- "inputs": [],
709
- "name": "getType",
989
+ "inputs": [
990
+ {
991
+ "internalType": "Key32",
992
+ "name": "key",
993
+ "type": "bytes32"
994
+ }
995
+ ],
996
+ "name": "getState",
710
997
  "outputs": [
711
998
  {
712
- "internalType": "uint256",
713
- "name": "objectType",
714
- "type": "uint256"
999
+ "internalType": "StateId",
1000
+ "name": "state",
1001
+ "type": "uint8"
715
1002
  }
716
1003
  ],
717
1004
  "stateMutability": "view",
@@ -720,40 +1007,155 @@
720
1007
  {
721
1008
  "inputs": [
722
1009
  {
723
- "internalType": "bytes32",
724
- "name": "role",
725
- "type": "bytes32"
726
- },
1010
+ "internalType": "NftId",
1011
+ "name": "componentNftId",
1012
+ "type": "uint96"
1013
+ }
1014
+ ],
1015
+ "name": "getTokenHandler",
1016
+ "outputs": [
727
1017
  {
728
- "internalType": "address",
729
- "name": "member",
1018
+ "internalType": "contract TokenHandler",
1019
+ "name": "tokenHandler",
730
1020
  "type": "address"
731
1021
  }
732
1022
  ],
733
- "name": "grantRole",
734
- "outputs": [],
735
- "stateMutability": "nonpayable",
1023
+ "stateMutability": "view",
736
1024
  "type": "function"
737
1025
  },
738
1026
  {
739
1027
  "inputs": [
740
1028
  {
741
- "internalType": "bytes32",
742
- "name": "role",
743
- "type": "bytes32"
744
- },
745
- {
746
- "internalType": "address",
747
- "name": "member",
748
- "type": "address"
1029
+ "internalType": "NftId",
1030
+ "name": "productNftId",
1031
+ "type": "uint96"
749
1032
  }
750
1033
  ],
751
- "name": "hasRole",
1034
+ "name": "getTreasuryInfo",
752
1035
  "outputs": [
753
1036
  {
754
- "internalType": "bool",
755
- "name": "",
756
- "type": "bool"
1037
+ "components": [
1038
+ {
1039
+ "internalType": "NftId",
1040
+ "name": "poolNftId",
1041
+ "type": "uint96"
1042
+ },
1043
+ {
1044
+ "internalType": "NftId",
1045
+ "name": "distributionNftId",
1046
+ "type": "uint96"
1047
+ },
1048
+ {
1049
+ "internalType": "contract IERC20Metadata",
1050
+ "name": "token",
1051
+ "type": "address"
1052
+ },
1053
+ {
1054
+ "components": [
1055
+ {
1056
+ "internalType": "UFixed",
1057
+ "name": "fractionalFee",
1058
+ "type": "uint256"
1059
+ },
1060
+ {
1061
+ "internalType": "uint256",
1062
+ "name": "fixedFee",
1063
+ "type": "uint256"
1064
+ }
1065
+ ],
1066
+ "internalType": "struct Fee",
1067
+ "name": "productFee",
1068
+ "type": "tuple"
1069
+ },
1070
+ {
1071
+ "components": [
1072
+ {
1073
+ "internalType": "UFixed",
1074
+ "name": "fractionalFee",
1075
+ "type": "uint256"
1076
+ },
1077
+ {
1078
+ "internalType": "uint256",
1079
+ "name": "fixedFee",
1080
+ "type": "uint256"
1081
+ }
1082
+ ],
1083
+ "internalType": "struct Fee",
1084
+ "name": "processingFee",
1085
+ "type": "tuple"
1086
+ },
1087
+ {
1088
+ "components": [
1089
+ {
1090
+ "internalType": "UFixed",
1091
+ "name": "fractionalFee",
1092
+ "type": "uint256"
1093
+ },
1094
+ {
1095
+ "internalType": "uint256",
1096
+ "name": "fixedFee",
1097
+ "type": "uint256"
1098
+ }
1099
+ ],
1100
+ "internalType": "struct Fee",
1101
+ "name": "poolFee",
1102
+ "type": "tuple"
1103
+ },
1104
+ {
1105
+ "components": [
1106
+ {
1107
+ "internalType": "UFixed",
1108
+ "name": "fractionalFee",
1109
+ "type": "uint256"
1110
+ },
1111
+ {
1112
+ "internalType": "uint256",
1113
+ "name": "fixedFee",
1114
+ "type": "uint256"
1115
+ }
1116
+ ],
1117
+ "internalType": "struct Fee",
1118
+ "name": "stakingFee",
1119
+ "type": "tuple"
1120
+ },
1121
+ {
1122
+ "components": [
1123
+ {
1124
+ "internalType": "UFixed",
1125
+ "name": "fractionalFee",
1126
+ "type": "uint256"
1127
+ },
1128
+ {
1129
+ "internalType": "uint256",
1130
+ "name": "fixedFee",
1131
+ "type": "uint256"
1132
+ }
1133
+ ],
1134
+ "internalType": "struct Fee",
1135
+ "name": "performanceFee",
1136
+ "type": "tuple"
1137
+ },
1138
+ {
1139
+ "components": [
1140
+ {
1141
+ "internalType": "UFixed",
1142
+ "name": "fractionalFee",
1143
+ "type": "uint256"
1144
+ },
1145
+ {
1146
+ "internalType": "uint256",
1147
+ "name": "fixedFee",
1148
+ "type": "uint256"
1149
+ }
1150
+ ],
1151
+ "internalType": "struct Fee",
1152
+ "name": "distributionFee",
1153
+ "type": "tuple"
1154
+ }
1155
+ ],
1156
+ "internalType": "struct ITreasury.TreasuryInfo",
1157
+ "name": "info",
1158
+ "type": "tuple"
757
1159
  }
758
1160
  ],
759
1161
  "stateMutability": "view",
@@ -761,56 +1163,379 @@
761
1163
  },
762
1164
  {
763
1165
  "inputs": [],
764
- "name": "isRegisterable",
1166
+ "name": "getType",
765
1167
  "outputs": [
766
1168
  {
767
- "internalType": "bool",
768
- "name": "",
769
- "type": "bool"
1169
+ "internalType": "ObjectType",
1170
+ "name": "objectType",
1171
+ "type": "uint8"
770
1172
  }
771
1173
  ],
772
1174
  "stateMutability": "pure",
773
1175
  "type": "function"
774
1176
  },
775
1177
  {
776
- "inputs": [],
777
- "name": "isRegistered",
1178
+ "inputs": [
1179
+ {
1180
+ "internalType": "uint256",
1181
+ "name": "a",
1182
+ "type": "uint256"
1183
+ },
1184
+ {
1185
+ "internalType": "int8",
1186
+ "name": "exp",
1187
+ "type": "int8"
1188
+ }
1189
+ ],
1190
+ "name": "getUFixed",
778
1191
  "outputs": [
779
1192
  {
780
- "internalType": "bool",
1193
+ "internalType": "UFixed",
781
1194
  "name": "",
782
- "type": "bool"
1195
+ "type": "uint256"
783
1196
  }
784
1197
  ],
785
- "stateMutability": "view",
1198
+ "stateMutability": "pure",
786
1199
  "type": "function"
787
1200
  },
788
1201
  {
789
- "inputs": [],
790
- "name": "register",
791
- "outputs": [
1202
+ "inputs": [
792
1203
  {
793
1204
  "internalType": "uint256",
794
- "name": "nftId",
1205
+ "name": "a",
1206
+ "type": "uint256"
1207
+ }
1208
+ ],
1209
+ "name": "getUFixed",
1210
+ "outputs": [
1211
+ {
1212
+ "internalType": "UFixed",
1213
+ "name": "",
795
1214
  "type": "uint256"
796
1215
  }
797
1216
  ],
1217
+ "stateMutability": "pure",
1218
+ "type": "function"
1219
+ },
1220
+ {
1221
+ "inputs": [],
1222
+ "name": "getVersion",
1223
+ "outputs": [
1224
+ {
1225
+ "internalType": "Version",
1226
+ "name": "",
1227
+ "type": "uint24"
1228
+ }
1229
+ ],
1230
+ "stateMutability": "pure",
1231
+ "type": "function"
1232
+ },
1233
+ {
1234
+ "inputs": [
1235
+ {
1236
+ "internalType": "uint256",
1237
+ "name": "index",
1238
+ "type": "uint256"
1239
+ }
1240
+ ],
1241
+ "name": "getVersion",
1242
+ "outputs": [
1243
+ {
1244
+ "internalType": "Version",
1245
+ "name": "version",
1246
+ "type": "uint24"
1247
+ }
1248
+ ],
1249
+ "stateMutability": "view",
1250
+ "type": "function"
1251
+ },
1252
+ {
1253
+ "inputs": [],
1254
+ "name": "getVersionCount",
1255
+ "outputs": [
1256
+ {
1257
+ "internalType": "uint256",
1258
+ "name": "numberOfVersions",
1259
+ "type": "uint256"
1260
+ }
1261
+ ],
1262
+ "stateMutability": "view",
1263
+ "type": "function"
1264
+ },
1265
+ {
1266
+ "inputs": [
1267
+ {
1268
+ "internalType": "Version",
1269
+ "name": "version",
1270
+ "type": "uint24"
1271
+ }
1272
+ ],
1273
+ "name": "getVersionInfo",
1274
+ "outputs": [
1275
+ {
1276
+ "components": [
1277
+ {
1278
+ "internalType": "Version",
1279
+ "name": "version",
1280
+ "type": "uint24"
1281
+ },
1282
+ {
1283
+ "internalType": "address",
1284
+ "name": "implementation",
1285
+ "type": "address"
1286
+ },
1287
+ {
1288
+ "internalType": "address",
1289
+ "name": "activatedBy",
1290
+ "type": "address"
1291
+ },
1292
+ {
1293
+ "internalType": "Timestamp",
1294
+ "name": "activatedAt",
1295
+ "type": "uint40"
1296
+ },
1297
+ {
1298
+ "internalType": "Blocknumber",
1299
+ "name": "activatedIn",
1300
+ "type": "uint32"
1301
+ }
1302
+ ],
1303
+ "internalType": "struct IVersionable.VersionInfo",
1304
+ "name": "versionInfo",
1305
+ "type": "tuple"
1306
+ }
1307
+ ],
1308
+ "stateMutability": "view",
1309
+ "type": "function"
1310
+ },
1311
+ {
1312
+ "inputs": [],
1313
+ "name": "getZeroFee",
1314
+ "outputs": [
1315
+ {
1316
+ "components": [
1317
+ {
1318
+ "internalType": "UFixed",
1319
+ "name": "fractionalFee",
1320
+ "type": "uint256"
1321
+ },
1322
+ {
1323
+ "internalType": "uint256",
1324
+ "name": "fixedFee",
1325
+ "type": "uint256"
1326
+ }
1327
+ ],
1328
+ "internalType": "struct Fee",
1329
+ "name": "fee",
1330
+ "type": "tuple"
1331
+ }
1332
+ ],
1333
+ "stateMutability": "view",
1334
+ "type": "function"
1335
+ },
1336
+ {
1337
+ "inputs": [
1338
+ {
1339
+ "internalType": "RoleId",
1340
+ "name": "role",
1341
+ "type": "bytes8"
1342
+ },
1343
+ {
1344
+ "internalType": "address",
1345
+ "name": "member",
1346
+ "type": "address"
1347
+ }
1348
+ ],
1349
+ "name": "grantRole",
1350
+ "outputs": [],
798
1351
  "stateMutability": "nonpayable",
799
1352
  "type": "function"
800
1353
  },
801
1354
  {
802
1355
  "inputs": [
803
1356
  {
804
- "internalType": "contract IComponentContract",
805
- "name": "component",
1357
+ "internalType": "RoleId",
1358
+ "name": "role",
1359
+ "type": "bytes8"
1360
+ },
1361
+ {
1362
+ "internalType": "address",
1363
+ "name": "member",
1364
+ "type": "address"
1365
+ }
1366
+ ],
1367
+ "name": "hasRole",
1368
+ "outputs": [
1369
+ {
1370
+ "internalType": "bool",
1371
+ "name": "",
1372
+ "type": "bool"
1373
+ }
1374
+ ],
1375
+ "stateMutability": "view",
1376
+ "type": "function"
1377
+ },
1378
+ {
1379
+ "inputs": [
1380
+ {
1381
+ "internalType": "NftId",
1382
+ "name": "productNftId",
1383
+ "type": "uint96"
1384
+ }
1385
+ ],
1386
+ "name": "hasTreasuryInfo",
1387
+ "outputs": [
1388
+ {
1389
+ "internalType": "bool",
1390
+ "name": "hasInfo",
1391
+ "type": "bool"
1392
+ }
1393
+ ],
1394
+ "stateMutability": "view",
1395
+ "type": "function"
1396
+ },
1397
+ {
1398
+ "inputs": [
1399
+ {
1400
+ "internalType": "address",
1401
+ "name": "implementation",
1402
+ "type": "address"
1403
+ },
1404
+ {
1405
+ "internalType": "address",
1406
+ "name": "activatedBy",
1407
+ "type": "address"
1408
+ },
1409
+ {
1410
+ "internalType": "bytes",
1411
+ "name": "activationData",
1412
+ "type": "bytes"
1413
+ }
1414
+ ],
1415
+ "name": "initialize",
1416
+ "outputs": [],
1417
+ "stateMutability": "nonpayable",
1418
+ "type": "function"
1419
+ },
1420
+ {
1421
+ "inputs": [
1422
+ {
1423
+ "internalType": "Version",
1424
+ "name": "version",
1425
+ "type": "uint24"
1426
+ }
1427
+ ],
1428
+ "name": "isActivated",
1429
+ "outputs": [
1430
+ {
1431
+ "internalType": "bool",
1432
+ "name": "",
1433
+ "type": "bool"
1434
+ }
1435
+ ],
1436
+ "stateMutability": "view",
1437
+ "type": "function"
1438
+ },
1439
+ {
1440
+ "inputs": [],
1441
+ "name": "register",
1442
+ "outputs": [
1443
+ {
1444
+ "internalType": "NftId",
1445
+ "name": "nftId",
1446
+ "type": "uint96"
1447
+ }
1448
+ ],
1449
+ "stateMutability": "nonpayable",
1450
+ "type": "function"
1451
+ },
1452
+ {
1453
+ "inputs": [
1454
+ {
1455
+ "internalType": "NftId",
1456
+ "name": "nftId",
1457
+ "type": "uint96"
1458
+ },
1459
+ {
1460
+ "internalType": "contract IERC20Metadata",
1461
+ "name": "token",
1462
+ "type": "address"
1463
+ },
1464
+ {
1465
+ "internalType": "address",
1466
+ "name": "wallet",
806
1467
  "type": "address"
807
1468
  }
808
1469
  ],
809
1470
  "name": "registerComponent",
1471
+ "outputs": [],
1472
+ "stateMutability": "nonpayable",
1473
+ "type": "function"
1474
+ },
1475
+ {
1476
+ "inputs": [
1477
+ {
1478
+ "internalType": "NftId",
1479
+ "name": "poolNftId",
1480
+ "type": "uint96"
1481
+ },
1482
+ {
1483
+ "internalType": "bool",
1484
+ "name": "isVerifying",
1485
+ "type": "bool"
1486
+ },
1487
+ {
1488
+ "internalType": "UFixed",
1489
+ "name": "collateralizationLevel",
1490
+ "type": "uint256"
1491
+ }
1492
+ ],
1493
+ "name": "registerPool",
1494
+ "outputs": [],
1495
+ "stateMutability": "nonpayable",
1496
+ "type": "function"
1497
+ },
1498
+ {
1499
+ "inputs": [
1500
+ {
1501
+ "internalType": "contract IProductComponent",
1502
+ "name": "product",
1503
+ "type": "address"
1504
+ },
1505
+ {
1506
+ "internalType": "contract IPoolComponent",
1507
+ "name": "pool",
1508
+ "type": "address"
1509
+ },
1510
+ {
1511
+ "internalType": "contract IDistributionComponent",
1512
+ "name": "distribution",
1513
+ "type": "address"
1514
+ }
1515
+ ],
1516
+ "name": "registerProductSetup",
1517
+ "outputs": [],
1518
+ "stateMutability": "nonpayable",
1519
+ "type": "function"
1520
+ },
1521
+ {
1522
+ "inputs": [
1523
+ {
1524
+ "internalType": "NftId",
1525
+ "name": "bundleNftId",
1526
+ "type": "uint96"
1527
+ },
1528
+ {
1529
+ "internalType": "NftId",
1530
+ "name": "policyNftId",
1531
+ "type": "uint96"
1532
+ }
1533
+ ],
1534
+ "name": "releasePolicy",
810
1535
  "outputs": [
811
1536
  {
812
1537
  "internalType": "uint256",
813
- "name": "nftInfo",
1538
+ "name": "collateralAmount",
814
1539
  "type": "uint256"
815
1540
  }
816
1541
  ],
@@ -820,9 +1545,9 @@
820
1545
  {
821
1546
  "inputs": [
822
1547
  {
823
- "internalType": "bytes32",
1548
+ "internalType": "RoleId",
824
1549
  "name": "role",
825
- "type": "bytes32"
1550
+ "type": "bytes8"
826
1551
  },
827
1552
  {
828
1553
  "internalType": "address",
@@ -837,49 +1562,480 @@
837
1562
  },
838
1563
  {
839
1564
  "inputs": [
1565
+ {
1566
+ "internalType": "RoleId",
1567
+ "name": "role",
1568
+ "type": "bytes8"
1569
+ }
1570
+ ],
1571
+ "name": "roleExists",
1572
+ "outputs": [
1573
+ {
1574
+ "internalType": "bool",
1575
+ "name": "",
1576
+ "type": "bool"
1577
+ }
1578
+ ],
1579
+ "stateMutability": "view",
1580
+ "type": "function"
1581
+ },
1582
+ {
1583
+ "inputs": [
1584
+ {
1585
+ "internalType": "NftId",
1586
+ "name": "nftId",
1587
+ "type": "uint96"
1588
+ },
840
1589
  {
841
1590
  "components": [
1591
+ {
1592
+ "internalType": "NftId",
1593
+ "name": "poolNftId",
1594
+ "type": "uint96"
1595
+ },
1596
+ {
1597
+ "components": [
1598
+ {
1599
+ "internalType": "UFixed",
1600
+ "name": "fractionalFee",
1601
+ "type": "uint256"
1602
+ },
1603
+ {
1604
+ "internalType": "uint256",
1605
+ "name": "fixedFee",
1606
+ "type": "uint256"
1607
+ }
1608
+ ],
1609
+ "internalType": "struct Fee",
1610
+ "name": "fee",
1611
+ "type": "tuple"
1612
+ },
1613
+ {
1614
+ "internalType": "bytes",
1615
+ "name": "filter",
1616
+ "type": "bytes"
1617
+ },
1618
+ {
1619
+ "internalType": "uint256",
1620
+ "name": "capitalAmount",
1621
+ "type": "uint256"
1622
+ },
1623
+ {
1624
+ "internalType": "uint256",
1625
+ "name": "lockedAmount",
1626
+ "type": "uint256"
1627
+ },
1628
+ {
1629
+ "internalType": "uint256",
1630
+ "name": "balanceAmount",
1631
+ "type": "uint256"
1632
+ },
1633
+ {
1634
+ "internalType": "Timestamp",
1635
+ "name": "expiredAt",
1636
+ "type": "uint40"
1637
+ },
1638
+ {
1639
+ "internalType": "Timestamp",
1640
+ "name": "closedAt",
1641
+ "type": "uint40"
1642
+ }
1643
+ ],
1644
+ "internalType": "struct IBundle.BundleInfo",
1645
+ "name": "bundleInfo",
1646
+ "type": "tuple"
1647
+ }
1648
+ ],
1649
+ "name": "setBundleInfo",
1650
+ "outputs": [],
1651
+ "stateMutability": "nonpayable",
1652
+ "type": "function"
1653
+ },
1654
+ {
1655
+ "inputs": [
1656
+ {
1657
+ "internalType": "NftId",
1658
+ "name": "policyNftId",
1659
+ "type": "uint96"
1660
+ },
1661
+ {
1662
+ "components": [
1663
+ {
1664
+ "internalType": "NftId",
1665
+ "name": "productNftId",
1666
+ "type": "uint96"
1667
+ },
1668
+ {
1669
+ "internalType": "NftId",
1670
+ "name": "bundleNftId",
1671
+ "type": "uint96"
1672
+ },
1673
+ {
1674
+ "internalType": "ReferralId",
1675
+ "name": "referralId",
1676
+ "type": "bytes8"
1677
+ },
1678
+ {
1679
+ "internalType": "address",
1680
+ "name": "beneficiary",
1681
+ "type": "address"
1682
+ },
1683
+ {
1684
+ "internalType": "RiskId",
1685
+ "name": "riskId",
1686
+ "type": "bytes8"
1687
+ },
842
1688
  {
843
1689
  "internalType": "uint256",
844
- "name": "nftId",
1690
+ "name": "sumInsuredAmount",
845
1691
  "type": "uint256"
846
1692
  },
847
1693
  {
848
- "internalType": "enum IComponent.CState",
849
- "name": "state",
850
- "type": "uint8"
1694
+ "internalType": "uint256",
1695
+ "name": "premiumAmount",
1696
+ "type": "uint256"
1697
+ },
1698
+ {
1699
+ "internalType": "uint256",
1700
+ "name": "premiumPaidAmount",
1701
+ "type": "uint256"
1702
+ },
1703
+ {
1704
+ "internalType": "uint256",
1705
+ "name": "lifetime",
1706
+ "type": "uint256"
1707
+ },
1708
+ {
1709
+ "internalType": "bytes",
1710
+ "name": "applicationData",
1711
+ "type": "bytes"
1712
+ },
1713
+ {
1714
+ "internalType": "bytes",
1715
+ "name": "policyData",
1716
+ "type": "bytes"
1717
+ },
1718
+ {
1719
+ "internalType": "Timestamp",
1720
+ "name": "activatedAt",
1721
+ "type": "uint40"
1722
+ },
1723
+ {
1724
+ "internalType": "Timestamp",
1725
+ "name": "expiredAt",
1726
+ "type": "uint40"
1727
+ },
1728
+ {
1729
+ "internalType": "Timestamp",
1730
+ "name": "closedAt",
1731
+ "type": "uint40"
1732
+ }
1733
+ ],
1734
+ "internalType": "struct IPolicy.PolicyInfo",
1735
+ "name": "info",
1736
+ "type": "tuple"
1737
+ }
1738
+ ],
1739
+ "name": "setPolicyInfo",
1740
+ "outputs": [],
1741
+ "stateMutability": "nonpayable",
1742
+ "type": "function"
1743
+ },
1744
+ {
1745
+ "inputs": [
1746
+ {
1747
+ "internalType": "RiskId",
1748
+ "name": "riskId",
1749
+ "type": "bytes8"
1750
+ },
1751
+ {
1752
+ "components": [
1753
+ {
1754
+ "internalType": "NftId",
1755
+ "name": "productNftId",
1756
+ "type": "uint96"
1757
+ },
1758
+ {
1759
+ "internalType": "bytes",
1760
+ "name": "data",
1761
+ "type": "bytes"
851
1762
  }
852
1763
  ],
853
- "internalType": "struct IComponent.ComponentInfo",
1764
+ "internalType": "struct IRisk.RiskInfo",
854
1765
  "name": "info",
855
1766
  "type": "tuple"
856
1767
  }
857
1768
  ],
858
- "name": "setComponentInfo",
1769
+ "name": "setRiskInfo",
1770
+ "outputs": [],
1771
+ "stateMutability": "nonpayable",
1772
+ "type": "function"
1773
+ },
1774
+ {
1775
+ "inputs": [
1776
+ {
1777
+ "internalType": "RoleId",
1778
+ "name": "role",
1779
+ "type": "bytes8"
1780
+ },
1781
+ {
1782
+ "internalType": "bool",
1783
+ "name": "active",
1784
+ "type": "bool"
1785
+ }
1786
+ ],
1787
+ "name": "setRoleState",
1788
+ "outputs": [],
1789
+ "stateMutability": "nonpayable",
1790
+ "type": "function"
1791
+ },
1792
+ {
1793
+ "inputs": [
1794
+ {
1795
+ "internalType": "NftId",
1796
+ "name": "productNftId",
1797
+ "type": "uint96"
1798
+ },
1799
+ {
1800
+ "components": [
1801
+ {
1802
+ "internalType": "NftId",
1803
+ "name": "poolNftId",
1804
+ "type": "uint96"
1805
+ },
1806
+ {
1807
+ "internalType": "NftId",
1808
+ "name": "distributionNftId",
1809
+ "type": "uint96"
1810
+ },
1811
+ {
1812
+ "internalType": "contract IERC20Metadata",
1813
+ "name": "token",
1814
+ "type": "address"
1815
+ },
1816
+ {
1817
+ "components": [
1818
+ {
1819
+ "internalType": "UFixed",
1820
+ "name": "fractionalFee",
1821
+ "type": "uint256"
1822
+ },
1823
+ {
1824
+ "internalType": "uint256",
1825
+ "name": "fixedFee",
1826
+ "type": "uint256"
1827
+ }
1828
+ ],
1829
+ "internalType": "struct Fee",
1830
+ "name": "productFee",
1831
+ "type": "tuple"
1832
+ },
1833
+ {
1834
+ "components": [
1835
+ {
1836
+ "internalType": "UFixed",
1837
+ "name": "fractionalFee",
1838
+ "type": "uint256"
1839
+ },
1840
+ {
1841
+ "internalType": "uint256",
1842
+ "name": "fixedFee",
1843
+ "type": "uint256"
1844
+ }
1845
+ ],
1846
+ "internalType": "struct Fee",
1847
+ "name": "processingFee",
1848
+ "type": "tuple"
1849
+ },
1850
+ {
1851
+ "components": [
1852
+ {
1853
+ "internalType": "UFixed",
1854
+ "name": "fractionalFee",
1855
+ "type": "uint256"
1856
+ },
1857
+ {
1858
+ "internalType": "uint256",
1859
+ "name": "fixedFee",
1860
+ "type": "uint256"
1861
+ }
1862
+ ],
1863
+ "internalType": "struct Fee",
1864
+ "name": "poolFee",
1865
+ "type": "tuple"
1866
+ },
1867
+ {
1868
+ "components": [
1869
+ {
1870
+ "internalType": "UFixed",
1871
+ "name": "fractionalFee",
1872
+ "type": "uint256"
1873
+ },
1874
+ {
1875
+ "internalType": "uint256",
1876
+ "name": "fixedFee",
1877
+ "type": "uint256"
1878
+ }
1879
+ ],
1880
+ "internalType": "struct Fee",
1881
+ "name": "stakingFee",
1882
+ "type": "tuple"
1883
+ },
1884
+ {
1885
+ "components": [
1886
+ {
1887
+ "internalType": "UFixed",
1888
+ "name": "fractionalFee",
1889
+ "type": "uint256"
1890
+ },
1891
+ {
1892
+ "internalType": "uint256",
1893
+ "name": "fixedFee",
1894
+ "type": "uint256"
1895
+ }
1896
+ ],
1897
+ "internalType": "struct Fee",
1898
+ "name": "performanceFee",
1899
+ "type": "tuple"
1900
+ },
1901
+ {
1902
+ "components": [
1903
+ {
1904
+ "internalType": "UFixed",
1905
+ "name": "fractionalFee",
1906
+ "type": "uint256"
1907
+ },
1908
+ {
1909
+ "internalType": "uint256",
1910
+ "name": "fixedFee",
1911
+ "type": "uint256"
1912
+ }
1913
+ ],
1914
+ "internalType": "struct Fee",
1915
+ "name": "distributionFee",
1916
+ "type": "tuple"
1917
+ }
1918
+ ],
1919
+ "internalType": "struct ITreasury.TreasuryInfo",
1920
+ "name": "info",
1921
+ "type": "tuple"
1922
+ }
1923
+ ],
1924
+ "name": "setTreasuryInfo",
1925
+ "outputs": [],
1926
+ "stateMutability": "nonpayable",
1927
+ "type": "function"
1928
+ },
1929
+ {
1930
+ "inputs": [
1931
+ {
1932
+ "internalType": "bytes4",
1933
+ "name": "interfaceId",
1934
+ "type": "bytes4"
1935
+ }
1936
+ ],
1937
+ "name": "supportsInterface",
859
1938
  "outputs": [
860
1939
  {
861
- "internalType": "uint256",
862
- "name": "componentId",
863
- "type": "uint256"
1940
+ "internalType": "bool",
1941
+ "name": "",
1942
+ "type": "bool"
864
1943
  }
865
1944
  ],
1945
+ "stateMutability": "view",
1946
+ "type": "function"
1947
+ },
1948
+ {
1949
+ "inputs": [
1950
+ {
1951
+ "internalType": "NftId",
1952
+ "name": "nftId",
1953
+ "type": "uint96"
1954
+ },
1955
+ {
1956
+ "internalType": "StateId",
1957
+ "name": "state",
1958
+ "type": "uint8"
1959
+ }
1960
+ ],
1961
+ "name": "updateBundleState",
1962
+ "outputs": [],
866
1963
  "stateMutability": "nonpayable",
867
1964
  "type": "function"
868
1965
  },
869
1966
  {
870
1967
  "inputs": [
871
1968
  {
872
- "internalType": "uint256",
873
- "name": "poolNftId",
874
- "type": "uint256"
1969
+ "internalType": "NftId",
1970
+ "name": "nftId",
1971
+ "type": "uint96"
875
1972
  },
876
1973
  {
877
- "internalType": "uint256",
878
- "name": "policyNftId",
879
- "type": "uint256"
1974
+ "internalType": "StateId",
1975
+ "name": "state",
1976
+ "type": "uint8"
1977
+ }
1978
+ ],
1979
+ "name": "updatePolicyState",
1980
+ "outputs": [],
1981
+ "stateMutability": "nonpayable",
1982
+ "type": "function"
1983
+ },
1984
+ {
1985
+ "inputs": [
1986
+ {
1987
+ "internalType": "RiskId",
1988
+ "name": "riskId",
1989
+ "type": "bytes8"
1990
+ },
1991
+ {
1992
+ "internalType": "StateId",
1993
+ "name": "state",
1994
+ "type": "uint8"
1995
+ }
1996
+ ],
1997
+ "name": "updateRiskState",
1998
+ "outputs": [],
1999
+ "stateMutability": "nonpayable",
2000
+ "type": "function"
2001
+ },
2002
+ {
2003
+ "inputs": [
2004
+ {
2005
+ "internalType": "Key32",
2006
+ "name": "key",
2007
+ "type": "bytes32"
2008
+ },
2009
+ {
2010
+ "internalType": "StateId",
2011
+ "name": "state",
2012
+ "type": "uint8"
2013
+ }
2014
+ ],
2015
+ "name": "updateState",
2016
+ "outputs": [],
2017
+ "stateMutability": "nonpayable",
2018
+ "type": "function"
2019
+ },
2020
+ {
2021
+ "inputs": [
2022
+ {
2023
+ "internalType": "address",
2024
+ "name": "implementation",
2025
+ "type": "address"
2026
+ },
2027
+ {
2028
+ "internalType": "address",
2029
+ "name": "activatedBy",
2030
+ "type": "address"
2031
+ },
2032
+ {
2033
+ "internalType": "bytes",
2034
+ "name": "upgradeData",
2035
+ "type": "bytes"
880
2036
  }
881
2037
  ],
882
- "name": "underwrite",
2038
+ "name": "upgrade",
883
2039
  "outputs": [],
884
2040
  "stateMutability": "nonpayable",
885
2041
  "type": "function"