@etherisc/gif-next 0.0.2-f619be3-760 → 0.0.2-f72939c-683

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