@etherisc/gif-next 0.0.2-f74fcad-685 → 0.0.2-f7b8c9f-436

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