@etherisc/gif-next 0.0.2-f9905e1 → 0.0.2-f9bc4c7-556

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