@etherisc/gif-next 0.0.2-e6ad61d-739 → 0.0.2-e875d61-189

Sign up to get free protection for your applications and to get access to all the features.
Files changed (331) hide show
  1. package/README.md +115 -7
  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 +1018 -628
  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 +1278 -788
  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 +130 -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 +131 -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 +10 -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 +10 -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 +477 -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 +673 -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 +436 -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/test/Usdc.sol/USDC.json +338 -0
  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/RoleId.sol/RoleIdLib.dbg.json +4 -0
  178. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +30 -0
  179. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  180. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  181. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  182. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +64 -2
  183. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
  184. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +58 -58
  185. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +4 -0
  186. package/artifacts/contracts/types/Version.sol/VersionLib.json +139 -0
  187. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +4 -0
  188. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +30 -0
  189. package/contracts/components/BaseComponent.sol +94 -0
  190. package/contracts/components/IBaseComponent.sol +19 -0
  191. package/contracts/components/IPoolComponent.sol +57 -0
  192. package/contracts/components/{IProduct.sol → IProductComponent.sol} +9 -6
  193. package/contracts/components/Pool.sol +155 -16
  194. package/contracts/components/Product.sol +69 -24
  195. package/contracts/instance/IInstance.sol +36 -11
  196. package/contracts/instance/IInstanceLinked.sol +8 -0
  197. package/contracts/instance/Instance.sol +48 -49
  198. package/contracts/instance/base/ComponentServiceBase.sol +42 -0
  199. package/contracts/instance/base/IInstanceBase.sol +19 -0
  200. package/contracts/instance/base/IKeyValueStore.sol +50 -0
  201. package/contracts/instance/{lifecycle → base}/ILifecycle.sol +4 -21
  202. package/contracts/instance/base/IService.sol +15 -0
  203. package/contracts/instance/base/InstanceBase.sol +84 -0
  204. package/contracts/instance/base/KeyValueStore.sol +161 -0
  205. package/contracts/instance/base/Lifecycle.sol +92 -0
  206. package/contracts/instance/base/ModuleBase.sol +46 -0
  207. package/contracts/instance/base/ServiceBase.sol +37 -0
  208. package/contracts/instance/module/access/Access.sol +149 -0
  209. package/contracts/instance/module/access/IAccess.sol +53 -0
  210. package/contracts/instance/module/bundle/BundleModule.sol +135 -0
  211. package/contracts/instance/module/bundle/IBundle.sol +51 -0
  212. package/contracts/instance/module/compensation/CompensationModule.sol +17 -0
  213. package/contracts/instance/module/compensation/ICompensation.sol +10 -0
  214. package/contracts/instance/module/component/ComponentModule.sol +81 -0
  215. package/contracts/instance/module/component/IComponent.sol +29 -0
  216. package/contracts/instance/module/policy/IPolicy.sol +59 -0
  217. package/contracts/instance/module/policy/PolicyModule.sol +89 -0
  218. package/contracts/instance/module/pool/IPoolModule.sol +40 -0
  219. package/contracts/instance/module/pool/PoolModule.sol +90 -0
  220. package/contracts/instance/module/risk/IRisk.sol +10 -0
  221. package/contracts/instance/module/risk/RiskModule.sol +17 -0
  222. package/contracts/instance/module/treasury/ITreasury.sol +96 -0
  223. package/contracts/instance/module/treasury/TokenHandler.sol +48 -0
  224. package/contracts/instance/module/treasury/TreasuryModule.sol +171 -0
  225. package/contracts/instance/service/ComponentOwnerService.sol +155 -0
  226. package/contracts/instance/service/IComponentOwnerService.sol +22 -0
  227. package/contracts/instance/service/IPoolService.sol +30 -0
  228. package/contracts/instance/service/IProductService.sol +58 -0
  229. package/contracts/instance/service/PoolService.sol +129 -0
  230. package/contracts/instance/service/ProductService.sol +366 -0
  231. package/contracts/registry/ChainNft.sol +61 -37
  232. package/contracts/registry/IRegistry.sol +24 -34
  233. package/contracts/registry/IRegistryLinked.sol +8 -0
  234. package/contracts/registry/Registry.sol +284 -85
  235. package/contracts/shared/ERC165.sol +21 -0
  236. package/contracts/shared/IOwnable.sol +6 -0
  237. package/contracts/shared/IRegisterable.sol +24 -0
  238. package/contracts/shared/IVersionable.sol +52 -0
  239. package/contracts/shared/Registerable.sol +86 -0
  240. package/contracts/shared/Versionable.sol +89 -0
  241. package/contracts/test/TestFee.sol +25 -0
  242. package/contracts/test/TestPool.sol +24 -0
  243. package/contracts/test/TestProduct.sol +51 -0
  244. package/contracts/test/TestRegisterable.sol +19 -0
  245. package/contracts/test/TestRoleId.sol +14 -0
  246. package/contracts/test/TestService.sol +32 -0
  247. package/contracts/test/TestToken.sol +26 -0
  248. package/contracts/test/TestVersion.sol +44 -0
  249. package/contracts/test/TestVersionable.sol +17 -0
  250. package/contracts/test/Usdc.sol +26 -0
  251. package/contracts/types/AddressSet.sol +58 -0
  252. package/contracts/types/Fee.sol +39 -20
  253. package/contracts/types/Key32.sol +45 -0
  254. package/contracts/types/NftId.sol +22 -1
  255. package/contracts/types/NftIdSet.sol +60 -0
  256. package/contracts/types/ObjectType.sol +30 -14
  257. package/contracts/types/RoleId.sol +38 -0
  258. package/contracts/types/StateId.sol +13 -3
  259. package/contracts/types/Timestamp.sol +22 -1
  260. package/contracts/types/UFixed.sol +12 -13
  261. package/contracts/types/Version.sol +95 -0
  262. package/package.json +9 -3
  263. package/artifacts/contracts/components/Component.sol/Component.dbg.json +0 -4
  264. package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +0 -4
  265. package/artifacts/contracts/components/Component.sol/InstanceLinked.json +0 -35
  266. package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +0 -4
  267. package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +0 -4
  268. package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +0 -74
  269. package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +0 -4
  270. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +0 -4
  271. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +0 -4
  272. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.json +0 -35
  273. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +0 -4
  274. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.json +0 -50
  275. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +0 -4
  276. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
  277. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +0 -4
  278. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +0 -202
  279. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +0 -4
  280. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +0 -4
  281. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +0 -4
  282. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +0 -217
  283. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +0 -4
  284. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +0 -141
  285. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +0 -4
  286. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
  287. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
  288. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
  289. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
  290. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
  291. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
  292. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
  293. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
  294. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +0 -4
  295. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
  296. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
  297. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +0 -4
  298. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.json +0 -75
  299. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +0 -4
  300. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +0 -4
  301. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.json +0 -75
  302. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +0 -4
  303. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +0 -196
  304. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.dbg.json +0 -4
  305. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.dbg.json +0 -4
  306. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.dbg.json +0 -4
  307. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.json +0 -45
  308. package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +0 -4
  309. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +0 -4
  310. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +0 -4
  311. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +0 -4
  312. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.json +0 -49
  313. package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +0 -4
  314. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +0 -4
  315. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +0 -60
  316. package/contracts/components/Component.sol +0 -77
  317. package/contracts/components/IPool.sol +0 -15
  318. package/contracts/instance/access/Access.sol +0 -165
  319. package/contracts/instance/access/IAccess.sol +0 -63
  320. package/contracts/instance/component/ComponentModule.sol +0 -274
  321. package/contracts/instance/component/IComponent.sol +0 -74
  322. package/contracts/instance/lifecycle/LifecycleModule.sol +0 -88
  323. package/contracts/instance/policy/IPolicy.sol +0 -50
  324. package/contracts/instance/policy/PolicyModule.sol +0 -114
  325. package/contracts/instance/pool/IPoolModule.sol +0 -23
  326. package/contracts/instance/pool/PoolModule.sol +0 -81
  327. package/contracts/instance/product/IProductService.sol +0 -36
  328. package/contracts/instance/product/ProductService.sol +0 -136
  329. package/contracts/instance/treasury/ITreasury.sol +0 -91
  330. package/contracts/instance/treasury/TokenHandler.sol +0 -24
  331. package/contracts/instance/treasury/TreasuryModule.sol +0 -168
@@ -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,72 @@
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": "productNftId",
237
+ "type": "uint96"
238
+ },
239
+ {
240
+ "internalType": "NftId",
241
+ "name": "policyNftId",
242
+ "type": "uint96"
298
243
  },
299
244
  {
300
245
  "internalType": "uint256",
@@ -317,14 +262,8 @@
317
262
  "type": "uint96"
318
263
  }
319
264
  ],
320
- "name": "createApplication",
321
- "outputs": [
322
- {
323
- "internalType": "NftId",
324
- "name": "nftId",
325
- "type": "uint96"
326
- }
327
- ],
265
+ "name": "createPolicyInfo",
266
+ "outputs": [],
328
267
  "stateMutability": "nonpayable",
329
268
  "type": "function"
330
269
  },
@@ -339,9 +278,9 @@
339
278
  "name": "createRole",
340
279
  "outputs": [
341
280
  {
342
- "internalType": "bytes32",
281
+ "internalType": "RoleId",
343
282
  "name": "role",
344
- "type": "bytes32"
283
+ "type": "bytes8"
345
284
  }
346
285
  ],
347
286
  "stateMutability": "nonpayable",
@@ -350,27 +289,20 @@
350
289
  {
351
290
  "inputs": [
352
291
  {
353
- "internalType": "bytes32",
354
- "name": "role",
355
- "type": "bytes32"
292
+ "internalType": "NftId",
293
+ "name": "poolNftId",
294
+ "type": "uint96"
356
295
  }
357
296
  ],
358
- "name": "disableRole",
359
- "outputs": [],
360
- "stateMutability": "nonpayable",
361
- "type": "function"
362
- },
363
- {
364
- "inputs": [
297
+ "name": "getBundleCount",
298
+ "outputs": [
365
299
  {
366
- "internalType": "bytes32",
367
- "name": "role",
368
- "type": "bytes32"
300
+ "internalType": "uint256",
301
+ "name": "bundleCount",
302
+ "type": "uint256"
369
303
  }
370
304
  ],
371
- "name": "enableRole",
372
- "outputs": [],
373
- "stateMutability": "nonpayable",
305
+ "stateMutability": "view",
374
306
  "type": "function"
375
307
  },
376
308
  {
@@ -381,33 +313,107 @@
381
313
  "type": "uint96"
382
314
  }
383
315
  ],
384
- "name": "getBundleNftForPolicy",
316
+ "name": "getBundleInfo",
385
317
  "outputs": [
386
318
  {
387
- "internalType": "NftId",
388
- "name": "bundleNft",
389
- "type": "uint96"
390
- }
391
- ],
392
- "stateMutability": "view",
393
- "type": "function"
394
- },
395
- {
396
- "inputs": [
319
+ "components": [
320
+ {
321
+ "internalType": "NftId",
322
+ "name": "poolNftId",
323
+ "type": "uint96"
324
+ },
325
+ {
326
+ "internalType": "bytes",
327
+ "name": "filter",
328
+ "type": "bytes"
329
+ },
330
+ {
331
+ "internalType": "uint256",
332
+ "name": "capitalAmount",
333
+ "type": "uint256"
334
+ },
335
+ {
336
+ "internalType": "uint256",
337
+ "name": "lockedAmount",
338
+ "type": "uint256"
339
+ },
340
+ {
341
+ "internalType": "uint256",
342
+ "name": "balanceAmount",
343
+ "type": "uint256"
344
+ },
345
+ {
346
+ "internalType": "Timestamp",
347
+ "name": "expiredAt",
348
+ "type": "uint40"
349
+ },
350
+ {
351
+ "internalType": "Timestamp",
352
+ "name": "closedAt",
353
+ "type": "uint40"
354
+ }
355
+ ],
356
+ "internalType": "struct IBundle.BundleInfo",
357
+ "name": "bundleInfo",
358
+ "type": "tuple"
359
+ }
360
+ ],
361
+ "stateMutability": "view",
362
+ "type": "function"
363
+ },
364
+ {
365
+ "inputs": [
397
366
  {
398
- "internalType": "address",
399
- "name": "componentAddress",
400
- "type": "address"
367
+ "internalType": "NftId",
368
+ "name": "poolNftId",
369
+ "type": "uint96"
370
+ },
371
+ {
372
+ "internalType": "uint256",
373
+ "name": "index",
374
+ "type": "uint256"
401
375
  }
402
376
  ],
403
- "name": "getComponentId",
377
+ "name": "getBundleNftId",
404
378
  "outputs": [
379
+ {
380
+ "internalType": "NftId",
381
+ "name": "bundleNftId",
382
+ "type": "uint96"
383
+ }
384
+ ],
385
+ "stateMutability": "view",
386
+ "type": "function"
387
+ },
388
+ {
389
+ "inputs": [
405
390
  {
406
391
  "internalType": "NftId",
407
392
  "name": "nftId",
408
393
  "type": "uint96"
409
394
  }
410
395
  ],
396
+ "name": "getBundleState",
397
+ "outputs": [
398
+ {
399
+ "internalType": "StateId",
400
+ "name": "state",
401
+ "type": "uint8"
402
+ }
403
+ ],
404
+ "stateMutability": "view",
405
+ "type": "function"
406
+ },
407
+ {
408
+ "inputs": [],
409
+ "name": "getComponentCount",
410
+ "outputs": [
411
+ {
412
+ "internalType": "uint256",
413
+ "name": "numberOfCompnents",
414
+ "type": "uint256"
415
+ }
416
+ ],
411
417
  "stateMutability": "view",
412
418
  "type": "function"
413
419
  },
@@ -430,6 +436,19 @@
430
436
  "stateMutability": "view",
431
437
  "type": "function"
432
438
  },
439
+ {
440
+ "inputs": [],
441
+ "name": "getComponentOwnerService",
442
+ "outputs": [
443
+ {
444
+ "internalType": "contract IComponentOwnerService",
445
+ "name": "",
446
+ "type": "address"
447
+ }
448
+ ],
449
+ "stateMutability": "view",
450
+ "type": "function"
451
+ },
433
452
  {
434
453
  "inputs": [
435
454
  {
@@ -438,41 +457,30 @@
438
457
  "type": "uint96"
439
458
  }
440
459
  ],
441
- "name": "getComponentInfo",
460
+ "name": "getComponentState",
442
461
  "outputs": [
443
462
  {
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"
463
+ "internalType": "StateId",
464
+ "name": "state",
465
+ "type": "uint8"
464
466
  }
465
467
  ],
466
468
  "stateMutability": "view",
467
469
  "type": "function"
468
470
  },
469
471
  {
470
- "inputs": [],
471
- "name": "getComponentOwnerService",
472
+ "inputs": [
473
+ {
474
+ "internalType": "NftId",
475
+ "name": "nftId",
476
+ "type": "uint96"
477
+ }
478
+ ],
479
+ "name": "getComponentToken",
472
480
  "outputs": [
473
481
  {
474
- "internalType": "contract IComponentOwnerService",
475
- "name": "",
482
+ "internalType": "contract IERC20Metadata",
483
+ "name": "token",
476
484
  "type": "address"
477
485
  }
478
486
  ],
@@ -480,13 +488,19 @@
480
488
  "type": "function"
481
489
  },
482
490
  {
483
- "inputs": [],
484
- "name": "getData",
491
+ "inputs": [
492
+ {
493
+ "internalType": "NftId",
494
+ "name": "nftId",
495
+ "type": "uint96"
496
+ }
497
+ ],
498
+ "name": "getComponentWallet",
485
499
  "outputs": [
486
500
  {
487
- "internalType": "bytes",
488
- "name": "data",
489
- "type": "bytes"
501
+ "internalType": "address",
502
+ "name": "wallet",
503
+ "type": "address"
490
504
  }
491
505
  ],
492
506
  "stateMutability": "view",
@@ -494,12 +508,12 @@
494
508
  },
495
509
  {
496
510
  "inputs": [],
497
- "name": "getInitialOwner",
511
+ "name": "getData",
498
512
  "outputs": [
499
513
  {
500
- "internalType": "address",
501
- "name": "initialOwner",
502
- "type": "address"
514
+ "internalType": "bytes",
515
+ "name": "data",
516
+ "type": "bytes"
503
517
  }
504
518
  ],
505
519
  "stateMutability": "view",
@@ -508,17 +522,47 @@
508
522
  {
509
523
  "inputs": [
510
524
  {
511
- "internalType": "ObjectType",
512
- "name": "objectType",
513
- "type": "uint8"
525
+ "internalType": "UFixed",
526
+ "name": "fractionalFee",
527
+ "type": "uint256"
528
+ },
529
+ {
530
+ "internalType": "uint256",
531
+ "name": "fixedFee",
532
+ "type": "uint256"
514
533
  }
515
534
  ],
516
- "name": "getInitialState",
535
+ "name": "getFee",
517
536
  "outputs": [
518
537
  {
519
- "internalType": "StateId",
520
- "name": "",
521
- "type": "uint8"
538
+ "components": [
539
+ {
540
+ "internalType": "UFixed",
541
+ "name": "fractionalFee",
542
+ "type": "uint256"
543
+ },
544
+ {
545
+ "internalType": "uint256",
546
+ "name": "fixedFee",
547
+ "type": "uint256"
548
+ }
549
+ ],
550
+ "internalType": "struct Fee",
551
+ "name": "fee",
552
+ "type": "tuple"
553
+ }
554
+ ],
555
+ "stateMutability": "pure",
556
+ "type": "function"
557
+ },
558
+ {
559
+ "inputs": [],
560
+ "name": "getKeyValueStore",
561
+ "outputs": [
562
+ {
563
+ "internalType": "contract IKeyValueStore",
564
+ "name": "keyValueStore",
565
+ "type": "address"
522
566
  }
523
567
  ],
524
568
  "stateMutability": "view",
@@ -556,7 +600,7 @@
556
600
  "outputs": [
557
601
  {
558
602
  "internalType": "NftId",
559
- "name": "parentNftId",
603
+ "name": "nftId",
560
604
  "type": "uint96"
561
605
  }
562
606
  ],
@@ -577,13 +621,18 @@
577
621
  "components": [
578
622
  {
579
623
  "internalType": "NftId",
580
- "name": "nftId",
624
+ "name": "productNftId",
625
+ "type": "uint96"
626
+ },
627
+ {
628
+ "internalType": "NftId",
629
+ "name": "bundleNftId",
581
630
  "type": "uint96"
582
631
  },
583
632
  {
584
- "internalType": "StateId",
585
- "name": "state",
586
- "type": "uint8"
633
+ "internalType": "address",
634
+ "name": "beneficiary",
635
+ "type": "address"
587
636
  },
588
637
  {
589
638
  "internalType": "uint256",
@@ -606,29 +655,29 @@
606
655
  "type": "uint256"
607
656
  },
608
657
  {
609
- "internalType": "uint256",
610
- "name": "createdAt",
611
- "type": "uint256"
658
+ "internalType": "bytes",
659
+ "name": "applicationData",
660
+ "type": "bytes"
612
661
  },
613
662
  {
614
- "internalType": "uint256",
615
- "name": "updatedAt",
616
- "type": "uint256"
663
+ "internalType": "bytes",
664
+ "name": "policyData",
665
+ "type": "bytes"
617
666
  },
618
667
  {
619
- "internalType": "uint256",
668
+ "internalType": "Timestamp",
620
669
  "name": "activatedAt",
621
- "type": "uint256"
670
+ "type": "uint40"
622
671
  },
623
672
  {
624
- "internalType": "uint256",
673
+ "internalType": "Timestamp",
625
674
  "name": "expiredAt",
626
- "type": "uint256"
675
+ "type": "uint40"
627
676
  },
628
677
  {
629
- "internalType": "uint256",
678
+ "internalType": "Timestamp",
630
679
  "name": "closedAt",
631
- "type": "uint256"
680
+ "type": "uint40"
632
681
  }
633
682
  ],
634
683
  "internalType": "struct IPolicy.PolicyInfo",
@@ -639,6 +688,25 @@
639
688
  "stateMutability": "view",
640
689
  "type": "function"
641
690
  },
691
+ {
692
+ "inputs": [
693
+ {
694
+ "internalType": "NftId",
695
+ "name": "nftId",
696
+ "type": "uint96"
697
+ }
698
+ ],
699
+ "name": "getPolicyState",
700
+ "outputs": [
701
+ {
702
+ "internalType": "StateId",
703
+ "name": "state",
704
+ "type": "uint8"
705
+ }
706
+ ],
707
+ "stateMutability": "view",
708
+ "type": "function"
709
+ },
642
710
  {
643
711
  "inputs": [
644
712
  {
@@ -652,18 +720,13 @@
652
720
  {
653
721
  "components": [
654
722
  {
655
- "internalType": "NftId",
656
- "name": "nftId",
657
- "type": "uint96"
658
- },
659
- {
660
- "internalType": "uint256",
661
- "name": "capital",
662
- "type": "uint256"
723
+ "internalType": "bool",
724
+ "name": "isVerifying",
725
+ "type": "bool"
663
726
  },
664
727
  {
665
- "internalType": "uint256",
666
- "name": "lockedCapital",
728
+ "internalType": "UFixed",
729
+ "name": "collateralizationLevel",
667
730
  "type": "uint256"
668
731
  }
669
732
  ],
@@ -675,66 +738,33 @@
675
738
  "stateMutability": "view",
676
739
  "type": "function"
677
740
  },
741
+ {
742
+ "inputs": [],
743
+ "name": "getPoolService",
744
+ "outputs": [
745
+ {
746
+ "internalType": "contract IPoolService",
747
+ "name": "",
748
+ "type": "address"
749
+ }
750
+ ],
751
+ "stateMutability": "view",
752
+ "type": "function"
753
+ },
678
754
  {
679
755
  "inputs": [
680
756
  {
681
757
  "internalType": "NftId",
682
- "name": "poolNftId",
758
+ "name": "componentNftId",
683
759
  "type": "uint96"
684
760
  }
685
761
  ],
686
- "name": "getPoolSetup",
762
+ "name": "getProductNftId",
687
763
  "outputs": [
688
764
  {
689
- "components": [
690
- {
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"
716
- },
717
- {
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"
733
- }
734
- ],
735
- "internalType": "struct ITreasuryModule.PoolSetup",
736
- "name": "setup",
737
- "type": "tuple"
765
+ "internalType": "NftId",
766
+ "name": "productNftId",
767
+ "type": "uint96"
738
768
  }
739
769
  ],
740
770
  "stateMutability": "view",
@@ -753,91 +783,6 @@
753
783
  "stateMutability": "view",
754
784
  "type": "function"
755
785
  },
756
- {
757
- "inputs": [
758
- {
759
- "internalType": "NftId",
760
- "name": "productNftId",
761
- "type": "uint96"
762
- }
763
- ],
764
- "name": "getProductSetup",
765
- "outputs": [
766
- {
767
- "components": [
768
- {
769
- "internalType": "NftId",
770
- "name": "productNftId",
771
- "type": "uint96"
772
- },
773
- {
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"
831
- }
832
- ],
833
- "internalType": "struct ITreasuryModule.ProductSetup",
834
- "name": "setup",
835
- "type": "tuple"
836
- }
837
- ],
838
- "stateMutability": "view",
839
- "type": "function"
840
- },
841
786
  {
842
787
  "inputs": [],
843
788
  "name": "getRegistry",
@@ -862,9 +807,9 @@
862
807
  "name": "getRole",
863
808
  "outputs": [
864
809
  {
865
- "internalType": "bytes32",
810
+ "internalType": "RoleId",
866
811
  "name": "role",
867
- "type": "bytes32"
812
+ "type": "bytes8"
868
813
  }
869
814
  ],
870
815
  "stateMutability": "view",
@@ -891,12 +836,12 @@
891
836
  "type": "string"
892
837
  }
893
838
  ],
894
- "name": "getRoleForName",
839
+ "name": "getRoleId",
895
840
  "outputs": [
896
841
  {
897
- "internalType": "bytes32",
842
+ "internalType": "RoleId",
898
843
  "name": "role",
899
- "type": "bytes32"
844
+ "type": "bytes8"
900
845
  }
901
846
  ],
902
847
  "stateMutability": "pure",
@@ -905,9 +850,9 @@
905
850
  {
906
851
  "inputs": [
907
852
  {
908
- "internalType": "bytes32",
853
+ "internalType": "RoleId",
909
854
  "name": "role",
910
- "type": "bytes32"
855
+ "type": "bytes8"
911
856
  }
912
857
  ],
913
858
  "name": "getRoleInfo",
@@ -915,9 +860,9 @@
915
860
  {
916
861
  "components": [
917
862
  {
918
- "internalType": "bytes32",
863
+ "internalType": "RoleId",
919
864
  "name": "id",
920
- "type": "bytes32"
865
+ "type": "bytes8"
921
866
  },
922
867
  {
923
868
  "internalType": "string",
@@ -941,9 +886,9 @@
941
886
  {
942
887
  "inputs": [
943
888
  {
944
- "internalType": "bytes32",
889
+ "internalType": "RoleId",
945
890
  "name": "role",
946
- "type": "bytes32"
891
+ "type": "bytes8"
947
892
  },
948
893
  {
949
894
  "internalType": "uint256",
@@ -955,7 +900,7 @@
955
900
  "outputs": [
956
901
  {
957
902
  "internalType": "address",
958
- "name": "roleMembers",
903
+ "name": "roleMember",
959
904
  "type": "address"
960
905
  }
961
906
  ],
@@ -965,9 +910,9 @@
965
910
  {
966
911
  "inputs": [
967
912
  {
968
- "internalType": "bytes32",
913
+ "internalType": "RoleId",
969
914
  "name": "role",
970
- "type": "bytes32"
915
+ "type": "bytes8"
971
916
  }
972
917
  ],
973
918
  "name": "getRoleMemberCount",
@@ -985,7 +930,7 @@
985
930
  "inputs": [
986
931
  {
987
932
  "internalType": "NftId",
988
- "name": "productNftId",
933
+ "name": "componentNftId",
989
934
  "type": "uint96"
990
935
  }
991
936
  ],
@@ -1001,68 +946,177 @@
1001
946
  "type": "function"
1002
947
  },
1003
948
  {
1004
- "inputs": [],
1005
- "name": "getType",
949
+ "inputs": [
950
+ {
951
+ "internalType": "NftId",
952
+ "name": "productNftId",
953
+ "type": "uint96"
954
+ }
955
+ ],
956
+ "name": "getTreasuryInfo",
1006
957
  "outputs": [
1007
958
  {
1008
- "internalType": "ObjectType",
1009
- "name": "objectType",
1010
- "type": "uint8"
959
+ "components": [
960
+ {
961
+ "internalType": "NftId",
962
+ "name": "compensationNftId",
963
+ "type": "uint96"
964
+ },
965
+ {
966
+ "internalType": "NftId",
967
+ "name": "poolNftId",
968
+ "type": "uint96"
969
+ },
970
+ {
971
+ "internalType": "contract IERC20Metadata",
972
+ "name": "token",
973
+ "type": "address"
974
+ },
975
+ {
976
+ "components": [
977
+ {
978
+ "internalType": "UFixed",
979
+ "name": "fractionalFee",
980
+ "type": "uint256"
981
+ },
982
+ {
983
+ "internalType": "uint256",
984
+ "name": "fixedFee",
985
+ "type": "uint256"
986
+ }
987
+ ],
988
+ "internalType": "struct Fee",
989
+ "name": "commissionFee",
990
+ "type": "tuple"
991
+ },
992
+ {
993
+ "components": [
994
+ {
995
+ "internalType": "UFixed",
996
+ "name": "fractionalFee",
997
+ "type": "uint256"
998
+ },
999
+ {
1000
+ "internalType": "uint256",
1001
+ "name": "fixedFee",
1002
+ "type": "uint256"
1003
+ }
1004
+ ],
1005
+ "internalType": "struct Fee",
1006
+ "name": "policyFee",
1007
+ "type": "tuple"
1008
+ },
1009
+ {
1010
+ "components": [
1011
+ {
1012
+ "internalType": "UFixed",
1013
+ "name": "fractionalFee",
1014
+ "type": "uint256"
1015
+ },
1016
+ {
1017
+ "internalType": "uint256",
1018
+ "name": "fixedFee",
1019
+ "type": "uint256"
1020
+ }
1021
+ ],
1022
+ "internalType": "struct Fee",
1023
+ "name": "processingFee",
1024
+ "type": "tuple"
1025
+ },
1026
+ {
1027
+ "components": [
1028
+ {
1029
+ "internalType": "UFixed",
1030
+ "name": "fractionalFee",
1031
+ "type": "uint256"
1032
+ },
1033
+ {
1034
+ "internalType": "uint256",
1035
+ "name": "fixedFee",
1036
+ "type": "uint256"
1037
+ }
1038
+ ],
1039
+ "internalType": "struct Fee",
1040
+ "name": "stakingFee",
1041
+ "type": "tuple"
1042
+ },
1043
+ {
1044
+ "components": [
1045
+ {
1046
+ "internalType": "UFixed",
1047
+ "name": "fractionalFee",
1048
+ "type": "uint256"
1049
+ },
1050
+ {
1051
+ "internalType": "uint256",
1052
+ "name": "fixedFee",
1053
+ "type": "uint256"
1054
+ }
1055
+ ],
1056
+ "internalType": "struct Fee",
1057
+ "name": "performanceFee",
1058
+ "type": "tuple"
1059
+ }
1060
+ ],
1061
+ "internalType": "struct ITreasury.TreasuryInfo",
1062
+ "name": "info",
1063
+ "type": "tuple"
1011
1064
  }
1012
1065
  ],
1013
1066
  "stateMutability": "view",
1014
1067
  "type": "function"
1015
1068
  },
1016
1069
  {
1017
- "inputs": [
1018
- {
1019
- "internalType": "bytes32",
1020
- "name": "role",
1021
- "type": "bytes32"
1022
- },
1070
+ "inputs": [],
1071
+ "name": "getType",
1072
+ "outputs": [
1023
1073
  {
1024
- "internalType": "address",
1025
- "name": "member",
1026
- "type": "address"
1074
+ "internalType": "ObjectType",
1075
+ "name": "objectType",
1076
+ "type": "uint8"
1027
1077
  }
1028
1078
  ],
1029
- "name": "grantRole",
1030
- "outputs": [],
1031
- "stateMutability": "nonpayable",
1079
+ "stateMutability": "pure",
1032
1080
  "type": "function"
1033
1081
  },
1034
1082
  {
1035
1083
  "inputs": [
1036
1084
  {
1037
- "internalType": "bytes32",
1038
- "name": "role",
1039
- "type": "bytes32"
1085
+ "internalType": "uint256",
1086
+ "name": "a",
1087
+ "type": "uint256"
1040
1088
  },
1041
1089
  {
1042
- "internalType": "address",
1043
- "name": "member",
1044
- "type": "address"
1090
+ "internalType": "int8",
1091
+ "name": "exp",
1092
+ "type": "int8"
1045
1093
  }
1046
1094
  ],
1047
- "name": "hasRole",
1095
+ "name": "getUFixed",
1048
1096
  "outputs": [
1049
1097
  {
1050
- "internalType": "bool",
1098
+ "internalType": "UFixed",
1051
1099
  "name": "",
1052
- "type": "bool"
1100
+ "type": "uint256"
1053
1101
  }
1054
1102
  ],
1055
- "stateMutability": "view",
1103
+ "stateMutability": "pure",
1056
1104
  "type": "function"
1057
1105
  },
1058
1106
  {
1059
- "inputs": [],
1060
- "name": "isRegisterable",
1061
- "outputs": [
1107
+ "inputs": [
1062
1108
  {
1063
- "internalType": "bool",
1109
+ "internalType": "uint256",
1110
+ "name": "a",
1111
+ "type": "uint256"
1112
+ }
1113
+ ],
1114
+ "name": "getUFixed",
1115
+ "outputs": [
1116
+ {
1117
+ "internalType": "UFixed",
1064
1118
  "name": "",
1065
- "type": "bool"
1119
+ "type": "uint256"
1066
1120
  }
1067
1121
  ],
1068
1122
  "stateMutability": "pure",
@@ -1070,41 +1124,44 @@
1070
1124
  },
1071
1125
  {
1072
1126
  "inputs": [],
1073
- "name": "isRegistered",
1127
+ "name": "getVersion",
1074
1128
  "outputs": [
1075
1129
  {
1076
- "internalType": "bool",
1130
+ "internalType": "Version",
1077
1131
  "name": "",
1078
- "type": "bool"
1132
+ "type": "uint24"
1079
1133
  }
1080
1134
  ],
1081
- "stateMutability": "view",
1135
+ "stateMutability": "pure",
1082
1136
  "type": "function"
1083
1137
  },
1084
1138
  {
1085
1139
  "inputs": [
1086
1140
  {
1087
- "internalType": "ObjectType",
1088
- "name": "objectType",
1089
- "type": "uint8"
1090
- },
1091
- {
1092
- "internalType": "StateId",
1093
- "name": "fromId",
1094
- "type": "uint8"
1095
- },
1141
+ "internalType": "uint256",
1142
+ "name": "index",
1143
+ "type": "uint256"
1144
+ }
1145
+ ],
1146
+ "name": "getVersion",
1147
+ "outputs": [
1096
1148
  {
1097
- "internalType": "StateId",
1098
- "name": "toId",
1099
- "type": "uint8"
1149
+ "internalType": "Version",
1150
+ "name": "version",
1151
+ "type": "uint24"
1100
1152
  }
1101
1153
  ],
1102
- "name": "isValidTransition",
1154
+ "stateMutability": "view",
1155
+ "type": "function"
1156
+ },
1157
+ {
1158
+ "inputs": [],
1159
+ "name": "getVersionCount",
1103
1160
  "outputs": [
1104
1161
  {
1105
- "internalType": "bool",
1106
- "name": "",
1107
- "type": "bool"
1162
+ "internalType": "uint256",
1163
+ "name": "numberOfVersions",
1164
+ "type": "uint256"
1108
1165
  }
1109
1166
  ],
1110
1167
  "stateMutability": "view",
@@ -1113,56 +1170,138 @@
1113
1170
  {
1114
1171
  "inputs": [
1115
1172
  {
1116
- "internalType": "NftId",
1117
- "name": "nftId",
1118
- "type": "uint96"
1173
+ "internalType": "Version",
1174
+ "name": "version",
1175
+ "type": "uint24"
1119
1176
  }
1120
1177
  ],
1121
- "name": "processPremium",
1122
- "outputs": [],
1123
- "stateMutability": "nonpayable",
1178
+ "name": "getVersionInfo",
1179
+ "outputs": [
1180
+ {
1181
+ "components": [
1182
+ {
1183
+ "internalType": "Version",
1184
+ "name": "version",
1185
+ "type": "uint24"
1186
+ },
1187
+ {
1188
+ "internalType": "address",
1189
+ "name": "implementation",
1190
+ "type": "address"
1191
+ },
1192
+ {
1193
+ "internalType": "address",
1194
+ "name": "activatedBy",
1195
+ "type": "address"
1196
+ },
1197
+ {
1198
+ "internalType": "Timestamp",
1199
+ "name": "activatedAt",
1200
+ "type": "uint40"
1201
+ },
1202
+ {
1203
+ "internalType": "Blocknumber",
1204
+ "name": "activatedIn",
1205
+ "type": "uint32"
1206
+ }
1207
+ ],
1208
+ "internalType": "struct IVersionable.VersionInfo",
1209
+ "name": "versionInfo",
1210
+ "type": "tuple"
1211
+ }
1212
+ ],
1213
+ "stateMutability": "view",
1214
+ "type": "function"
1215
+ },
1216
+ {
1217
+ "inputs": [],
1218
+ "name": "getZeroFee",
1219
+ "outputs": [
1220
+ {
1221
+ "components": [
1222
+ {
1223
+ "internalType": "UFixed",
1224
+ "name": "fractionalFee",
1225
+ "type": "uint256"
1226
+ },
1227
+ {
1228
+ "internalType": "uint256",
1229
+ "name": "fixedFee",
1230
+ "type": "uint256"
1231
+ }
1232
+ ],
1233
+ "internalType": "struct Fee",
1234
+ "name": "fee",
1235
+ "type": "tuple"
1236
+ }
1237
+ ],
1238
+ "stateMutability": "view",
1124
1239
  "type": "function"
1125
1240
  },
1126
1241
  {
1127
1242
  "inputs": [
1128
1243
  {
1129
- "internalType": "NftId",
1130
- "name": "policyNftId",
1131
- "type": "uint96"
1244
+ "internalType": "RoleId",
1245
+ "name": "role",
1246
+ "type": "bytes8"
1132
1247
  },
1133
1248
  {
1134
- "internalType": "NftId",
1135
- "name": "productNftId",
1136
- "type": "uint96"
1249
+ "internalType": "address",
1250
+ "name": "member",
1251
+ "type": "address"
1137
1252
  }
1138
1253
  ],
1139
- "name": "processPremium",
1254
+ "name": "grantRole",
1140
1255
  "outputs": [],
1141
1256
  "stateMutability": "nonpayable",
1142
1257
  "type": "function"
1143
1258
  },
1144
1259
  {
1145
- "inputs": [],
1146
- "name": "register",
1260
+ "inputs": [
1261
+ {
1262
+ "internalType": "RoleId",
1263
+ "name": "role",
1264
+ "type": "bytes8"
1265
+ },
1266
+ {
1267
+ "internalType": "address",
1268
+ "name": "member",
1269
+ "type": "address"
1270
+ }
1271
+ ],
1272
+ "name": "hasRole",
1147
1273
  "outputs": [
1148
1274
  {
1149
- "internalType": "NftId",
1150
- "name": "nftId",
1151
- "type": "uint96"
1275
+ "internalType": "bool",
1276
+ "name": "",
1277
+ "type": "bool"
1152
1278
  }
1153
1279
  ],
1154
- "stateMutability": "nonpayable",
1280
+ "stateMutability": "view",
1155
1281
  "type": "function"
1156
1282
  },
1157
1283
  {
1158
1284
  "inputs": [
1159
1285
  {
1160
- "internalType": "contract IComponentContract",
1161
- "name": "component",
1162
- "type": "address"
1286
+ "internalType": "Version",
1287
+ "name": "version",
1288
+ "type": "uint24"
1163
1289
  }
1164
1290
  ],
1165
- "name": "registerComponent",
1291
+ "name": "isActivated",
1292
+ "outputs": [
1293
+ {
1294
+ "internalType": "bool",
1295
+ "name": "",
1296
+ "type": "bool"
1297
+ }
1298
+ ],
1299
+ "stateMutability": "view",
1300
+ "type": "function"
1301
+ },
1302
+ {
1303
+ "inputs": [],
1304
+ "name": "register",
1166
1305
  "outputs": [
1167
1306
  {
1168
1307
  "internalType": "NftId",
@@ -1179,9 +1318,19 @@
1179
1318
  "internalType": "NftId",
1180
1319
  "name": "nftId",
1181
1320
  "type": "uint96"
1321
+ },
1322
+ {
1323
+ "internalType": "contract IERC20Metadata",
1324
+ "name": "token",
1325
+ "type": "address"
1326
+ },
1327
+ {
1328
+ "internalType": "address",
1329
+ "name": "wallet",
1330
+ "type": "address"
1182
1331
  }
1183
1332
  ],
1184
- "name": "registerPool",
1333
+ "name": "registerComponent",
1185
1334
  "outputs": [],
1186
1335
  "stateMutability": "nonpayable",
1187
1336
  "type": "function"
@@ -1194,43 +1343,14 @@
1194
1343
  "type": "uint96"
1195
1344
  },
1196
1345
  {
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"
1346
+ "internalType": "bool",
1347
+ "name": "isVerifying",
1348
+ "type": "bool"
1217
1349
  },
1218
1350
  {
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"
1351
+ "internalType": "UFixed",
1352
+ "name": "collateralizationLevel",
1353
+ "type": "uint256"
1234
1354
  }
1235
1355
  ],
1236
1356
  "name": "registerPool",
@@ -1256,15 +1376,10 @@
1256
1376
  "type": "uint96"
1257
1377
  },
1258
1378
  {
1259
- "internalType": "contract IERC20",
1379
+ "internalType": "contract IERC20Metadata",
1260
1380
  "name": "token",
1261
1381
  "type": "address"
1262
1382
  },
1263
- {
1264
- "internalType": "address",
1265
- "name": "wallet",
1266
- "type": "address"
1267
- },
1268
1383
  {
1269
1384
  "components": [
1270
1385
  {
@@ -1298,73 +1413,6 @@
1298
1413
  "internalType": "struct Fee",
1299
1414
  "name": "processingFee",
1300
1415
  "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
1416
  },
1369
1417
  {
1370
1418
  "components": [
@@ -1401,7 +1449,7 @@
1401
1449
  "type": "tuple"
1402
1450
  }
1403
1451
  ],
1404
- "name": "setPoolFees",
1452
+ "name": "registerProductSetup",
1405
1453
  "outputs": [],
1406
1454
  "stateMutability": "nonpayable",
1407
1455
  "type": "function"
@@ -1410,45 +1458,212 @@
1410
1458
  "inputs": [
1411
1459
  {
1412
1460
  "internalType": "NftId",
1413
- "name": "productNftId",
1461
+ "name": "bundleNftId",
1414
1462
  "type": "uint96"
1415
1463
  },
1416
1464
  {
1417
- "components": [
1418
- {
1419
- "internalType": "UFixed",
1420
- "name": "fractionalFee",
1465
+ "internalType": "NftId",
1466
+ "name": "policyNftId",
1467
+ "type": "uint96"
1468
+ }
1469
+ ],
1470
+ "name": "releasePolicy",
1471
+ "outputs": [
1472
+ {
1473
+ "internalType": "uint256",
1474
+ "name": "collateralAmount",
1475
+ "type": "uint256"
1476
+ }
1477
+ ],
1478
+ "stateMutability": "nonpayable",
1479
+ "type": "function"
1480
+ },
1481
+ {
1482
+ "inputs": [
1483
+ {
1484
+ "internalType": "RoleId",
1485
+ "name": "role",
1486
+ "type": "bytes8"
1487
+ },
1488
+ {
1489
+ "internalType": "address",
1490
+ "name": "member",
1491
+ "type": "address"
1492
+ }
1493
+ ],
1494
+ "name": "revokeRole",
1495
+ "outputs": [],
1496
+ "stateMutability": "nonpayable",
1497
+ "type": "function"
1498
+ },
1499
+ {
1500
+ "inputs": [
1501
+ {
1502
+ "internalType": "RoleId",
1503
+ "name": "role",
1504
+ "type": "bytes8"
1505
+ }
1506
+ ],
1507
+ "name": "roleExists",
1508
+ "outputs": [
1509
+ {
1510
+ "internalType": "bool",
1511
+ "name": "",
1512
+ "type": "bool"
1513
+ }
1514
+ ],
1515
+ "stateMutability": "view",
1516
+ "type": "function"
1517
+ },
1518
+ {
1519
+ "inputs": [
1520
+ {
1521
+ "internalType": "NftId",
1522
+ "name": "nftId",
1523
+ "type": "uint96"
1524
+ },
1525
+ {
1526
+ "components": [
1527
+ {
1528
+ "internalType": "NftId",
1529
+ "name": "poolNftId",
1530
+ "type": "uint96"
1531
+ },
1532
+ {
1533
+ "internalType": "bytes",
1534
+ "name": "filter",
1535
+ "type": "bytes"
1536
+ },
1537
+ {
1538
+ "internalType": "uint256",
1539
+ "name": "capitalAmount",
1421
1540
  "type": "uint256"
1422
1541
  },
1423
1542
  {
1424
1543
  "internalType": "uint256",
1425
- "name": "fixedFee",
1544
+ "name": "lockedAmount",
1545
+ "type": "uint256"
1546
+ },
1547
+ {
1548
+ "internalType": "uint256",
1549
+ "name": "balanceAmount",
1426
1550
  "type": "uint256"
1551
+ },
1552
+ {
1553
+ "internalType": "Timestamp",
1554
+ "name": "expiredAt",
1555
+ "type": "uint40"
1556
+ },
1557
+ {
1558
+ "internalType": "Timestamp",
1559
+ "name": "closedAt",
1560
+ "type": "uint40"
1427
1561
  }
1428
1562
  ],
1429
- "internalType": "struct Fee",
1430
- "name": "policyFee",
1563
+ "internalType": "struct IBundle.BundleInfo",
1564
+ "name": "bundleInfo",
1431
1565
  "type": "tuple"
1566
+ }
1567
+ ],
1568
+ "name": "setBundleInfo",
1569
+ "outputs": [],
1570
+ "stateMutability": "nonpayable",
1571
+ "type": "function"
1572
+ },
1573
+ {
1574
+ "inputs": [
1575
+ {
1576
+ "internalType": "NftId",
1577
+ "name": "policyNftId",
1578
+ "type": "uint96"
1432
1579
  },
1433
1580
  {
1434
1581
  "components": [
1435
1582
  {
1436
- "internalType": "UFixed",
1437
- "name": "fractionalFee",
1583
+ "internalType": "NftId",
1584
+ "name": "productNftId",
1585
+ "type": "uint96"
1586
+ },
1587
+ {
1588
+ "internalType": "NftId",
1589
+ "name": "bundleNftId",
1590
+ "type": "uint96"
1591
+ },
1592
+ {
1593
+ "internalType": "address",
1594
+ "name": "beneficiary",
1595
+ "type": "address"
1596
+ },
1597
+ {
1598
+ "internalType": "uint256",
1599
+ "name": "sumInsuredAmount",
1438
1600
  "type": "uint256"
1439
1601
  },
1440
1602
  {
1441
1603
  "internalType": "uint256",
1442
- "name": "fixedFee",
1604
+ "name": "premiumAmount",
1605
+ "type": "uint256"
1606
+ },
1607
+ {
1608
+ "internalType": "uint256",
1609
+ "name": "premiumPaidAmount",
1610
+ "type": "uint256"
1611
+ },
1612
+ {
1613
+ "internalType": "uint256",
1614
+ "name": "lifetime",
1443
1615
  "type": "uint256"
1616
+ },
1617
+ {
1618
+ "internalType": "bytes",
1619
+ "name": "applicationData",
1620
+ "type": "bytes"
1621
+ },
1622
+ {
1623
+ "internalType": "bytes",
1624
+ "name": "policyData",
1625
+ "type": "bytes"
1626
+ },
1627
+ {
1628
+ "internalType": "Timestamp",
1629
+ "name": "activatedAt",
1630
+ "type": "uint40"
1631
+ },
1632
+ {
1633
+ "internalType": "Timestamp",
1634
+ "name": "expiredAt",
1635
+ "type": "uint40"
1636
+ },
1637
+ {
1638
+ "internalType": "Timestamp",
1639
+ "name": "closedAt",
1640
+ "type": "uint40"
1444
1641
  }
1445
1642
  ],
1446
- "internalType": "struct Fee",
1447
- "name": "processingFee",
1643
+ "internalType": "struct IPolicy.PolicyInfo",
1644
+ "name": "info",
1448
1645
  "type": "tuple"
1449
1646
  }
1450
1647
  ],
1451
- "name": "setProductFees",
1648
+ "name": "setPolicyInfo",
1649
+ "outputs": [],
1650
+ "stateMutability": "nonpayable",
1651
+ "type": "function"
1652
+ },
1653
+ {
1654
+ "inputs": [
1655
+ {
1656
+ "internalType": "RoleId",
1657
+ "name": "role",
1658
+ "type": "bytes8"
1659
+ },
1660
+ {
1661
+ "internalType": "bool",
1662
+ "name": "active",
1663
+ "type": "bool"
1664
+ }
1665
+ ],
1666
+ "name": "setRoleState",
1452
1667
  "outputs": [],
1453
1668
  "stateMutability": "nonpayable",
1454
1669
  "type": "function"
@@ -1457,16 +1672,191 @@
1457
1672
  "inputs": [
1458
1673
  {
1459
1674
  "internalType": "NftId",
1460
- "name": "policyNftId",
1675
+ "name": "productNftId",
1676
+ "type": "uint96"
1677
+ },
1678
+ {
1679
+ "components": [
1680
+ {
1681
+ "internalType": "NftId",
1682
+ "name": "compensationNftId",
1683
+ "type": "uint96"
1684
+ },
1685
+ {
1686
+ "internalType": "NftId",
1687
+ "name": "poolNftId",
1688
+ "type": "uint96"
1689
+ },
1690
+ {
1691
+ "internalType": "contract IERC20Metadata",
1692
+ "name": "token",
1693
+ "type": "address"
1694
+ },
1695
+ {
1696
+ "components": [
1697
+ {
1698
+ "internalType": "UFixed",
1699
+ "name": "fractionalFee",
1700
+ "type": "uint256"
1701
+ },
1702
+ {
1703
+ "internalType": "uint256",
1704
+ "name": "fixedFee",
1705
+ "type": "uint256"
1706
+ }
1707
+ ],
1708
+ "internalType": "struct Fee",
1709
+ "name": "commissionFee",
1710
+ "type": "tuple"
1711
+ },
1712
+ {
1713
+ "components": [
1714
+ {
1715
+ "internalType": "UFixed",
1716
+ "name": "fractionalFee",
1717
+ "type": "uint256"
1718
+ },
1719
+ {
1720
+ "internalType": "uint256",
1721
+ "name": "fixedFee",
1722
+ "type": "uint256"
1723
+ }
1724
+ ],
1725
+ "internalType": "struct Fee",
1726
+ "name": "policyFee",
1727
+ "type": "tuple"
1728
+ },
1729
+ {
1730
+ "components": [
1731
+ {
1732
+ "internalType": "UFixed",
1733
+ "name": "fractionalFee",
1734
+ "type": "uint256"
1735
+ },
1736
+ {
1737
+ "internalType": "uint256",
1738
+ "name": "fixedFee",
1739
+ "type": "uint256"
1740
+ }
1741
+ ],
1742
+ "internalType": "struct Fee",
1743
+ "name": "processingFee",
1744
+ "type": "tuple"
1745
+ },
1746
+ {
1747
+ "components": [
1748
+ {
1749
+ "internalType": "UFixed",
1750
+ "name": "fractionalFee",
1751
+ "type": "uint256"
1752
+ },
1753
+ {
1754
+ "internalType": "uint256",
1755
+ "name": "fixedFee",
1756
+ "type": "uint256"
1757
+ }
1758
+ ],
1759
+ "internalType": "struct Fee",
1760
+ "name": "stakingFee",
1761
+ "type": "tuple"
1762
+ },
1763
+ {
1764
+ "components": [
1765
+ {
1766
+ "internalType": "UFixed",
1767
+ "name": "fractionalFee",
1768
+ "type": "uint256"
1769
+ },
1770
+ {
1771
+ "internalType": "uint256",
1772
+ "name": "fixedFee",
1773
+ "type": "uint256"
1774
+ }
1775
+ ],
1776
+ "internalType": "struct Fee",
1777
+ "name": "performanceFee",
1778
+ "type": "tuple"
1779
+ }
1780
+ ],
1781
+ "internalType": "struct ITreasury.TreasuryInfo",
1782
+ "name": "info",
1783
+ "type": "tuple"
1784
+ }
1785
+ ],
1786
+ "name": "setTreasuryInfo",
1787
+ "outputs": [],
1788
+ "stateMutability": "nonpayable",
1789
+ "type": "function"
1790
+ },
1791
+ {
1792
+ "inputs": [
1793
+ {
1794
+ "internalType": "bytes4",
1795
+ "name": "interfaceId",
1796
+ "type": "bytes4"
1797
+ }
1798
+ ],
1799
+ "name": "supportsInterface",
1800
+ "outputs": [
1801
+ {
1802
+ "internalType": "bool",
1803
+ "name": "",
1804
+ "type": "bool"
1805
+ }
1806
+ ],
1807
+ "stateMutability": "view",
1808
+ "type": "function"
1809
+ },
1810
+ {
1811
+ "inputs": [
1812
+ {
1813
+ "internalType": "NftId",
1814
+ "name": "nftId",
1461
1815
  "type": "uint96"
1462
1816
  },
1817
+ {
1818
+ "internalType": "StateId",
1819
+ "name": "state",
1820
+ "type": "uint8"
1821
+ }
1822
+ ],
1823
+ "name": "updateBundleState",
1824
+ "outputs": [],
1825
+ "stateMutability": "nonpayable",
1826
+ "type": "function"
1827
+ },
1828
+ {
1829
+ "inputs": [
1463
1830
  {
1464
1831
  "internalType": "NftId",
1465
- "name": "productNftId",
1832
+ "name": "nftId",
1466
1833
  "type": "uint96"
1834
+ },
1835
+ {
1836
+ "internalType": "StateId",
1837
+ "name": "state",
1838
+ "type": "uint8"
1839
+ }
1840
+ ],
1841
+ "name": "updatePolicyState",
1842
+ "outputs": [],
1843
+ "stateMutability": "nonpayable",
1844
+ "type": "function"
1845
+ },
1846
+ {
1847
+ "inputs": [
1848
+ {
1849
+ "internalType": "Key32",
1850
+ "name": "key",
1851
+ "type": "bytes32"
1852
+ },
1853
+ {
1854
+ "internalType": "StateId",
1855
+ "name": "state",
1856
+ "type": "uint8"
1467
1857
  }
1468
1858
  ],
1469
- "name": "underwrite",
1859
+ "name": "updateState",
1470
1860
  "outputs": [],
1471
1861
  "stateMutability": "nonpayable",
1472
1862
  "type": "function"