@etherisc/gif-next 0.0.2-c40f9a5 → 0.0.2-c576a00-897

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