@etherisc/gif-next 0.0.2-6f2f76e-746 → 0.0.2-719a8f1-103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/README.md +73 -11
  2. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +1 -1
  3. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +80 -41
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +445 -0
  6. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +1 -1
  7. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +43 -40
  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 +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +108 -156
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +67 -139
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +299 -84
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +250 -53
  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 +793 -638
  40. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +1 -1
  41. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  42. package/artifacts/contracts/instance/Instance.sol/Instance.json +1022 -716
  43. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
  44. package/artifacts/contracts/instance/{InstanceBase.sol/InstanceBase.json → base/ComponentServiceBase.sol/ComponentServiceBase.json} +145 -65
  45. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
  46. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +113 -0
  47. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
  48. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +560 -0
  49. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
  50. package/artifacts/contracts/instance/{module/lifecycle/ILifecycle.sol/ILifecycleModule.json → base/ILifecycle.sol/ILifecycle.json} +10 -77
  51. package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +4 -0
  52. package/artifacts/contracts/instance/{service → base}/IService.sol/IService.json +100 -56
  53. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +4 -0
  54. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +456 -0
  55. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
  56. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +710 -0
  57. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
  58. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +169 -0
  59. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +4 -0
  60. package/artifacts/contracts/instance/{module/compensation/ICompensation.sol/ICompensation.json → base/ModuleBase.sol/ModuleBase.json} +2 -2
  61. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +4 -0
  62. package/artifacts/contracts/instance/{service → base}/ServiceBase.sol/ServiceBase.json +136 -56
  63. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +1 -1
  64. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +1 -1
  65. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +1 -1
  66. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +1 -1
  67. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +71 -50
  68. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +1 -1
  69. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +1 -1
  70. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +71 -50
  71. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
  72. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +22 -93
  73. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +1 -1
  74. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +1 -1
  75. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +22 -93
  76. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +4 -0
  77. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +10 -0
  78. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +4 -0
  79. package/artifacts/contracts/instance/module/{compensation/ICompensation.sol/ICompensationModule.json → distribution/IDistribution.sol/IDistribution.json} +2 -2
  80. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +4 -0
  81. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.json +10 -0
  82. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
  83. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
  84. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +61 -38
  85. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
  86. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +61 -38
  87. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +1 -1
  88. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
  89. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +29 -14
  90. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
  91. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +28 -13
  92. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +1 -1
  93. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +1 -1
  94. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +104 -1
  95. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +1 -1
  96. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +126 -5
  97. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +1 -1
  98. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +1 -1
  99. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +326 -221
  100. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  101. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +2 -2
  102. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +1 -1
  103. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +326 -221
  104. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +1 -1
  105. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +271 -72
  106. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  107. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +526 -0
  108. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +1 -1
  109. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +99 -74
  110. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
  111. package/artifacts/contracts/instance/service/{ComponentServiceBase.sol/ComponentServiceBase.json → IDistributionService.sol/IDistributionService.json} +125 -56
  112. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  113. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +158 -50
  114. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  115. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +246 -49
  116. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  117. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +230 -52
  118. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  119. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +361 -70
  120. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  121. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +141 -12
  122. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
  123. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +5 -0
  124. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  125. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +293 -40
  126. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
  127. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +668 -0
  128. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
  129. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +34 -0
  130. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  131. package/artifacts/contracts/registry/Registry.sol/Registry.json +483 -120
  132. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
  133. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +885 -0
  134. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
  135. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +460 -0
  136. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +4 -0
  137. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.json +107 -0
  138. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  139. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +2 -2
  140. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +1 -1
  141. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  142. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +43 -40
  143. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  144. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +55 -14
  145. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +4 -0
  146. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +132 -0
  147. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
  148. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +344 -0
  149. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  150. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +76 -37
  151. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
  152. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
  153. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  154. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +78 -14
  155. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
  156. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +445 -0
  157. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  158. package/artifacts/contracts/test/TestFee.sol/TestFee.json +2 -2
  159. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +1 -1
  160. package/artifacts/contracts/test/TestPool.sol/TestPool.json +299 -84
  161. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +1 -1
  162. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +297 -58
  163. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  164. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +93 -39
  165. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  166. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +38 -4
  167. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  168. package/artifacts/contracts/test/TestService.sol/TestService.json +161 -68
  169. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  170. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  171. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +2 -2
  172. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  173. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +89 -25
  174. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
  175. package/artifacts/contracts/test/Usdc.sol/USDC.json +338 -0
  176. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  177. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  178. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  179. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  180. package/artifacts/contracts/types/Fee.sol/FeeLib.json +50 -11
  181. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
  182. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +111 -0
  183. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  184. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +65 -4
  185. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  186. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
  187. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  188. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  189. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
  190. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
  191. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  192. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  193. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
  194. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +30 -0
  195. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  196. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  197. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  198. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
  199. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +34 -8
  200. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  201. package/artifacts/contracts/types/Version.sol/VersionLib.json +40 -2
  202. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  203. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
  204. package/contracts/components/BaseComponent.sol +12 -22
  205. package/contracts/components/Distribution.sol +155 -0
  206. package/contracts/components/IBaseComponent.sol +2 -2
  207. package/contracts/components/IDistributionComponent.sol +46 -0
  208. package/contracts/components/IPoolComponent.sol +15 -8
  209. package/contracts/components/IProductComponent.sol +26 -8
  210. package/contracts/components/Pool.sol +99 -27
  211. package/contracts/components/Product.sol +204 -22
  212. package/contracts/instance/IInstance.sol +17 -16
  213. package/contracts/instance/Instance.sol +32 -13
  214. package/contracts/instance/{service → base}/ComponentServiceBase.sol +13 -5
  215. package/contracts/instance/base/IInstanceBase.sol +23 -0
  216. package/contracts/instance/base/IKeyValueStore.sol +50 -0
  217. package/contracts/instance/base/ILifecycle.sol +30 -0
  218. package/contracts/instance/base/InstanceBase.sol +89 -0
  219. package/contracts/instance/base/KeyValueStore.sol +161 -0
  220. package/contracts/instance/{module/lifecycle/LifecycleModule.sol → base/Lifecycle.sol} +50 -39
  221. package/contracts/instance/base/ModuleBase.sol +57 -0
  222. package/contracts/instance/base/ServiceBase.sol +43 -0
  223. package/contracts/instance/module/access/Access.sol +6 -6
  224. package/contracts/instance/module/bundle/BundleModule.sol +24 -118
  225. package/contracts/instance/module/bundle/IBundle.sol +9 -9
  226. package/contracts/instance/module/component/ComponentModule.sol +32 -64
  227. package/contracts/instance/module/component/IComponent.sol +7 -32
  228. package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
  229. package/contracts/instance/module/distribution/IDistribution.sol +10 -0
  230. package/contracts/instance/module/policy/IPolicy.sol +12 -9
  231. package/contracts/instance/module/policy/PolicyModule.sol +33 -26
  232. package/contracts/instance/module/pool/IPoolModule.sol +4 -4
  233. package/contracts/instance/module/pool/PoolModule.sol +23 -15
  234. package/contracts/instance/module/risk/IRisk.sol +18 -2
  235. package/contracts/instance/module/risk/RiskModule.sol +56 -2
  236. package/contracts/instance/module/treasury/ITreasury.sol +32 -51
  237. package/contracts/instance/module/treasury/TokenHandler.sol +2 -2
  238. package/contracts/instance/module/treasury/TreasuryModule.sol +68 -89
  239. package/contracts/instance/service/ComponentOwnerService.sol +197 -96
  240. package/contracts/instance/service/DistributionService.sol +54 -0
  241. package/contracts/instance/service/IComponentOwnerService.sol +1 -3
  242. package/contracts/instance/service/IDistributionService.sol +12 -0
  243. package/contracts/instance/service/IPoolService.sol +8 -1
  244. package/contracts/instance/service/IProductService.sol +56 -7
  245. package/contracts/instance/service/PoolService.sol +50 -24
  246. package/contracts/instance/service/ProductService.sol +249 -94
  247. package/contracts/registry/ChainNft.sol +43 -15
  248. package/contracts/registry/IChainNft.sol +3 -2
  249. package/contracts/registry/IRegistry.sol +44 -28
  250. package/contracts/registry/IRegistryService.sol +29 -0
  251. package/contracts/registry/ITransferInterceptor.sol +6 -0
  252. package/contracts/registry/Registry.sol +384 -275
  253. package/contracts/registry/RegistryService.sol +375 -0
  254. package/contracts/registry/RegistryServiceManager.sol +52 -0
  255. package/contracts/shared/ContractDeployerLib.sol +72 -0
  256. package/contracts/shared/ERC165.sol +1 -1
  257. package/contracts/shared/IRegisterable.sol +7 -9
  258. package/contracts/shared/IVersionable.sol +55 -11
  259. package/contracts/shared/NftOwnable.sol +87 -0
  260. package/contracts/shared/ProxyManager.sol +103 -0
  261. package/contracts/shared/Registerable.sol +74 -43
  262. package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
  263. package/contracts/shared/Versionable.sol +112 -54
  264. package/contracts/test/TestDistribution.sol +22 -0
  265. package/contracts/test/TestPool.sol +7 -2
  266. package/contracts/test/TestProduct.sol +37 -7
  267. package/contracts/test/TestRegisterable.sol +5 -6
  268. package/contracts/test/TestRoleId.sol +2 -2
  269. package/contracts/test/TestService.sol +6 -12
  270. package/contracts/test/Usdc.sol +26 -0
  271. package/contracts/types/Fee.sol +8 -3
  272. package/contracts/types/Key32.sol +45 -0
  273. package/contracts/types/NftId.sol +16 -1
  274. package/contracts/types/ObjectType.sol +24 -8
  275. package/contracts/types/ReferralId.sol +48 -0
  276. package/contracts/types/RiskId.sol +43 -0
  277. package/contracts/types/RoleId.sol +12 -10
  278. package/contracts/types/StateId.sol +7 -1
  279. package/contracts/types/UFixed.sol +19 -16
  280. package/contracts/types/Version.sol +9 -0
  281. package/package.json +1 -1
  282. package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.dbg.json +0 -4
  283. package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.json +0 -50
  284. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +0 -4
  285. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +0 -4
  286. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +0 -10
  287. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +0 -4
  288. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +0 -4
  289. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
  290. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
  291. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
  292. package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
  293. package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
  294. package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
  295. package/artifacts/contracts/instance/service/IService.sol/IService.dbg.json +0 -4
  296. package/artifacts/contracts/instance/service/ServiceBase.sol/ServiceBase.dbg.json +0 -4
  297. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +0 -4
  298. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +0 -24
  299. package/contracts/experiment/statemachine/README.md +0 -112
  300. package/contracts/instance/IServiceLinked.sol +0 -12
  301. package/contracts/instance/InstanceBase.sol +0 -71
  302. package/contracts/instance/module/compensation/CompensationModule.sol +0 -8
  303. package/contracts/instance/module/compensation/ICompensation.sol +0 -10
  304. package/contracts/instance/module/lifecycle/ILifecycle.sol +0 -47
  305. package/contracts/instance/service/ServiceBase.sol +0 -39
  306. package/contracts/registry/IRegistryLinked.sol +0 -8
  307. /package/contracts/instance/{service → base}/IService.sol +0 -0
@@ -3,48 +3,6 @@
3
3
  "contractName": "IInstance",
4
4
  "sourceName": "contracts/instance/IInstance.sol",
5
5
  "abi": [
6
- {
7
- "inputs": [
8
- {
9
- "internalType": "NftId",
10
- "name": "nftId",
11
- "type": "uint96"
12
- },
13
- {
14
- "internalType": "ObjectType",
15
- "name": "objectType",
16
- "type": "uint8"
17
- },
18
- {
19
- "internalType": "StateId",
20
- "name": "fromStateId",
21
- "type": "uint8"
22
- },
23
- {
24
- "internalType": "StateId",
25
- "name": "toStateId",
26
- "type": "uint8"
27
- }
28
- ],
29
- "name": "ErrorInvalidStateTransition",
30
- "type": "error"
31
- },
32
- {
33
- "inputs": [
34
- {
35
- "internalType": "NftId",
36
- "name": "nftId",
37
- "type": "uint96"
38
- },
39
- {
40
- "internalType": "ObjectType",
41
- "name": "objectType",
42
- "type": "uint8"
43
- }
44
- ],
45
- "name": "ErrorNoLifecycle",
46
- "type": "error"
47
- },
48
6
  {
49
7
  "anonymous": false,
50
8
  "inputs": [
@@ -108,87 +66,6 @@
108
66
  "name": "LogAccessRoleStateSet",
109
67
  "type": "event"
110
68
  },
111
- {
112
- "anonymous": false,
113
- "inputs": [
114
- {
115
- "indexed": false,
116
- "internalType": "NftId",
117
- "name": "nftId",
118
- "type": "uint96"
119
- },
120
- {
121
- "indexed": false,
122
- "internalType": "StateId",
123
- "name": "fromStateId",
124
- "type": "uint8"
125
- },
126
- {
127
- "indexed": false,
128
- "internalType": "StateId",
129
- "name": "toStateId",
130
- "type": "uint8"
131
- }
132
- ],
133
- "name": "LogBundleStateChanged",
134
- "type": "event"
135
- },
136
- {
137
- "anonymous": false,
138
- "inputs": [
139
- {
140
- "indexed": false,
141
- "internalType": "NftId",
142
- "name": "nftId",
143
- "type": "uint96"
144
- },
145
- {
146
- "indexed": false,
147
- "internalType": "ObjectType",
148
- "name": "objectType",
149
- "type": "uint8"
150
- },
151
- {
152
- "indexed": false,
153
- "internalType": "StateId",
154
- "name": "fromStateId",
155
- "type": "uint8"
156
- },
157
- {
158
- "indexed": false,
159
- "internalType": "StateId",
160
- "name": "toStateId",
161
- "type": "uint8"
162
- }
163
- ],
164
- "name": "LogComponentStateChanged",
165
- "type": "event"
166
- },
167
- {
168
- "anonymous": false,
169
- "inputs": [
170
- {
171
- "indexed": false,
172
- "internalType": "NftId",
173
- "name": "nftId",
174
- "type": "uint96"
175
- },
176
- {
177
- "indexed": false,
178
- "internalType": "StateId",
179
- "name": "fromStateId",
180
- "type": "uint8"
181
- },
182
- {
183
- "indexed": false,
184
- "internalType": "StateId",
185
- "name": "toStateId",
186
- "type": "uint8"
187
- }
188
- ],
189
- "name": "LogPolicyStateChanged",
190
- "type": "event"
191
- },
192
69
  {
193
70
  "anonymous": false,
194
71
  "inputs": [
@@ -211,27 +88,9 @@
211
88
  "type": "address"
212
89
  }
213
90
  ],
214
- "name": "LogVersionableActivated",
91
+ "name": "LogVersionableInitialized",
215
92
  "type": "event"
216
93
  },
217
- {
218
- "inputs": [
219
- {
220
- "internalType": "address",
221
- "name": "implementation",
222
- "type": "address"
223
- },
224
- {
225
- "internalType": "address",
226
- "name": "activatedBy",
227
- "type": "address"
228
- }
229
- ],
230
- "name": "activate",
231
- "outputs": [],
232
- "stateMutability": "nonpayable",
233
- "type": "function"
234
- },
235
94
  {
236
95
  "inputs": [
237
96
  {
@@ -323,22 +182,34 @@
323
182
  "inputs": [
324
183
  {
325
184
  "internalType": "NftId",
326
- "name": "productNftId",
185
+ "name": "bundleNftId",
327
186
  "type": "uint96"
328
187
  },
329
188
  {
330
189
  "internalType": "NftId",
331
- "name": "policyNftId",
190
+ "name": "poolNftId",
332
191
  "type": "uint96"
333
192
  },
334
193
  {
335
- "internalType": "uint256",
336
- "name": "sumInsuredAmount",
337
- "type": "uint256"
194
+ "components": [
195
+ {
196
+ "internalType": "UFixed",
197
+ "name": "fractionalFee",
198
+ "type": "uint256"
199
+ },
200
+ {
201
+ "internalType": "uint256",
202
+ "name": "fixedFee",
203
+ "type": "uint256"
204
+ }
205
+ ],
206
+ "internalType": "struct Fee",
207
+ "name": "fee",
208
+ "type": "tuple"
338
209
  },
339
210
  {
340
211
  "internalType": "uint256",
341
- "name": "premiumAmount",
212
+ "name": "amount",
342
213
  "type": "uint256"
343
214
  },
344
215
  {
@@ -347,12 +218,12 @@
347
218
  "type": "uint256"
348
219
  },
349
220
  {
350
- "internalType": "NftId",
351
- "name": "bundleNftId",
352
- "type": "uint96"
221
+ "internalType": "bytes",
222
+ "name": "filter",
223
+ "type": "bytes"
353
224
  }
354
225
  ],
355
- "name": "createApplication",
226
+ "name": "createBundleInfo",
356
227
  "outputs": [],
357
228
  "stateMutability": "nonpayable",
358
229
  "type": "function"
@@ -361,17 +232,32 @@
361
232
  "inputs": [
362
233
  {
363
234
  "internalType": "NftId",
364
- "name": "bundleNftId",
235
+ "name": "policyNftId",
365
236
  "type": "uint96"
366
237
  },
367
238
  {
368
239
  "internalType": "NftId",
369
- "name": "poolNftId",
240
+ "name": "productNftId",
370
241
  "type": "uint96"
371
242
  },
243
+ {
244
+ "internalType": "ReferralId",
245
+ "name": "referralId",
246
+ "type": "bytes8"
247
+ },
248
+ {
249
+ "internalType": "RiskId",
250
+ "name": "riskId",
251
+ "type": "bytes8"
252
+ },
372
253
  {
373
254
  "internalType": "uint256",
374
- "name": "amount",
255
+ "name": "sumInsuredAmount",
256
+ "type": "uint256"
257
+ },
258
+ {
259
+ "internalType": "uint256",
260
+ "name": "premiumAmount",
375
261
  "type": "uint256"
376
262
  },
377
263
  {
@@ -379,13 +265,36 @@
379
265
  "name": "lifetime",
380
266
  "type": "uint256"
381
267
  },
268
+ {
269
+ "internalType": "NftId",
270
+ "name": "bundleNftId",
271
+ "type": "uint96"
272
+ }
273
+ ],
274
+ "name": "createPolicyInfo",
275
+ "outputs": [],
276
+ "stateMutability": "nonpayable",
277
+ "type": "function"
278
+ },
279
+ {
280
+ "inputs": [
281
+ {
282
+ "internalType": "RiskId",
283
+ "name": "riskId",
284
+ "type": "bytes8"
285
+ },
286
+ {
287
+ "internalType": "NftId",
288
+ "name": "productNftId",
289
+ "type": "uint96"
290
+ },
382
291
  {
383
292
  "internalType": "bytes",
384
- "name": "filter",
293
+ "name": "data",
385
294
  "type": "bytes"
386
295
  }
387
296
  ],
388
- "name": "createBundleInfo",
297
+ "name": "createRisk",
389
298
  "outputs": [],
390
299
  "stateMutability": "nonpayable",
391
300
  "type": "function"
@@ -432,7 +341,7 @@
432
341
  "inputs": [
433
342
  {
434
343
  "internalType": "NftId",
435
- "name": "bundleNftId",
344
+ "name": "nftId",
436
345
  "type": "uint96"
437
346
  }
438
347
  ],
@@ -440,20 +349,27 @@
440
349
  "outputs": [
441
350
  {
442
351
  "components": [
443
- {
444
- "internalType": "NftId",
445
- "name": "nftId",
446
- "type": "uint96"
447
- },
448
352
  {
449
353
  "internalType": "NftId",
450
354
  "name": "poolNftId",
451
355
  "type": "uint96"
452
356
  },
453
357
  {
454
- "internalType": "StateId",
455
- "name": "state",
456
- "type": "uint8"
358
+ "components": [
359
+ {
360
+ "internalType": "UFixed",
361
+ "name": "fractionalFee",
362
+ "type": "uint256"
363
+ },
364
+ {
365
+ "internalType": "uint256",
366
+ "name": "fixedFee",
367
+ "type": "uint256"
368
+ }
369
+ ],
370
+ "internalType": "struct Fee",
371
+ "name": "fee",
372
+ "type": "tuple"
457
373
  },
458
374
  {
459
375
  "internalType": "bytes",
@@ -475,11 +391,6 @@
475
391
  "name": "balanceAmount",
476
392
  "type": "uint256"
477
393
  },
478
- {
479
- "internalType": "Timestamp",
480
- "name": "createdAt",
481
- "type": "uint40"
482
- },
483
394
  {
484
395
  "internalType": "Timestamp",
485
396
  "name": "expiredAt",
@@ -489,11 +400,6 @@
489
400
  "internalType": "Timestamp",
490
401
  "name": "closedAt",
491
402
  "type": "uint40"
492
- },
493
- {
494
- "internalType": "Blocknumber",
495
- "name": "updatedIn",
496
- "type": "uint32"
497
403
  }
498
404
  ],
499
405
  "internalType": "struct IBundle.BundleInfo",
@@ -560,6 +466,19 @@
560
466
  "stateMutability": "view",
561
467
  "type": "function"
562
468
  },
469
+ {
470
+ "inputs": [],
471
+ "name": "getComponentOwnerService",
472
+ "outputs": [
473
+ {
474
+ "internalType": "contract IComponentOwnerService",
475
+ "name": "",
476
+ "type": "address"
477
+ }
478
+ ],
479
+ "stateMutability": "view",
480
+ "type": "function"
481
+ },
563
482
  {
564
483
  "inputs": [
565
484
  {
@@ -568,41 +487,30 @@
568
487
  "type": "uint96"
569
488
  }
570
489
  ],
571
- "name": "getComponentInfo",
490
+ "name": "getComponentToken",
572
491
  "outputs": [
573
492
  {
574
- "components": [
575
- {
576
- "internalType": "NftId",
577
- "name": "nftId",
578
- "type": "uint96"
579
- },
580
- {
581
- "internalType": "StateId",
582
- "name": "state",
583
- "type": "uint8"
584
- },
585
- {
586
- "internalType": "contract IERC20Metadata",
587
- "name": "token",
588
- "type": "address"
589
- }
590
- ],
591
- "internalType": "struct IComponent.ComponentInfo",
592
- "name": "info",
593
- "type": "tuple"
493
+ "internalType": "contract IERC20Metadata",
494
+ "name": "token",
495
+ "type": "address"
594
496
  }
595
497
  ],
596
498
  "stateMutability": "view",
597
499
  "type": "function"
598
500
  },
599
501
  {
600
- "inputs": [],
601
- "name": "getComponentOwnerService",
602
- "outputs": [
502
+ "inputs": [
603
503
  {
604
- "internalType": "contract IComponentOwnerService",
605
- "name": "",
504
+ "internalType": "NftId",
505
+ "name": "nftId",
506
+ "type": "uint96"
507
+ }
508
+ ],
509
+ "name": "getComponentWallet",
510
+ "outputs": [
511
+ {
512
+ "internalType": "address",
513
+ "name": "wallet",
606
514
  "type": "address"
607
515
  }
608
516
  ],
@@ -611,12 +519,12 @@
611
519
  },
612
520
  {
613
521
  "inputs": [],
614
- "name": "getData",
522
+ "name": "getDistributionService",
615
523
  "outputs": [
616
524
  {
617
- "internalType": "bytes",
618
- "name": "data",
619
- "type": "bytes"
525
+ "internalType": "contract IDistributionService",
526
+ "name": "",
527
+ "type": "address"
620
528
  }
621
529
  ],
622
530
  "stateMutability": "view",
@@ -659,19 +567,55 @@
659
567
  "type": "function"
660
568
  },
661
569
  {
662
- "inputs": [
663
- {
664
- "internalType": "ObjectType",
665
- "name": "objectType",
666
- "type": "uint8"
667
- }
668
- ],
669
- "name": "getInitialState",
570
+ "inputs": [],
571
+ "name": "getInitialInfo",
670
572
  "outputs": [
671
573
  {
672
- "internalType": "StateId",
574
+ "components": [
575
+ {
576
+ "internalType": "NftId",
577
+ "name": "nftId",
578
+ "type": "uint96"
579
+ },
580
+ {
581
+ "internalType": "NftId",
582
+ "name": "parentNftId",
583
+ "type": "uint96"
584
+ },
585
+ {
586
+ "internalType": "ObjectType",
587
+ "name": "objectType",
588
+ "type": "uint8"
589
+ },
590
+ {
591
+ "internalType": "bool",
592
+ "name": "isInterceptor",
593
+ "type": "bool"
594
+ },
595
+ {
596
+ "internalType": "address",
597
+ "name": "objectAddress",
598
+ "type": "address"
599
+ },
600
+ {
601
+ "internalType": "address",
602
+ "name": "initialOwner",
603
+ "type": "address"
604
+ },
605
+ {
606
+ "internalType": "bytes",
607
+ "name": "data",
608
+ "type": "bytes"
609
+ }
610
+ ],
611
+ "internalType": "struct IRegistry.ObjectInfo",
673
612
  "name": "",
674
- "type": "uint8"
613
+ "type": "tuple"
614
+ },
615
+ {
616
+ "internalType": "bytes",
617
+ "name": "data",
618
+ "type": "bytes"
675
619
  }
676
620
  ],
677
621
  "stateMutability": "view",
@@ -679,12 +623,12 @@
679
623
  },
680
624
  {
681
625
  "inputs": [],
682
- "name": "getNftId",
626
+ "name": "getInitializedVersion",
683
627
  "outputs": [
684
628
  {
685
- "internalType": "NftId",
686
- "name": "nftId",
687
- "type": "uint96"
629
+ "internalType": "uint64",
630
+ "name": "",
631
+ "type": "uint64"
688
632
  }
689
633
  ],
690
634
  "stateMutability": "view",
@@ -692,11 +636,11 @@
692
636
  },
693
637
  {
694
638
  "inputs": [],
695
- "name": "getOwner",
639
+ "name": "getKeyValueStore",
696
640
  "outputs": [
697
641
  {
698
- "internalType": "address",
699
- "name": "owner",
642
+ "internalType": "contract IKeyValueStore",
643
+ "name": "keyValueStore",
700
644
  "type": "address"
701
645
  }
702
646
  ],
@@ -705,7 +649,7 @@
705
649
  },
706
650
  {
707
651
  "inputs": [],
708
- "name": "getParentNftId",
652
+ "name": "getNftId",
709
653
  "outputs": [
710
654
  {
711
655
  "internalType": "NftId",
@@ -716,6 +660,19 @@
716
660
  "stateMutability": "view",
717
661
  "type": "function"
718
662
  },
663
+ {
664
+ "inputs": [],
665
+ "name": "getOwner",
666
+ "outputs": [
667
+ {
668
+ "internalType": "address",
669
+ "name": "owner",
670
+ "type": "address"
671
+ }
672
+ ],
673
+ "stateMutability": "view",
674
+ "type": "function"
675
+ },
719
676
  {
720
677
  "inputs": [
721
678
  {
@@ -728,11 +685,6 @@
728
685
  "outputs": [
729
686
  {
730
687
  "components": [
731
- {
732
- "internalType": "NftId",
733
- "name": "nftId",
734
- "type": "uint96"
735
- },
736
688
  {
737
689
  "internalType": "NftId",
738
690
  "name": "productNftId",
@@ -743,15 +695,20 @@
743
695
  "name": "bundleNftId",
744
696
  "type": "uint96"
745
697
  },
698
+ {
699
+ "internalType": "ReferralId",
700
+ "name": "referralId",
701
+ "type": "bytes8"
702
+ },
746
703
  {
747
704
  "internalType": "address",
748
705
  "name": "beneficiary",
749
706
  "type": "address"
750
707
  },
751
708
  {
752
- "internalType": "StateId",
753
- "name": "state",
754
- "type": "uint8"
709
+ "internalType": "RiskId",
710
+ "name": "riskId",
711
+ "type": "bytes8"
755
712
  },
756
713
  {
757
714
  "internalType": "uint256",
@@ -775,13 +732,13 @@
775
732
  },
776
733
  {
777
734
  "internalType": "bytes",
778
- "name": "data",
735
+ "name": "applicationData",
779
736
  "type": "bytes"
780
737
  },
781
738
  {
782
- "internalType": "Timestamp",
783
- "name": "createdAt",
784
- "type": "uint40"
739
+ "internalType": "bytes",
740
+ "name": "policyData",
741
+ "type": "bytes"
785
742
  },
786
743
  {
787
744
  "internalType": "Timestamp",
@@ -797,11 +754,6 @@
797
754
  "internalType": "Timestamp",
798
755
  "name": "closedAt",
799
756
  "type": "uint40"
800
- },
801
- {
802
- "internalType": "Blocknumber",
803
- "name": "updatedIn",
804
- "type": "uint32"
805
757
  }
806
758
  ],
807
759
  "internalType": "struct IPolicy.PolicyInfo",
@@ -824,11 +776,6 @@
824
776
  "outputs": [
825
777
  {
826
778
  "components": [
827
- {
828
- "internalType": "NftId",
829
- "name": "nftId",
830
- "type": "uint96"
831
- },
832
779
  {
833
780
  "internalType": "bool",
834
781
  "name": "isVerifying",
@@ -865,62 +812,16 @@
865
812
  "inputs": [
866
813
  {
867
814
  "internalType": "NftId",
868
- "name": "poolNftId",
815
+ "name": "componentNftId",
869
816
  "type": "uint96"
870
817
  }
871
818
  ],
872
- "name": "getPoolSetup",
819
+ "name": "getProductNftId",
873
820
  "outputs": [
874
821
  {
875
- "components": [
876
- {
877
- "internalType": "NftId",
878
- "name": "poolNftId",
879
- "type": "uint96"
880
- },
881
- {
882
- "internalType": "address",
883
- "name": "wallet",
884
- "type": "address"
885
- },
886
- {
887
- "components": [
888
- {
889
- "internalType": "UFixed",
890
- "name": "fractionalFee",
891
- "type": "uint256"
892
- },
893
- {
894
- "internalType": "uint256",
895
- "name": "fixedFee",
896
- "type": "uint256"
897
- }
898
- ],
899
- "internalType": "struct Fee",
900
- "name": "stakingFee",
901
- "type": "tuple"
902
- },
903
- {
904
- "components": [
905
- {
906
- "internalType": "UFixed",
907
- "name": "fractionalFee",
908
- "type": "uint256"
909
- },
910
- {
911
- "internalType": "uint256",
912
- "name": "fixedFee",
913
- "type": "uint256"
914
- }
915
- ],
916
- "internalType": "struct Fee",
917
- "name": "performanceFee",
918
- "type": "tuple"
919
- }
920
- ],
921
- "internalType": "struct ITreasury.PoolSetup",
922
- "name": "setup",
923
- "type": "tuple"
822
+ "internalType": "NftId",
823
+ "name": "productNftId",
824
+ "type": "uint96"
924
825
  }
925
826
  ],
926
827
  "stateMutability": "view",
@@ -939,15 +840,28 @@
939
840
  "stateMutability": "view",
940
841
  "type": "function"
941
842
  },
843
+ {
844
+ "inputs": [],
845
+ "name": "getRegistry",
846
+ "outputs": [
847
+ {
848
+ "internalType": "contract IRegistry",
849
+ "name": "registry",
850
+ "type": "address"
851
+ }
852
+ ],
853
+ "stateMutability": "view",
854
+ "type": "function"
855
+ },
942
856
  {
943
857
  "inputs": [
944
858
  {
945
- "internalType": "NftId",
946
- "name": "productNftId",
947
- "type": "uint96"
859
+ "internalType": "RiskId",
860
+ "name": "riskId",
861
+ "type": "bytes8"
948
862
  }
949
863
  ],
950
- "name": "getProductSetup",
864
+ "name": "getRiskInfo",
951
865
  "outputs": [
952
866
  {
953
867
  "components": [
@@ -957,81 +871,19 @@
957
871
  "type": "uint96"
958
872
  },
959
873
  {
960
- "internalType": "NftId",
961
- "name": "distributorNftId",
962
- "type": "uint96"
963
- },
964
- {
965
- "internalType": "NftId",
966
- "name": "poolNftId",
967
- "type": "uint96"
968
- },
969
- {
970
- "internalType": "contract IERC20Metadata",
971
- "name": "token",
972
- "type": "address"
973
- },
974
- {
975
- "internalType": "address",
976
- "name": "wallet",
977
- "type": "address"
978
- },
979
- {
980
- "components": [
981
- {
982
- "internalType": "UFixed",
983
- "name": "fractionalFee",
984
- "type": "uint256"
985
- },
986
- {
987
- "internalType": "uint256",
988
- "name": "fixedFee",
989
- "type": "uint256"
990
- }
991
- ],
992
- "internalType": "struct Fee",
993
- "name": "policyFee",
994
- "type": "tuple"
995
- },
996
- {
997
- "components": [
998
- {
999
- "internalType": "UFixed",
1000
- "name": "fractionalFee",
1001
- "type": "uint256"
1002
- },
1003
- {
1004
- "internalType": "uint256",
1005
- "name": "fixedFee",
1006
- "type": "uint256"
1007
- }
1008
- ],
1009
- "internalType": "struct Fee",
1010
- "name": "processingFee",
1011
- "type": "tuple"
874
+ "internalType": "bytes",
875
+ "name": "data",
876
+ "type": "bytes"
1012
877
  }
1013
878
  ],
1014
- "internalType": "struct ITreasury.ProductSetup",
1015
- "name": "setup",
879
+ "internalType": "struct IRisk.RiskInfo",
880
+ "name": "info",
1016
881
  "type": "tuple"
1017
882
  }
1018
883
  ],
1019
884
  "stateMutability": "view",
1020
885
  "type": "function"
1021
886
  },
1022
- {
1023
- "inputs": [],
1024
- "name": "getRegistry",
1025
- "outputs": [
1026
- {
1027
- "internalType": "contract IRegistry",
1028
- "name": "registry",
1029
- "type": "address"
1030
- }
1031
- ],
1032
- "stateMutability": "view",
1033
- "type": "function"
1034
- },
1035
887
  {
1036
888
  "inputs": [
1037
889
  {
@@ -1162,6 +1014,25 @@
1162
1014
  "stateMutability": "view",
1163
1015
  "type": "function"
1164
1016
  },
1017
+ {
1018
+ "inputs": [
1019
+ {
1020
+ "internalType": "Key32",
1021
+ "name": "key",
1022
+ "type": "bytes32"
1023
+ }
1024
+ ],
1025
+ "name": "getState",
1026
+ "outputs": [
1027
+ {
1028
+ "internalType": "StateId",
1029
+ "name": "state",
1030
+ "type": "uint8"
1031
+ }
1032
+ ],
1033
+ "stateMutability": "view",
1034
+ "type": "function"
1035
+ },
1165
1036
  {
1166
1037
  "inputs": [
1167
1038
  {
@@ -1182,16 +1053,141 @@
1182
1053
  "type": "function"
1183
1054
  },
1184
1055
  {
1185
- "inputs": [],
1186
- "name": "getType",
1056
+ "inputs": [
1057
+ {
1058
+ "internalType": "NftId",
1059
+ "name": "productNftId",
1060
+ "type": "uint96"
1061
+ }
1062
+ ],
1063
+ "name": "getTreasuryInfo",
1187
1064
  "outputs": [
1188
1065
  {
1189
- "internalType": "ObjectType",
1190
- "name": "objectType",
1191
- "type": "uint8"
1066
+ "components": [
1067
+ {
1068
+ "internalType": "NftId",
1069
+ "name": "poolNftId",
1070
+ "type": "uint96"
1071
+ },
1072
+ {
1073
+ "internalType": "NftId",
1074
+ "name": "distributionNftId",
1075
+ "type": "uint96"
1076
+ },
1077
+ {
1078
+ "internalType": "contract IERC20Metadata",
1079
+ "name": "token",
1080
+ "type": "address"
1081
+ },
1082
+ {
1083
+ "components": [
1084
+ {
1085
+ "internalType": "UFixed",
1086
+ "name": "fractionalFee",
1087
+ "type": "uint256"
1088
+ },
1089
+ {
1090
+ "internalType": "uint256",
1091
+ "name": "fixedFee",
1092
+ "type": "uint256"
1093
+ }
1094
+ ],
1095
+ "internalType": "struct Fee",
1096
+ "name": "productFee",
1097
+ "type": "tuple"
1098
+ },
1099
+ {
1100
+ "components": [
1101
+ {
1102
+ "internalType": "UFixed",
1103
+ "name": "fractionalFee",
1104
+ "type": "uint256"
1105
+ },
1106
+ {
1107
+ "internalType": "uint256",
1108
+ "name": "fixedFee",
1109
+ "type": "uint256"
1110
+ }
1111
+ ],
1112
+ "internalType": "struct Fee",
1113
+ "name": "processingFee",
1114
+ "type": "tuple"
1115
+ },
1116
+ {
1117
+ "components": [
1118
+ {
1119
+ "internalType": "UFixed",
1120
+ "name": "fractionalFee",
1121
+ "type": "uint256"
1122
+ },
1123
+ {
1124
+ "internalType": "uint256",
1125
+ "name": "fixedFee",
1126
+ "type": "uint256"
1127
+ }
1128
+ ],
1129
+ "internalType": "struct Fee",
1130
+ "name": "poolFee",
1131
+ "type": "tuple"
1132
+ },
1133
+ {
1134
+ "components": [
1135
+ {
1136
+ "internalType": "UFixed",
1137
+ "name": "fractionalFee",
1138
+ "type": "uint256"
1139
+ },
1140
+ {
1141
+ "internalType": "uint256",
1142
+ "name": "fixedFee",
1143
+ "type": "uint256"
1144
+ }
1145
+ ],
1146
+ "internalType": "struct Fee",
1147
+ "name": "stakingFee",
1148
+ "type": "tuple"
1149
+ },
1150
+ {
1151
+ "components": [
1152
+ {
1153
+ "internalType": "UFixed",
1154
+ "name": "fractionalFee",
1155
+ "type": "uint256"
1156
+ },
1157
+ {
1158
+ "internalType": "uint256",
1159
+ "name": "fixedFee",
1160
+ "type": "uint256"
1161
+ }
1162
+ ],
1163
+ "internalType": "struct Fee",
1164
+ "name": "performanceFee",
1165
+ "type": "tuple"
1166
+ },
1167
+ {
1168
+ "components": [
1169
+ {
1170
+ "internalType": "UFixed",
1171
+ "name": "fractionalFee",
1172
+ "type": "uint256"
1173
+ },
1174
+ {
1175
+ "internalType": "uint256",
1176
+ "name": "fixedFee",
1177
+ "type": "uint256"
1178
+ }
1179
+ ],
1180
+ "internalType": "struct Fee",
1181
+ "name": "distributionFee",
1182
+ "type": "tuple"
1183
+ }
1184
+ ],
1185
+ "internalType": "struct ITreasury.TreasuryInfo",
1186
+ "name": "info",
1187
+ "type": "tuple"
1192
1188
  }
1193
1189
  ],
1194
- "stateMutability": "pure",
1190
+ "stateMutability": "view",
1195
1191
  "type": "function"
1196
1192
  },
1197
1193
  {
@@ -1350,7 +1346,7 @@
1350
1346
  "type": "tuple"
1351
1347
  }
1352
1348
  ],
1353
- "stateMutability": "pure",
1349
+ "stateMutability": "view",
1354
1350
  "type": "function"
1355
1351
  },
1356
1352
  {
@@ -1388,7 +1384,7 @@
1388
1384
  "outputs": [
1389
1385
  {
1390
1386
  "internalType": "bool",
1391
- "name": "hasRole",
1387
+ "name": "",
1392
1388
  "type": "bool"
1393
1389
  }
1394
1390
  ],
@@ -1398,16 +1394,16 @@
1398
1394
  {
1399
1395
  "inputs": [
1400
1396
  {
1401
- "internalType": "Version",
1402
- "name": "version",
1403
- "type": "uint24"
1397
+ "internalType": "NftId",
1398
+ "name": "productNftId",
1399
+ "type": "uint96"
1404
1400
  }
1405
1401
  ],
1406
- "name": "isActivated",
1402
+ "name": "hasTreasuryInfo",
1407
1403
  "outputs": [
1408
1404
  {
1409
1405
  "internalType": "bool",
1410
- "name": "",
1406
+ "name": "hasInfo",
1411
1407
  "type": "bool"
1412
1408
  }
1413
1409
  ],
@@ -1417,22 +1413,35 @@
1417
1413
  {
1418
1414
  "inputs": [
1419
1415
  {
1420
- "internalType": "ObjectType",
1421
- "name": "objectType",
1422
- "type": "uint8"
1416
+ "internalType": "address",
1417
+ "name": "implementation",
1418
+ "type": "address"
1423
1419
  },
1424
1420
  {
1425
- "internalType": "StateId",
1426
- "name": "fromId",
1427
- "type": "uint8"
1421
+ "internalType": "address",
1422
+ "name": "activatedBy",
1423
+ "type": "address"
1428
1424
  },
1429
1425
  {
1430
- "internalType": "StateId",
1431
- "name": "toId",
1432
- "type": "uint8"
1426
+ "internalType": "bytes",
1427
+ "name": "activationData",
1428
+ "type": "bytes"
1429
+ }
1430
+ ],
1431
+ "name": "initialize",
1432
+ "outputs": [],
1433
+ "stateMutability": "nonpayable",
1434
+ "type": "function"
1435
+ },
1436
+ {
1437
+ "inputs": [
1438
+ {
1439
+ "internalType": "Version",
1440
+ "name": "version",
1441
+ "type": "uint24"
1433
1442
  }
1434
1443
  ],
1435
- "name": "isValidTransition",
1444
+ "name": "isInitialized",
1436
1445
  "outputs": [
1437
1446
  {
1438
1447
  "internalType": "bool",
@@ -1443,19 +1452,6 @@
1443
1452
  "stateMutability": "view",
1444
1453
  "type": "function"
1445
1454
  },
1446
- {
1447
- "inputs": [],
1448
- "name": "register",
1449
- "outputs": [
1450
- {
1451
- "internalType": "NftId",
1452
- "name": "nftId",
1453
- "type": "uint96"
1454
- }
1455
- ],
1456
- "stateMutability": "nonpayable",
1457
- "type": "function"
1458
- },
1459
1455
  {
1460
1456
  "inputs": [
1461
1457
  {
@@ -1463,15 +1459,15 @@
1463
1459
  "name": "nftId",
1464
1460
  "type": "uint96"
1465
1461
  },
1466
- {
1467
- "internalType": "ObjectType",
1468
- "name": "objectType",
1469
- "type": "uint8"
1470
- },
1471
1462
  {
1472
1463
  "internalType": "contract IERC20Metadata",
1473
1464
  "name": "token",
1474
1465
  "type": "address"
1466
+ },
1467
+ {
1468
+ "internalType": "address",
1469
+ "name": "wallet",
1470
+ "type": "address"
1475
1471
  }
1476
1472
  ],
1477
1473
  "name": "registerComponent",
@@ -1483,46 +1479,24 @@
1483
1479
  "inputs": [
1484
1480
  {
1485
1481
  "internalType": "NftId",
1486
- "name": "poolNftId",
1482
+ "name": "nftId",
1487
1483
  "type": "uint96"
1488
1484
  },
1489
- {
1490
- "internalType": "address",
1491
- "name": "wallet",
1492
- "type": "address"
1493
- },
1494
1485
  {
1495
1486
  "components": [
1496
1487
  {
1497
- "internalType": "UFixed",
1498
- "name": "fractionalFee",
1499
- "type": "uint256"
1488
+ "internalType": "bool",
1489
+ "name": "isVerifying",
1490
+ "type": "bool"
1500
1491
  },
1501
- {
1502
- "internalType": "uint256",
1503
- "name": "fixedFee",
1504
- "type": "uint256"
1505
- }
1506
- ],
1507
- "internalType": "struct Fee",
1508
- "name": "stakingFee",
1509
- "type": "tuple"
1510
- },
1511
- {
1512
- "components": [
1513
1492
  {
1514
1493
  "internalType": "UFixed",
1515
- "name": "fractionalFee",
1516
- "type": "uint256"
1517
- },
1518
- {
1519
- "internalType": "uint256",
1520
- "name": "fixedFee",
1494
+ "name": "collateralizationLevel",
1521
1495
  "type": "uint256"
1522
1496
  }
1523
1497
  ],
1524
- "internalType": "struct Fee",
1525
- "name": "performanceFee",
1498
+ "internalType": "struct IPool.PoolInfo",
1499
+ "name": "info",
1526
1500
  "type": "tuple"
1527
1501
  }
1528
1502
  ],
@@ -1531,29 +1505,6 @@
1531
1505
  "stateMutability": "nonpayable",
1532
1506
  "type": "function"
1533
1507
  },
1534
- {
1535
- "inputs": [
1536
- {
1537
- "internalType": "NftId",
1538
- "name": "poolNftId",
1539
- "type": "uint96"
1540
- },
1541
- {
1542
- "internalType": "bool",
1543
- "name": "isVerifying",
1544
- "type": "bool"
1545
- },
1546
- {
1547
- "internalType": "UFixed",
1548
- "name": "collateralizationLevel",
1549
- "type": "uint256"
1550
- }
1551
- ],
1552
- "name": "registerPool",
1553
- "outputs": [],
1554
- "stateMutability": "nonpayable",
1555
- "type": "function"
1556
- },
1557
1508
  {
1558
1509
  "inputs": [
1559
1510
  {
@@ -1561,62 +1512,132 @@
1561
1512
  "name": "productNftId",
1562
1513
  "type": "uint96"
1563
1514
  },
1564
- {
1565
- "internalType": "NftId",
1566
- "name": "distributorNftId",
1567
- "type": "uint96"
1568
- },
1569
- {
1570
- "internalType": "NftId",
1571
- "name": "poolNftId",
1572
- "type": "uint96"
1573
- },
1574
- {
1575
- "internalType": "contract IERC20Metadata",
1576
- "name": "token",
1577
- "type": "address"
1578
- },
1579
- {
1580
- "internalType": "address",
1581
- "name": "wallet",
1582
- "type": "address"
1583
- },
1584
1515
  {
1585
1516
  "components": [
1586
1517
  {
1587
- "internalType": "UFixed",
1588
- "name": "fractionalFee",
1589
- "type": "uint256"
1518
+ "internalType": "NftId",
1519
+ "name": "poolNftId",
1520
+ "type": "uint96"
1590
1521
  },
1591
1522
  {
1592
- "internalType": "uint256",
1593
- "name": "fixedFee",
1594
- "type": "uint256"
1595
- }
1596
- ],
1597
- "internalType": "struct Fee",
1598
- "name": "policyFee",
1599
- "type": "tuple"
1600
- },
1601
- {
1602
- "components": [
1523
+ "internalType": "NftId",
1524
+ "name": "distributionNftId",
1525
+ "type": "uint96"
1526
+ },
1603
1527
  {
1604
- "internalType": "UFixed",
1605
- "name": "fractionalFee",
1606
- "type": "uint256"
1528
+ "internalType": "contract IERC20Metadata",
1529
+ "name": "token",
1530
+ "type": "address"
1607
1531
  },
1608
1532
  {
1609
- "internalType": "uint256",
1610
- "name": "fixedFee",
1611
- "type": "uint256"
1533
+ "components": [
1534
+ {
1535
+ "internalType": "UFixed",
1536
+ "name": "fractionalFee",
1537
+ "type": "uint256"
1538
+ },
1539
+ {
1540
+ "internalType": "uint256",
1541
+ "name": "fixedFee",
1542
+ "type": "uint256"
1543
+ }
1544
+ ],
1545
+ "internalType": "struct Fee",
1546
+ "name": "productFee",
1547
+ "type": "tuple"
1548
+ },
1549
+ {
1550
+ "components": [
1551
+ {
1552
+ "internalType": "UFixed",
1553
+ "name": "fractionalFee",
1554
+ "type": "uint256"
1555
+ },
1556
+ {
1557
+ "internalType": "uint256",
1558
+ "name": "fixedFee",
1559
+ "type": "uint256"
1560
+ }
1561
+ ],
1562
+ "internalType": "struct Fee",
1563
+ "name": "processingFee",
1564
+ "type": "tuple"
1565
+ },
1566
+ {
1567
+ "components": [
1568
+ {
1569
+ "internalType": "UFixed",
1570
+ "name": "fractionalFee",
1571
+ "type": "uint256"
1572
+ },
1573
+ {
1574
+ "internalType": "uint256",
1575
+ "name": "fixedFee",
1576
+ "type": "uint256"
1577
+ }
1578
+ ],
1579
+ "internalType": "struct Fee",
1580
+ "name": "poolFee",
1581
+ "type": "tuple"
1582
+ },
1583
+ {
1584
+ "components": [
1585
+ {
1586
+ "internalType": "UFixed",
1587
+ "name": "fractionalFee",
1588
+ "type": "uint256"
1589
+ },
1590
+ {
1591
+ "internalType": "uint256",
1592
+ "name": "fixedFee",
1593
+ "type": "uint256"
1594
+ }
1595
+ ],
1596
+ "internalType": "struct Fee",
1597
+ "name": "stakingFee",
1598
+ "type": "tuple"
1599
+ },
1600
+ {
1601
+ "components": [
1602
+ {
1603
+ "internalType": "UFixed",
1604
+ "name": "fractionalFee",
1605
+ "type": "uint256"
1606
+ },
1607
+ {
1608
+ "internalType": "uint256",
1609
+ "name": "fixedFee",
1610
+ "type": "uint256"
1611
+ }
1612
+ ],
1613
+ "internalType": "struct Fee",
1614
+ "name": "performanceFee",
1615
+ "type": "tuple"
1616
+ },
1617
+ {
1618
+ "components": [
1619
+ {
1620
+ "internalType": "UFixed",
1621
+ "name": "fractionalFee",
1622
+ "type": "uint256"
1623
+ },
1624
+ {
1625
+ "internalType": "uint256",
1626
+ "name": "fixedFee",
1627
+ "type": "uint256"
1628
+ }
1629
+ ],
1630
+ "internalType": "struct Fee",
1631
+ "name": "distributionFee",
1632
+ "type": "tuple"
1612
1633
  }
1613
1634
  ],
1614
- "internalType": "struct Fee",
1615
- "name": "processingFee",
1635
+ "internalType": "struct ITreasury.TreasuryInfo",
1636
+ "name": "info",
1616
1637
  "type": "tuple"
1617
1638
  }
1618
1639
  ],
1619
- "name": "registerProduct",
1640
+ "name": "registerProductSetup",
1620
1641
  "outputs": [],
1621
1642
  "stateMutability": "nonpayable",
1622
1643
  "type": "function"
@@ -1684,22 +1705,34 @@
1684
1705
  },
1685
1706
  {
1686
1707
  "inputs": [
1708
+ {
1709
+ "internalType": "NftId",
1710
+ "name": "nftId",
1711
+ "type": "uint96"
1712
+ },
1687
1713
  {
1688
1714
  "components": [
1689
- {
1690
- "internalType": "NftId",
1691
- "name": "nftId",
1692
- "type": "uint96"
1693
- },
1694
1715
  {
1695
1716
  "internalType": "NftId",
1696
1717
  "name": "poolNftId",
1697
1718
  "type": "uint96"
1698
1719
  },
1699
1720
  {
1700
- "internalType": "StateId",
1701
- "name": "state",
1702
- "type": "uint8"
1721
+ "components": [
1722
+ {
1723
+ "internalType": "UFixed",
1724
+ "name": "fractionalFee",
1725
+ "type": "uint256"
1726
+ },
1727
+ {
1728
+ "internalType": "uint256",
1729
+ "name": "fixedFee",
1730
+ "type": "uint256"
1731
+ }
1732
+ ],
1733
+ "internalType": "struct Fee",
1734
+ "name": "fee",
1735
+ "type": "tuple"
1703
1736
  },
1704
1737
  {
1705
1738
  "internalType": "bytes",
@@ -1721,11 +1754,6 @@
1721
1754
  "name": "balanceAmount",
1722
1755
  "type": "uint256"
1723
1756
  },
1724
- {
1725
- "internalType": "Timestamp",
1726
- "name": "createdAt",
1727
- "type": "uint40"
1728
- },
1729
1757
  {
1730
1758
  "internalType": "Timestamp",
1731
1759
  "name": "expiredAt",
@@ -1735,11 +1763,6 @@
1735
1763
  "internalType": "Timestamp",
1736
1764
  "name": "closedAt",
1737
1765
  "type": "uint40"
1738
- },
1739
- {
1740
- "internalType": "Blocknumber",
1741
- "name": "updatedIn",
1742
- "type": "uint32"
1743
1766
  }
1744
1767
  ],
1745
1768
  "internalType": "struct IBundle.BundleInfo",
@@ -1754,49 +1777,13 @@
1754
1777
  },
1755
1778
  {
1756
1779
  "inputs": [
1757
- {
1758
- "components": [
1759
- {
1760
- "internalType": "NftId",
1761
- "name": "nftId",
1762
- "type": "uint96"
1763
- },
1764
- {
1765
- "internalType": "StateId",
1766
- "name": "state",
1767
- "type": "uint8"
1768
- },
1769
- {
1770
- "internalType": "contract IERC20Metadata",
1771
- "name": "token",
1772
- "type": "address"
1773
- }
1774
- ],
1775
- "internalType": "struct IComponent.ComponentInfo",
1776
- "name": "info",
1777
- "type": "tuple"
1778
- }
1779
- ],
1780
- "name": "setComponentInfo",
1781
- "outputs": [
1782
1780
  {
1783
1781
  "internalType": "NftId",
1784
- "name": "componentNftId",
1782
+ "name": "policyNftId",
1785
1783
  "type": "uint96"
1786
- }
1787
- ],
1788
- "stateMutability": "nonpayable",
1789
- "type": "function"
1790
- },
1791
- {
1792
- "inputs": [
1784
+ },
1793
1785
  {
1794
1786
  "components": [
1795
- {
1796
- "internalType": "NftId",
1797
- "name": "nftId",
1798
- "type": "uint96"
1799
- },
1800
1787
  {
1801
1788
  "internalType": "NftId",
1802
1789
  "name": "productNftId",
@@ -1807,15 +1794,20 @@
1807
1794
  "name": "bundleNftId",
1808
1795
  "type": "uint96"
1809
1796
  },
1797
+ {
1798
+ "internalType": "ReferralId",
1799
+ "name": "referralId",
1800
+ "type": "bytes8"
1801
+ },
1810
1802
  {
1811
1803
  "internalType": "address",
1812
1804
  "name": "beneficiary",
1813
1805
  "type": "address"
1814
1806
  },
1815
1807
  {
1816
- "internalType": "StateId",
1817
- "name": "state",
1818
- "type": "uint8"
1808
+ "internalType": "RiskId",
1809
+ "name": "riskId",
1810
+ "type": "bytes8"
1819
1811
  },
1820
1812
  {
1821
1813
  "internalType": "uint256",
@@ -1839,13 +1831,13 @@
1839
1831
  },
1840
1832
  {
1841
1833
  "internalType": "bytes",
1842
- "name": "data",
1834
+ "name": "applicationData",
1843
1835
  "type": "bytes"
1844
1836
  },
1845
1837
  {
1846
- "internalType": "Timestamp",
1847
- "name": "createdAt",
1848
- "type": "uint40"
1838
+ "internalType": "bytes",
1839
+ "name": "policyData",
1840
+ "type": "bytes"
1849
1841
  },
1850
1842
  {
1851
1843
  "internalType": "Timestamp",
@@ -1861,15 +1853,10 @@
1861
1853
  "internalType": "Timestamp",
1862
1854
  "name": "closedAt",
1863
1855
  "type": "uint40"
1864
- },
1865
- {
1866
- "internalType": "Blocknumber",
1867
- "name": "updatedIn",
1868
- "type": "uint32"
1869
1856
  }
1870
1857
  ],
1871
1858
  "internalType": "struct IPolicy.PolicyInfo",
1872
- "name": "policyInfo",
1859
+ "name": "info",
1873
1860
  "type": "tuple"
1874
1861
  }
1875
1862
  ],
@@ -1881,46 +1868,47 @@
1881
1868
  {
1882
1869
  "inputs": [
1883
1870
  {
1884
- "internalType": "NftId",
1885
- "name": "poolNftId",
1886
- "type": "uint96"
1871
+ "internalType": "RiskId",
1872
+ "name": "riskId",
1873
+ "type": "bytes8"
1887
1874
  },
1888
1875
  {
1889
1876
  "components": [
1890
1877
  {
1891
- "internalType": "UFixed",
1892
- "name": "fractionalFee",
1893
- "type": "uint256"
1878
+ "internalType": "NftId",
1879
+ "name": "productNftId",
1880
+ "type": "uint96"
1894
1881
  },
1895
1882
  {
1896
- "internalType": "uint256",
1897
- "name": "fixedFee",
1898
- "type": "uint256"
1883
+ "internalType": "bytes",
1884
+ "name": "data",
1885
+ "type": "bytes"
1899
1886
  }
1900
1887
  ],
1901
- "internalType": "struct Fee",
1902
- "name": "stakingFee",
1888
+ "internalType": "struct IRisk.RiskInfo",
1889
+ "name": "info",
1903
1890
  "type": "tuple"
1891
+ }
1892
+ ],
1893
+ "name": "setRiskInfo",
1894
+ "outputs": [],
1895
+ "stateMutability": "nonpayable",
1896
+ "type": "function"
1897
+ },
1898
+ {
1899
+ "inputs": [
1900
+ {
1901
+ "internalType": "RoleId",
1902
+ "name": "role",
1903
+ "type": "bytes8"
1904
1904
  },
1905
1905
  {
1906
- "components": [
1907
- {
1908
- "internalType": "UFixed",
1909
- "name": "fractionalFee",
1910
- "type": "uint256"
1911
- },
1912
- {
1913
- "internalType": "uint256",
1914
- "name": "fixedFee",
1915
- "type": "uint256"
1916
- }
1917
- ],
1918
- "internalType": "struct Fee",
1919
- "name": "performanceFee",
1920
- "type": "tuple"
1906
+ "internalType": "bool",
1907
+ "name": "active",
1908
+ "type": "bool"
1921
1909
  }
1922
1910
  ],
1923
- "name": "setPoolFees",
1911
+ "name": "setRoleState",
1924
1912
  "outputs": [],
1925
1913
  "stateMutability": "nonpayable",
1926
1914
  "type": "function"
@@ -1935,39 +1923,129 @@
1935
1923
  {
1936
1924
  "components": [
1937
1925
  {
1938
- "internalType": "UFixed",
1939
- "name": "fractionalFee",
1940
- "type": "uint256"
1926
+ "internalType": "NftId",
1927
+ "name": "poolNftId",
1928
+ "type": "uint96"
1941
1929
  },
1942
1930
  {
1943
- "internalType": "uint256",
1944
- "name": "fixedFee",
1945
- "type": "uint256"
1946
- }
1947
- ],
1948
- "internalType": "struct Fee",
1949
- "name": "policyFee",
1950
- "type": "tuple"
1951
- },
1952
- {
1953
- "components": [
1931
+ "internalType": "NftId",
1932
+ "name": "distributionNftId",
1933
+ "type": "uint96"
1934
+ },
1954
1935
  {
1955
- "internalType": "UFixed",
1956
- "name": "fractionalFee",
1957
- "type": "uint256"
1936
+ "internalType": "contract IERC20Metadata",
1937
+ "name": "token",
1938
+ "type": "address"
1958
1939
  },
1959
1940
  {
1960
- "internalType": "uint256",
1961
- "name": "fixedFee",
1962
- "type": "uint256"
1941
+ "components": [
1942
+ {
1943
+ "internalType": "UFixed",
1944
+ "name": "fractionalFee",
1945
+ "type": "uint256"
1946
+ },
1947
+ {
1948
+ "internalType": "uint256",
1949
+ "name": "fixedFee",
1950
+ "type": "uint256"
1951
+ }
1952
+ ],
1953
+ "internalType": "struct Fee",
1954
+ "name": "productFee",
1955
+ "type": "tuple"
1956
+ },
1957
+ {
1958
+ "components": [
1959
+ {
1960
+ "internalType": "UFixed",
1961
+ "name": "fractionalFee",
1962
+ "type": "uint256"
1963
+ },
1964
+ {
1965
+ "internalType": "uint256",
1966
+ "name": "fixedFee",
1967
+ "type": "uint256"
1968
+ }
1969
+ ],
1970
+ "internalType": "struct Fee",
1971
+ "name": "processingFee",
1972
+ "type": "tuple"
1973
+ },
1974
+ {
1975
+ "components": [
1976
+ {
1977
+ "internalType": "UFixed",
1978
+ "name": "fractionalFee",
1979
+ "type": "uint256"
1980
+ },
1981
+ {
1982
+ "internalType": "uint256",
1983
+ "name": "fixedFee",
1984
+ "type": "uint256"
1985
+ }
1986
+ ],
1987
+ "internalType": "struct Fee",
1988
+ "name": "poolFee",
1989
+ "type": "tuple"
1990
+ },
1991
+ {
1992
+ "components": [
1993
+ {
1994
+ "internalType": "UFixed",
1995
+ "name": "fractionalFee",
1996
+ "type": "uint256"
1997
+ },
1998
+ {
1999
+ "internalType": "uint256",
2000
+ "name": "fixedFee",
2001
+ "type": "uint256"
2002
+ }
2003
+ ],
2004
+ "internalType": "struct Fee",
2005
+ "name": "stakingFee",
2006
+ "type": "tuple"
2007
+ },
2008
+ {
2009
+ "components": [
2010
+ {
2011
+ "internalType": "UFixed",
2012
+ "name": "fractionalFee",
2013
+ "type": "uint256"
2014
+ },
2015
+ {
2016
+ "internalType": "uint256",
2017
+ "name": "fixedFee",
2018
+ "type": "uint256"
2019
+ }
2020
+ ],
2021
+ "internalType": "struct Fee",
2022
+ "name": "performanceFee",
2023
+ "type": "tuple"
2024
+ },
2025
+ {
2026
+ "components": [
2027
+ {
2028
+ "internalType": "UFixed",
2029
+ "name": "fractionalFee",
2030
+ "type": "uint256"
2031
+ },
2032
+ {
2033
+ "internalType": "uint256",
2034
+ "name": "fixedFee",
2035
+ "type": "uint256"
2036
+ }
2037
+ ],
2038
+ "internalType": "struct Fee",
2039
+ "name": "distributionFee",
2040
+ "type": "tuple"
1963
2041
  }
1964
2042
  ],
1965
- "internalType": "struct Fee",
1966
- "name": "processingFee",
2043
+ "internalType": "struct ITreasury.TreasuryInfo",
2044
+ "name": "info",
1967
2045
  "type": "tuple"
1968
2046
  }
1969
2047
  ],
1970
- "name": "setProductFees",
2048
+ "name": "setTreasuryInfo",
1971
2049
  "outputs": [],
1972
2050
  "stateMutability": "nonpayable",
1973
2051
  "type": "function"
@@ -1975,17 +2053,36 @@
1975
2053
  {
1976
2054
  "inputs": [
1977
2055
  {
1978
- "internalType": "RoleId",
1979
- "name": "role",
1980
- "type": "bytes8"
1981
- },
2056
+ "internalType": "bytes4",
2057
+ "name": "interfaceId",
2058
+ "type": "bytes4"
2059
+ }
2060
+ ],
2061
+ "name": "supportsInterface",
2062
+ "outputs": [
1982
2063
  {
1983
2064
  "internalType": "bool",
1984
- "name": "active",
2065
+ "name": "",
1985
2066
  "type": "bool"
1986
2067
  }
1987
2068
  ],
1988
- "name": "setRoleState",
2069
+ "stateMutability": "view",
2070
+ "type": "function"
2071
+ },
2072
+ {
2073
+ "inputs": [
2074
+ {
2075
+ "internalType": "NftId",
2076
+ "name": "nftId",
2077
+ "type": "uint96"
2078
+ },
2079
+ {
2080
+ "internalType": "StateId",
2081
+ "name": "state",
2082
+ "type": "uint8"
2083
+ }
2084
+ ],
2085
+ "name": "updateBundleState",
1989
2086
  "outputs": [],
1990
2087
  "stateMutability": "nonpayable",
1991
2088
  "type": "function"
@@ -1993,20 +2090,78 @@
1993
2090
  {
1994
2091
  "inputs": [
1995
2092
  {
1996
- "internalType": "bytes4",
1997
- "name": "interfaceId",
1998
- "type": "bytes4"
2093
+ "internalType": "NftId",
2094
+ "name": "nftId",
2095
+ "type": "uint96"
2096
+ },
2097
+ {
2098
+ "internalType": "StateId",
2099
+ "name": "state",
2100
+ "type": "uint8"
1999
2101
  }
2000
2102
  ],
2001
- "name": "supportsInterface",
2002
- "outputs": [
2103
+ "name": "updatePolicyState",
2104
+ "outputs": [],
2105
+ "stateMutability": "nonpayable",
2106
+ "type": "function"
2107
+ },
2108
+ {
2109
+ "inputs": [
2003
2110
  {
2004
- "internalType": "bool",
2005
- "name": "",
2006
- "type": "bool"
2111
+ "internalType": "RiskId",
2112
+ "name": "riskId",
2113
+ "type": "bytes8"
2114
+ },
2115
+ {
2116
+ "internalType": "StateId",
2117
+ "name": "state",
2118
+ "type": "uint8"
2007
2119
  }
2008
2120
  ],
2009
- "stateMutability": "view",
2121
+ "name": "updateRiskState",
2122
+ "outputs": [],
2123
+ "stateMutability": "nonpayable",
2124
+ "type": "function"
2125
+ },
2126
+ {
2127
+ "inputs": [
2128
+ {
2129
+ "internalType": "Key32",
2130
+ "name": "key",
2131
+ "type": "bytes32"
2132
+ },
2133
+ {
2134
+ "internalType": "StateId",
2135
+ "name": "state",
2136
+ "type": "uint8"
2137
+ }
2138
+ ],
2139
+ "name": "updateState",
2140
+ "outputs": [],
2141
+ "stateMutability": "nonpayable",
2142
+ "type": "function"
2143
+ },
2144
+ {
2145
+ "inputs": [
2146
+ {
2147
+ "internalType": "address",
2148
+ "name": "implementation",
2149
+ "type": "address"
2150
+ },
2151
+ {
2152
+ "internalType": "address",
2153
+ "name": "activatedBy",
2154
+ "type": "address"
2155
+ },
2156
+ {
2157
+ "internalType": "bytes",
2158
+ "name": "upgradeData",
2159
+ "type": "bytes"
2160
+ }
2161
+ ],
2162
+ "name": "upgrade",
2163
+ "outputs": [],
2164
+ "stateMutability": "nonpayable",
2010
2165
  "type": "function"
2011
2166
  }
2012
2167
  ],