@etherisc/gif-next 0.0.2-6f2f76e-746 → 0.0.2-716a895-659

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 (312) 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 +166 -39
  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 +1 -1
  7. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +119 -39
  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 +417 -88
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +360 -51
  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 +847 -615
  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 +1107 -697
  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} +225 -57
  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 +175 -54
  53. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +4 -0
  54. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +544 -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 +221 -53
  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 -51
  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 -51
  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 +400 -64
  106. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  107. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +630 -0
  108. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +1 -1
  109. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +176 -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} +204 -58
  112. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  113. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +235 -50
  114. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  115. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +325 -51
  116. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  117. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +335 -53
  118. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  119. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +471 -71
  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 +190 -51
  126. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
  127. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +872 -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 +380 -139
  132. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
  133. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +1245 -0
  134. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
  135. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +490 -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/INftOwnable.sol/INftOwnable.dbg.json +4 -0
  141. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +127 -0
  142. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  143. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +117 -37
  144. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  145. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +55 -14
  146. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +4 -0
  147. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +158 -0
  148. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
  149. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +349 -0
  150. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  151. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +190 -37
  152. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
  153. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
  154. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  155. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +78 -14
  156. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
  157. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +557 -0
  158. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  159. package/artifacts/contracts/test/TestFee.sol/TestFee.json +2 -2
  160. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +1 -1
  161. package/artifacts/contracts/test/TestPool.sol/TestPool.json +417 -88
  162. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +1 -1
  163. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +407 -56
  164. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  165. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +204 -36
  166. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  167. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +38 -4
  168. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  169. package/artifacts/contracts/test/TestService.sol/TestService.json +267 -62
  170. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  171. package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +91 -53
  172. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  173. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +2 -2
  174. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  175. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +89 -25
  176. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
  177. package/artifacts/contracts/test/Usdc.sol/USDC.json +376 -0
  178. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  179. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  180. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  181. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  182. package/artifacts/contracts/types/Fee.sol/FeeLib.json +55 -11
  183. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
  184. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +111 -0
  185. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  186. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +65 -4
  187. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  188. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
  189. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  190. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  191. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
  192. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
  193. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  194. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  195. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
  196. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +30 -0
  197. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  198. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  199. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  200. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
  201. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +39 -8
  202. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  203. package/artifacts/contracts/types/Version.sol/VersionLib.json +40 -2
  204. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  205. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
  206. package/contracts/components/BaseComponent.sol +11 -21
  207. package/contracts/components/Distribution.sol +155 -0
  208. package/contracts/components/IBaseComponent.sol +1 -1
  209. package/contracts/components/IDistributionComponent.sol +46 -0
  210. package/contracts/components/IPoolComponent.sol +15 -8
  211. package/contracts/components/IProductComponent.sol +26 -8
  212. package/contracts/components/Pool.sol +99 -27
  213. package/contracts/components/Product.sol +204 -22
  214. package/contracts/instance/IInstance.sol +17 -16
  215. package/contracts/instance/Instance.sol +35 -14
  216. package/contracts/instance/{service → base}/ComponentServiceBase.sol +13 -5
  217. package/contracts/instance/base/IInstanceBase.sol +23 -0
  218. package/contracts/instance/base/IKeyValueStore.sol +50 -0
  219. package/contracts/instance/base/ILifecycle.sol +30 -0
  220. package/contracts/instance/base/InstanceBase.sol +89 -0
  221. package/contracts/instance/base/KeyValueStore.sol +161 -0
  222. package/contracts/instance/{module/lifecycle/LifecycleModule.sol → base/Lifecycle.sol} +50 -39
  223. package/contracts/instance/base/ModuleBase.sol +57 -0
  224. package/contracts/instance/base/ServiceBase.sol +44 -0
  225. package/contracts/instance/module/access/Access.sol +6 -6
  226. package/contracts/instance/module/bundle/BundleModule.sol +24 -118
  227. package/contracts/instance/module/bundle/IBundle.sol +9 -9
  228. package/contracts/instance/module/component/ComponentModule.sol +31 -63
  229. package/contracts/instance/module/component/IComponent.sol +6 -31
  230. package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
  231. package/contracts/instance/module/distribution/IDistribution.sol +10 -0
  232. package/contracts/instance/module/policy/IPolicy.sol +13 -10
  233. package/contracts/instance/module/policy/PolicyModule.sol +33 -26
  234. package/contracts/instance/module/pool/IPoolModule.sol +4 -4
  235. package/contracts/instance/module/pool/PoolModule.sol +23 -15
  236. package/contracts/instance/module/risk/IRisk.sol +18 -2
  237. package/contracts/instance/module/risk/RiskModule.sol +56 -2
  238. package/contracts/instance/module/treasury/ITreasury.sol +31 -50
  239. package/contracts/instance/module/treasury/TokenHandler.sol +1 -1
  240. package/contracts/instance/module/treasury/TreasuryModule.sol +67 -88
  241. package/contracts/instance/service/ComponentOwnerService.sol +234 -93
  242. package/contracts/instance/service/DistributionService.sol +54 -0
  243. package/contracts/instance/service/IComponentOwnerService.sol +1 -3
  244. package/contracts/instance/service/IDistributionService.sol +12 -0
  245. package/contracts/instance/service/IPoolService.sol +8 -1
  246. package/contracts/instance/service/IProductService.sol +56 -7
  247. package/contracts/instance/service/PoolService.sol +50 -24
  248. package/contracts/instance/service/ProductService.sol +249 -94
  249. package/contracts/registry/ChainNft.sol +42 -14
  250. package/contracts/registry/IChainNft.sol +2 -1
  251. package/contracts/registry/IRegistry.sol +27 -27
  252. package/contracts/registry/IRegistryService.sol +35 -0
  253. package/contracts/registry/ITransferInterceptor.sol +6 -0
  254. package/contracts/registry/Registry.sol +314 -269
  255. package/contracts/registry/RegistryService.sol +441 -0
  256. package/contracts/registry/RegistryServiceManager.sol +63 -0
  257. package/contracts/shared/ContractDeployerLib.sol +72 -0
  258. package/contracts/shared/INftOwnable.sol +22 -0
  259. package/contracts/shared/IRegisterable.sol +8 -15
  260. package/contracts/shared/IVersionable.sol +55 -11
  261. package/contracts/shared/NftOwnable.sol +136 -0
  262. package/contracts/shared/ProxyManager.sol +94 -0
  263. package/contracts/shared/Registerable.sol +62 -59
  264. package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
  265. package/contracts/shared/Versionable.sol +112 -54
  266. package/contracts/test/TestDistribution.sol +22 -0
  267. package/contracts/test/TestPool.sol +7 -2
  268. package/contracts/test/TestProduct.sol +37 -7
  269. package/contracts/test/TestRegisterable.sol +5 -6
  270. package/contracts/test/TestRoleId.sol +2 -2
  271. package/contracts/test/TestService.sol +6 -12
  272. package/contracts/test/Usdc.sol +26 -0
  273. package/contracts/types/Fee.sol +8 -3
  274. package/contracts/types/Key32.sol +45 -0
  275. package/contracts/types/NftId.sol +16 -1
  276. package/contracts/types/ObjectType.sol +24 -8
  277. package/contracts/types/ReferralId.sol +48 -0
  278. package/contracts/types/RiskId.sol +43 -0
  279. package/contracts/types/RoleId.sol +18 -9
  280. package/contracts/types/StateId.sol +7 -1
  281. package/contracts/types/UFixed.sol +22 -19
  282. package/contracts/types/Version.sol +9 -0
  283. package/package.json +1 -1
  284. package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.dbg.json +0 -4
  285. package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.json +0 -50
  286. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +0 -4
  287. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +0 -4
  288. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +0 -10
  289. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +0 -4
  290. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +0 -4
  291. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
  292. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
  293. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
  294. package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
  295. package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
  296. package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
  297. package/artifacts/contracts/instance/service/IService.sol/IService.dbg.json +0 -4
  298. package/artifacts/contracts/instance/service/ServiceBase.sol/ServiceBase.dbg.json +0 -4
  299. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +0 -4
  300. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +0 -24
  301. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +0 -4
  302. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.json +0 -24
  303. package/contracts/experiment/statemachine/README.md +0 -112
  304. package/contracts/instance/IServiceLinked.sol +0 -12
  305. package/contracts/instance/InstanceBase.sol +0 -71
  306. package/contracts/instance/module/compensation/CompensationModule.sol +0 -8
  307. package/contracts/instance/module/compensation/ICompensation.sol +0 -10
  308. package/contracts/instance/module/lifecycle/ILifecycle.sol +0 -47
  309. package/contracts/instance/service/ServiceBase.sol +0 -39
  310. package/contracts/registry/IRegistryLinked.sol +0 -8
  311. package/contracts/shared/IOwnable.sol +0 -6
  312. /package/contracts/instance/{service → base}/IService.sol +0 -0
@@ -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
  {
@@ -108,87 +136,6 @@
108
136
  "name": "LogAccessRoleStateSet",
109
137
  "type": "event"
110
138
  },
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
139
  {
193
140
  "anonymous": false,
194
141
  "inputs": [
@@ -211,27 +158,9 @@
211
158
  "type": "address"
212
159
  }
213
160
  ],
214
- "name": "LogVersionableActivated",
161
+ "name": "LogVersionableInitialized",
215
162
  "type": "event"
216
163
  },
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
164
  {
236
165
  "inputs": [
237
166
  {
@@ -323,22 +252,34 @@
323
252
  "inputs": [
324
253
  {
325
254
  "internalType": "NftId",
326
- "name": "productNftId",
255
+ "name": "bundleNftId",
327
256
  "type": "uint96"
328
257
  },
329
258
  {
330
259
  "internalType": "NftId",
331
- "name": "policyNftId",
260
+ "name": "poolNftId",
332
261
  "type": "uint96"
333
262
  },
334
263
  {
335
- "internalType": "uint256",
336
- "name": "sumInsuredAmount",
337
- "type": "uint256"
264
+ "components": [
265
+ {
266
+ "internalType": "UFixed",
267
+ "name": "fractionalFee",
268
+ "type": "uint256"
269
+ },
270
+ {
271
+ "internalType": "uint256",
272
+ "name": "fixedFee",
273
+ "type": "uint256"
274
+ }
275
+ ],
276
+ "internalType": "struct Fee",
277
+ "name": "fee",
278
+ "type": "tuple"
338
279
  },
339
280
  {
340
281
  "internalType": "uint256",
341
- "name": "premiumAmount",
282
+ "name": "amount",
342
283
  "type": "uint256"
343
284
  },
344
285
  {
@@ -347,12 +288,12 @@
347
288
  "type": "uint256"
348
289
  },
349
290
  {
350
- "internalType": "NftId",
351
- "name": "bundleNftId",
352
- "type": "uint96"
291
+ "internalType": "bytes",
292
+ "name": "filter",
293
+ "type": "bytes"
353
294
  }
354
295
  ],
355
- "name": "createApplication",
296
+ "name": "createBundleInfo",
356
297
  "outputs": [],
357
298
  "stateMutability": "nonpayable",
358
299
  "type": "function"
@@ -361,17 +302,32 @@
361
302
  "inputs": [
362
303
  {
363
304
  "internalType": "NftId",
364
- "name": "bundleNftId",
305
+ "name": "policyNftId",
365
306
  "type": "uint96"
366
307
  },
367
308
  {
368
309
  "internalType": "NftId",
369
- "name": "poolNftId",
310
+ "name": "productNftId",
370
311
  "type": "uint96"
371
312
  },
313
+ {
314
+ "internalType": "ReferralId",
315
+ "name": "referralId",
316
+ "type": "bytes8"
317
+ },
318
+ {
319
+ "internalType": "RiskId",
320
+ "name": "riskId",
321
+ "type": "bytes8"
322
+ },
372
323
  {
373
324
  "internalType": "uint256",
374
- "name": "amount",
325
+ "name": "sumInsuredAmount",
326
+ "type": "uint256"
327
+ },
328
+ {
329
+ "internalType": "uint256",
330
+ "name": "premiumAmount",
375
331
  "type": "uint256"
376
332
  },
377
333
  {
@@ -379,13 +335,36 @@
379
335
  "name": "lifetime",
380
336
  "type": "uint256"
381
337
  },
338
+ {
339
+ "internalType": "NftId",
340
+ "name": "bundleNftId",
341
+ "type": "uint96"
342
+ }
343
+ ],
344
+ "name": "createPolicyInfo",
345
+ "outputs": [],
346
+ "stateMutability": "nonpayable",
347
+ "type": "function"
348
+ },
349
+ {
350
+ "inputs": [
351
+ {
352
+ "internalType": "RiskId",
353
+ "name": "riskId",
354
+ "type": "bytes8"
355
+ },
356
+ {
357
+ "internalType": "NftId",
358
+ "name": "productNftId",
359
+ "type": "uint96"
360
+ },
382
361
  {
383
362
  "internalType": "bytes",
384
- "name": "filter",
363
+ "name": "data",
385
364
  "type": "bytes"
386
365
  }
387
366
  ],
388
- "name": "createBundleInfo",
367
+ "name": "createRisk",
389
368
  "outputs": [],
390
369
  "stateMutability": "nonpayable",
391
370
  "type": "function"
@@ -432,7 +411,7 @@
432
411
  "inputs": [
433
412
  {
434
413
  "internalType": "NftId",
435
- "name": "bundleNftId",
414
+ "name": "nftId",
436
415
  "type": "uint96"
437
416
  }
438
417
  ],
@@ -440,20 +419,27 @@
440
419
  "outputs": [
441
420
  {
442
421
  "components": [
443
- {
444
- "internalType": "NftId",
445
- "name": "nftId",
446
- "type": "uint96"
447
- },
448
422
  {
449
423
  "internalType": "NftId",
450
424
  "name": "poolNftId",
451
425
  "type": "uint96"
452
426
  },
453
427
  {
454
- "internalType": "StateId",
455
- "name": "state",
456
- "type": "uint8"
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"
457
443
  },
458
444
  {
459
445
  "internalType": "bytes",
@@ -475,11 +461,6 @@
475
461
  "name": "balanceAmount",
476
462
  "type": "uint256"
477
463
  },
478
- {
479
- "internalType": "Timestamp",
480
- "name": "createdAt",
481
- "type": "uint40"
482
- },
483
464
  {
484
465
  "internalType": "Timestamp",
485
466
  "name": "expiredAt",
@@ -489,11 +470,6 @@
489
470
  "internalType": "Timestamp",
490
471
  "name": "closedAt",
491
472
  "type": "uint40"
492
- },
493
- {
494
- "internalType": "Blocknumber",
495
- "name": "updatedIn",
496
- "type": "uint32"
497
473
  }
498
474
  ],
499
475
  "internalType": "struct IBundle.BundleInfo",
@@ -560,6 +536,19 @@
560
536
  "stateMutability": "view",
561
537
  "type": "function"
562
538
  },
539
+ {
540
+ "inputs": [],
541
+ "name": "getComponentOwnerService",
542
+ "outputs": [
543
+ {
544
+ "internalType": "contract IComponentOwnerService",
545
+ "name": "",
546
+ "type": "address"
547
+ }
548
+ ],
549
+ "stateMutability": "view",
550
+ "type": "function"
551
+ },
563
552
  {
564
553
  "inputs": [
565
554
  {
@@ -568,41 +557,30 @@
568
557
  "type": "uint96"
569
558
  }
570
559
  ],
571
- "name": "getComponentInfo",
560
+ "name": "getComponentToken",
572
561
  "outputs": [
573
562
  {
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"
563
+ "internalType": "contract IERC20Metadata",
564
+ "name": "token",
565
+ "type": "address"
594
566
  }
595
567
  ],
596
568
  "stateMutability": "view",
597
569
  "type": "function"
598
570
  },
599
571
  {
600
- "inputs": [],
601
- "name": "getComponentOwnerService",
572
+ "inputs": [
573
+ {
574
+ "internalType": "NftId",
575
+ "name": "nftId",
576
+ "type": "uint96"
577
+ }
578
+ ],
579
+ "name": "getComponentWallet",
602
580
  "outputs": [
603
581
  {
604
- "internalType": "contract IComponentOwnerService",
605
- "name": "",
582
+ "internalType": "address",
583
+ "name": "wallet",
606
584
  "type": "address"
607
585
  }
608
586
  ],
@@ -611,12 +589,12 @@
611
589
  },
612
590
  {
613
591
  "inputs": [],
614
- "name": "getData",
592
+ "name": "getDistributionService",
615
593
  "outputs": [
616
594
  {
617
- "internalType": "bytes",
618
- "name": "data",
619
- "type": "bytes"
595
+ "internalType": "contract IDistributionService",
596
+ "name": "",
597
+ "type": "address"
620
598
  }
621
599
  ],
622
600
  "stateMutability": "view",
@@ -659,19 +637,55 @@
659
637
  "type": "function"
660
638
  },
661
639
  {
662
- "inputs": [
663
- {
664
- "internalType": "ObjectType",
665
- "name": "objectType",
666
- "type": "uint8"
667
- }
668
- ],
669
- "name": "getInitialState",
640
+ "inputs": [],
641
+ "name": "getInitialInfo",
670
642
  "outputs": [
671
643
  {
672
- "internalType": "StateId",
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",
673
682
  "name": "",
674
- "type": "uint8"
683
+ "type": "tuple"
684
+ },
685
+ {
686
+ "internalType": "bytes",
687
+ "name": "data",
688
+ "type": "bytes"
675
689
  }
676
690
  ],
677
691
  "stateMutability": "view",
@@ -679,12 +693,12 @@
679
693
  },
680
694
  {
681
695
  "inputs": [],
682
- "name": "getNftId",
696
+ "name": "getInitializedVersion",
683
697
  "outputs": [
684
698
  {
685
- "internalType": "NftId",
686
- "name": "nftId",
687
- "type": "uint96"
699
+ "internalType": "uint64",
700
+ "name": "",
701
+ "type": "uint64"
688
702
  }
689
703
  ],
690
704
  "stateMutability": "view",
@@ -692,11 +706,11 @@
692
706
  },
693
707
  {
694
708
  "inputs": [],
695
- "name": "getOwner",
709
+ "name": "getKeyValueStore",
696
710
  "outputs": [
697
711
  {
698
- "internalType": "address",
699
- "name": "owner",
712
+ "internalType": "contract IKeyValueStore",
713
+ "name": "keyValueStore",
700
714
  "type": "address"
701
715
  }
702
716
  ],
@@ -705,17 +719,30 @@
705
719
  },
706
720
  {
707
721
  "inputs": [],
708
- "name": "getParentNftId",
722
+ "name": "getNftId",
709
723
  "outputs": [
710
724
  {
711
725
  "internalType": "NftId",
712
- "name": "nftId",
726
+ "name": "",
713
727
  "type": "uint96"
714
728
  }
715
729
  ],
716
730
  "stateMutability": "view",
717
731
  "type": "function"
718
732
  },
733
+ {
734
+ "inputs": [],
735
+ "name": "getOwner",
736
+ "outputs": [
737
+ {
738
+ "internalType": "address",
739
+ "name": "owner",
740
+ "type": "address"
741
+ }
742
+ ],
743
+ "stateMutability": "view",
744
+ "type": "function"
745
+ },
719
746
  {
720
747
  "inputs": [
721
748
  {
@@ -728,11 +755,6 @@
728
755
  "outputs": [
729
756
  {
730
757
  "components": [
731
- {
732
- "internalType": "NftId",
733
- "name": "nftId",
734
- "type": "uint96"
735
- },
736
758
  {
737
759
  "internalType": "NftId",
738
760
  "name": "productNftId",
@@ -743,15 +765,20 @@
743
765
  "name": "bundleNftId",
744
766
  "type": "uint96"
745
767
  },
768
+ {
769
+ "internalType": "ReferralId",
770
+ "name": "referralId",
771
+ "type": "bytes8"
772
+ },
746
773
  {
747
774
  "internalType": "address",
748
775
  "name": "beneficiary",
749
776
  "type": "address"
750
777
  },
751
778
  {
752
- "internalType": "StateId",
753
- "name": "state",
754
- "type": "uint8"
779
+ "internalType": "RiskId",
780
+ "name": "riskId",
781
+ "type": "bytes8"
755
782
  },
756
783
  {
757
784
  "internalType": "uint256",
@@ -775,13 +802,13 @@
775
802
  },
776
803
  {
777
804
  "internalType": "bytes",
778
- "name": "data",
805
+ "name": "applicationData",
779
806
  "type": "bytes"
780
807
  },
781
808
  {
782
- "internalType": "Timestamp",
783
- "name": "createdAt",
784
- "type": "uint40"
809
+ "internalType": "bytes",
810
+ "name": "policyData",
811
+ "type": "bytes"
785
812
  },
786
813
  {
787
814
  "internalType": "Timestamp",
@@ -797,11 +824,6 @@
797
824
  "internalType": "Timestamp",
798
825
  "name": "closedAt",
799
826
  "type": "uint40"
800
- },
801
- {
802
- "internalType": "Blocknumber",
803
- "name": "updatedIn",
804
- "type": "uint32"
805
827
  }
806
828
  ],
807
829
  "internalType": "struct IPolicy.PolicyInfo",
@@ -824,11 +846,6 @@
824
846
  "outputs": [
825
847
  {
826
848
  "components": [
827
- {
828
- "internalType": "NftId",
829
- "name": "nftId",
830
- "type": "uint96"
831
- },
832
849
  {
833
850
  "internalType": "bool",
834
851
  "name": "isVerifying",
@@ -865,62 +882,16 @@
865
882
  "inputs": [
866
883
  {
867
884
  "internalType": "NftId",
868
- "name": "poolNftId",
885
+ "name": "componentNftId",
869
886
  "type": "uint96"
870
887
  }
871
888
  ],
872
- "name": "getPoolSetup",
889
+ "name": "getProductNftId",
873
890
  "outputs": [
874
891
  {
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"
892
+ "internalType": "NftId",
893
+ "name": "productNftId",
894
+ "type": "uint96"
924
895
  }
925
896
  ],
926
897
  "stateMutability": "view",
@@ -939,15 +910,28 @@
939
910
  "stateMutability": "view",
940
911
  "type": "function"
941
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
+ },
942
926
  {
943
927
  "inputs": [
944
928
  {
945
- "internalType": "NftId",
946
- "name": "productNftId",
947
- "type": "uint96"
929
+ "internalType": "RiskId",
930
+ "name": "riskId",
931
+ "type": "bytes8"
948
932
  }
949
933
  ],
950
- "name": "getProductSetup",
934
+ "name": "getRiskInfo",
951
935
  "outputs": [
952
936
  {
953
937
  "components": [
@@ -957,62 +941,13 @@
957
941
  "type": "uint96"
958
942
  },
959
943
  {
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"
944
+ "internalType": "bytes",
945
+ "name": "data",
946
+ "type": "bytes"
1012
947
  }
1013
948
  ],
1014
- "internalType": "struct ITreasury.ProductSetup",
1015
- "name": "setup",
949
+ "internalType": "struct IRisk.RiskInfo",
950
+ "name": "info",
1016
951
  "type": "tuple"
1017
952
  }
1018
953
  ],
@@ -1020,20 +955,7 @@
1020
955
  "type": "function"
1021
956
  },
1022
957
  {
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
- {
1036
- "inputs": [
958
+ "inputs": [
1037
959
  {
1038
960
  "internalType": "uint256",
1039
961
  "name": "idx",
@@ -1162,6 +1084,25 @@
1162
1084
  "stateMutability": "view",
1163
1085
  "type": "function"
1164
1086
  },
1087
+ {
1088
+ "inputs": [
1089
+ {
1090
+ "internalType": "Key32",
1091
+ "name": "key",
1092
+ "type": "bytes32"
1093
+ }
1094
+ ],
1095
+ "name": "getState",
1096
+ "outputs": [
1097
+ {
1098
+ "internalType": "StateId",
1099
+ "name": "state",
1100
+ "type": "uint8"
1101
+ }
1102
+ ],
1103
+ "stateMutability": "view",
1104
+ "type": "function"
1105
+ },
1165
1106
  {
1166
1107
  "inputs": [
1167
1108
  {
@@ -1182,16 +1123,141 @@
1182
1123
  "type": "function"
1183
1124
  },
1184
1125
  {
1185
- "inputs": [],
1186
- "name": "getType",
1126
+ "inputs": [
1127
+ {
1128
+ "internalType": "NftId",
1129
+ "name": "productNftId",
1130
+ "type": "uint96"
1131
+ }
1132
+ ],
1133
+ "name": "getTreasuryInfo",
1187
1134
  "outputs": [
1188
1135
  {
1189
- "internalType": "ObjectType",
1190
- "name": "objectType",
1191
- "type": "uint8"
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"
1192
1258
  }
1193
1259
  ],
1194
- "stateMutability": "pure",
1260
+ "stateMutability": "view",
1195
1261
  "type": "function"
1196
1262
  },
1197
1263
  {
@@ -1350,7 +1416,7 @@
1350
1416
  "type": "tuple"
1351
1417
  }
1352
1418
  ],
1353
- "stateMutability": "pure",
1419
+ "stateMutability": "view",
1354
1420
  "type": "function"
1355
1421
  },
1356
1422
  {
@@ -1388,7 +1454,7 @@
1388
1454
  "outputs": [
1389
1455
  {
1390
1456
  "internalType": "bool",
1391
- "name": "hasRole",
1457
+ "name": "",
1392
1458
  "type": "bool"
1393
1459
  }
1394
1460
  ],
@@ -1398,16 +1464,16 @@
1398
1464
  {
1399
1465
  "inputs": [
1400
1466
  {
1401
- "internalType": "Version",
1402
- "name": "version",
1403
- "type": "uint24"
1467
+ "internalType": "NftId",
1468
+ "name": "productNftId",
1469
+ "type": "uint96"
1404
1470
  }
1405
1471
  ],
1406
- "name": "isActivated",
1472
+ "name": "hasTreasuryInfo",
1407
1473
  "outputs": [
1408
1474
  {
1409
1475
  "internalType": "bool",
1410
- "name": "",
1476
+ "name": "hasInfo",
1411
1477
  "type": "bool"
1412
1478
  }
1413
1479
  ],
@@ -1417,22 +1483,35 @@
1417
1483
  {
1418
1484
  "inputs": [
1419
1485
  {
1420
- "internalType": "ObjectType",
1421
- "name": "objectType",
1422
- "type": "uint8"
1486
+ "internalType": "address",
1487
+ "name": "implementation",
1488
+ "type": "address"
1423
1489
  },
1424
1490
  {
1425
- "internalType": "StateId",
1426
- "name": "fromId",
1427
- "type": "uint8"
1491
+ "internalType": "address",
1492
+ "name": "activatedBy",
1493
+ "type": "address"
1428
1494
  },
1429
1495
  {
1430
- "internalType": "StateId",
1431
- "name": "toId",
1432
- "type": "uint8"
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"
1433
1512
  }
1434
1513
  ],
1435
- "name": "isValidTransition",
1514
+ "name": "isInitialized",
1436
1515
  "outputs": [
1437
1516
  {
1438
1517
  "internalType": "bool",
@@ -1445,14 +1524,8 @@
1445
1524
  },
1446
1525
  {
1447
1526
  "inputs": [],
1448
- "name": "register",
1449
- "outputs": [
1450
- {
1451
- "internalType": "NftId",
1452
- "name": "nftId",
1453
- "type": "uint96"
1454
- }
1455
- ],
1527
+ "name": "linkToRegisteredNftId",
1528
+ "outputs": [],
1456
1529
  "stateMutability": "nonpayable",
1457
1530
  "type": "function"
1458
1531
  },
@@ -1463,15 +1536,15 @@
1463
1536
  "name": "nftId",
1464
1537
  "type": "uint96"
1465
1538
  },
1466
- {
1467
- "internalType": "ObjectType",
1468
- "name": "objectType",
1469
- "type": "uint8"
1470
- },
1471
1539
  {
1472
1540
  "internalType": "contract IERC20Metadata",
1473
1541
  "name": "token",
1474
1542
  "type": "address"
1543
+ },
1544
+ {
1545
+ "internalType": "address",
1546
+ "name": "wallet",
1547
+ "type": "address"
1475
1548
  }
1476
1549
  ],
1477
1550
  "name": "registerComponent",
@@ -1483,46 +1556,24 @@
1483
1556
  "inputs": [
1484
1557
  {
1485
1558
  "internalType": "NftId",
1486
- "name": "poolNftId",
1559
+ "name": "nftId",
1487
1560
  "type": "uint96"
1488
1561
  },
1489
- {
1490
- "internalType": "address",
1491
- "name": "wallet",
1492
- "type": "address"
1493
- },
1494
1562
  {
1495
1563
  "components": [
1496
1564
  {
1497
- "internalType": "UFixed",
1498
- "name": "fractionalFee",
1499
- "type": "uint256"
1565
+ "internalType": "bool",
1566
+ "name": "isVerifying",
1567
+ "type": "bool"
1500
1568
  },
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
1569
  {
1514
1570
  "internalType": "UFixed",
1515
- "name": "fractionalFee",
1516
- "type": "uint256"
1517
- },
1518
- {
1519
- "internalType": "uint256",
1520
- "name": "fixedFee",
1571
+ "name": "collateralizationLevel",
1521
1572
  "type": "uint256"
1522
1573
  }
1523
1574
  ],
1524
- "internalType": "struct Fee",
1525
- "name": "performanceFee",
1575
+ "internalType": "struct IPool.PoolInfo",
1576
+ "name": "info",
1526
1577
  "type": "tuple"
1527
1578
  }
1528
1579
  ],
@@ -1535,88 +1586,135 @@
1535
1586
  "inputs": [
1536
1587
  {
1537
1588
  "internalType": "NftId",
1538
- "name": "poolNftId",
1589
+ "name": "productNftId",
1539
1590
  "type": "uint96"
1540
1591
  },
1541
- {
1542
- "internalType": "bool",
1543
- "name": "isVerifying",
1544
- "type": "bool"
1545
- },
1546
- {
1547
- "internalType": "UFixed",
1548
- "name": "collateralizationLevel",
1549
- "type": "uint256"
1550
- }
1551
- ],
1552
- "name": "registerPool",
1553
- "outputs": [],
1554
- "stateMutability": "nonpayable",
1555
- "type": "function"
1556
- },
1557
- {
1558
- "inputs": [
1559
- {
1560
- "internalType": "NftId",
1561
- "name": "productNftId",
1562
- "type": "uint96"
1563
- },
1564
- {
1565
- "internalType": "NftId",
1566
- "name": "distributorNftId",
1567
- "type": "uint96"
1568
- },
1569
- {
1570
- "internalType": "NftId",
1571
- "name": "poolNftId",
1572
- "type": "uint96"
1573
- },
1574
- {
1575
- "internalType": "contract IERC20Metadata",
1576
- "name": "token",
1577
- "type": "address"
1578
- },
1579
- {
1580
- "internalType": "address",
1581
- "name": "wallet",
1582
- "type": "address"
1583
- },
1584
1592
  {
1585
1593
  "components": [
1586
1594
  {
1587
- "internalType": "UFixed",
1588
- "name": "fractionalFee",
1589
- "type": "uint256"
1595
+ "internalType": "NftId",
1596
+ "name": "poolNftId",
1597
+ "type": "uint96"
1590
1598
  },
1591
1599
  {
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": [
1600
+ "internalType": "NftId",
1601
+ "name": "distributionNftId",
1602
+ "type": "uint96"
1603
+ },
1603
1604
  {
1604
- "internalType": "UFixed",
1605
- "name": "fractionalFee",
1606
- "type": "uint256"
1605
+ "internalType": "contract IERC20Metadata",
1606
+ "name": "token",
1607
+ "type": "address"
1607
1608
  },
1608
1609
  {
1609
- "internalType": "uint256",
1610
- "name": "fixedFee",
1611
- "type": "uint256"
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"
1612
1710
  }
1613
1711
  ],
1614
- "internalType": "struct Fee",
1615
- "name": "processingFee",
1712
+ "internalType": "struct ITreasury.TreasuryInfo",
1713
+ "name": "info",
1616
1714
  "type": "tuple"
1617
1715
  }
1618
1716
  ],
1619
- "name": "registerProduct",
1717
+ "name": "registerProductSetup",
1620
1718
  "outputs": [],
1621
1719
  "stateMutability": "nonpayable",
1622
1720
  "type": "function"
@@ -1684,22 +1782,34 @@
1684
1782
  },
1685
1783
  {
1686
1784
  "inputs": [
1785
+ {
1786
+ "internalType": "NftId",
1787
+ "name": "nftId",
1788
+ "type": "uint96"
1789
+ },
1687
1790
  {
1688
1791
  "components": [
1689
- {
1690
- "internalType": "NftId",
1691
- "name": "nftId",
1692
- "type": "uint96"
1693
- },
1694
1792
  {
1695
1793
  "internalType": "NftId",
1696
1794
  "name": "poolNftId",
1697
1795
  "type": "uint96"
1698
1796
  },
1699
1797
  {
1700
- "internalType": "StateId",
1701
- "name": "state",
1702
- "type": "uint8"
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"
1703
1813
  },
1704
1814
  {
1705
1815
  "internalType": "bytes",
@@ -1721,11 +1831,6 @@
1721
1831
  "name": "balanceAmount",
1722
1832
  "type": "uint256"
1723
1833
  },
1724
- {
1725
- "internalType": "Timestamp",
1726
- "name": "createdAt",
1727
- "type": "uint40"
1728
- },
1729
1834
  {
1730
1835
  "internalType": "Timestamp",
1731
1836
  "name": "expiredAt",
@@ -1735,11 +1840,6 @@
1735
1840
  "internalType": "Timestamp",
1736
1841
  "name": "closedAt",
1737
1842
  "type": "uint40"
1738
- },
1739
- {
1740
- "internalType": "Blocknumber",
1741
- "name": "updatedIn",
1742
- "type": "uint32"
1743
1843
  }
1744
1844
  ],
1745
1845
  "internalType": "struct IBundle.BundleInfo",
@@ -1754,49 +1854,13 @@
1754
1854
  },
1755
1855
  {
1756
1856
  "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
1857
  {
1783
1858
  "internalType": "NftId",
1784
- "name": "componentNftId",
1859
+ "name": "policyNftId",
1785
1860
  "type": "uint96"
1786
- }
1787
- ],
1788
- "stateMutability": "nonpayable",
1789
- "type": "function"
1790
- },
1791
- {
1792
- "inputs": [
1861
+ },
1793
1862
  {
1794
1863
  "components": [
1795
- {
1796
- "internalType": "NftId",
1797
- "name": "nftId",
1798
- "type": "uint96"
1799
- },
1800
1864
  {
1801
1865
  "internalType": "NftId",
1802
1866
  "name": "productNftId",
@@ -1807,15 +1871,20 @@
1807
1871
  "name": "bundleNftId",
1808
1872
  "type": "uint96"
1809
1873
  },
1874
+ {
1875
+ "internalType": "ReferralId",
1876
+ "name": "referralId",
1877
+ "type": "bytes8"
1878
+ },
1810
1879
  {
1811
1880
  "internalType": "address",
1812
1881
  "name": "beneficiary",
1813
1882
  "type": "address"
1814
1883
  },
1815
1884
  {
1816
- "internalType": "StateId",
1817
- "name": "state",
1818
- "type": "uint8"
1885
+ "internalType": "RiskId",
1886
+ "name": "riskId",
1887
+ "type": "bytes8"
1819
1888
  },
1820
1889
  {
1821
1890
  "internalType": "uint256",
@@ -1839,13 +1908,13 @@
1839
1908
  },
1840
1909
  {
1841
1910
  "internalType": "bytes",
1842
- "name": "data",
1911
+ "name": "applicationData",
1843
1912
  "type": "bytes"
1844
1913
  },
1845
1914
  {
1846
- "internalType": "Timestamp",
1847
- "name": "createdAt",
1848
- "type": "uint40"
1915
+ "internalType": "bytes",
1916
+ "name": "policyData",
1917
+ "type": "bytes"
1849
1918
  },
1850
1919
  {
1851
1920
  "internalType": "Timestamp",
@@ -1861,15 +1930,10 @@
1861
1930
  "internalType": "Timestamp",
1862
1931
  "name": "closedAt",
1863
1932
  "type": "uint40"
1864
- },
1865
- {
1866
- "internalType": "Blocknumber",
1867
- "name": "updatedIn",
1868
- "type": "uint32"
1869
1933
  }
1870
1934
  ],
1871
1935
  "internalType": "struct IPolicy.PolicyInfo",
1872
- "name": "policyInfo",
1936
+ "name": "info",
1873
1937
  "type": "tuple"
1874
1938
  }
1875
1939
  ],
@@ -1881,46 +1945,47 @@
1881
1945
  {
1882
1946
  "inputs": [
1883
1947
  {
1884
- "internalType": "NftId",
1885
- "name": "poolNftId",
1886
- "type": "uint96"
1948
+ "internalType": "RiskId",
1949
+ "name": "riskId",
1950
+ "type": "bytes8"
1887
1951
  },
1888
1952
  {
1889
1953
  "components": [
1890
1954
  {
1891
- "internalType": "UFixed",
1892
- "name": "fractionalFee",
1893
- "type": "uint256"
1955
+ "internalType": "NftId",
1956
+ "name": "productNftId",
1957
+ "type": "uint96"
1894
1958
  },
1895
1959
  {
1896
- "internalType": "uint256",
1897
- "name": "fixedFee",
1898
- "type": "uint256"
1960
+ "internalType": "bytes",
1961
+ "name": "data",
1962
+ "type": "bytes"
1899
1963
  }
1900
1964
  ],
1901
- "internalType": "struct Fee",
1902
- "name": "stakingFee",
1965
+ "internalType": "struct IRisk.RiskInfo",
1966
+ "name": "info",
1903
1967
  "type": "tuple"
1968
+ }
1969
+ ],
1970
+ "name": "setRiskInfo",
1971
+ "outputs": [],
1972
+ "stateMutability": "nonpayable",
1973
+ "type": "function"
1974
+ },
1975
+ {
1976
+ "inputs": [
1977
+ {
1978
+ "internalType": "RoleId",
1979
+ "name": "role",
1980
+ "type": "bytes8"
1904
1981
  },
1905
1982
  {
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"
1983
+ "internalType": "bool",
1984
+ "name": "active",
1985
+ "type": "bool"
1921
1986
  }
1922
1987
  ],
1923
- "name": "setPoolFees",
1988
+ "name": "setRoleState",
1924
1989
  "outputs": [],
1925
1990
  "stateMutability": "nonpayable",
1926
1991
  "type": "function"
@@ -1935,39 +2000,129 @@
1935
2000
  {
1936
2001
  "components": [
1937
2002
  {
1938
- "internalType": "UFixed",
1939
- "name": "fractionalFee",
1940
- "type": "uint256"
2003
+ "internalType": "NftId",
2004
+ "name": "poolNftId",
2005
+ "type": "uint96"
1941
2006
  },
1942
2007
  {
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": [
2008
+ "internalType": "NftId",
2009
+ "name": "distributionNftId",
2010
+ "type": "uint96"
2011
+ },
1954
2012
  {
1955
- "internalType": "UFixed",
1956
- "name": "fractionalFee",
1957
- "type": "uint256"
2013
+ "internalType": "contract IERC20Metadata",
2014
+ "name": "token",
2015
+ "type": "address"
1958
2016
  },
1959
2017
  {
1960
- "internalType": "uint256",
1961
- "name": "fixedFee",
1962
- "type": "uint256"
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"
1963
2118
  }
1964
2119
  ],
1965
- "internalType": "struct Fee",
1966
- "name": "processingFee",
2120
+ "internalType": "struct ITreasury.TreasuryInfo",
2121
+ "name": "info",
1967
2122
  "type": "tuple"
1968
2123
  }
1969
2124
  ],
1970
- "name": "setProductFees",
2125
+ "name": "setTreasuryInfo",
1971
2126
  "outputs": [],
1972
2127
  "stateMutability": "nonpayable",
1973
2128
  "type": "function"
@@ -1975,17 +2130,36 @@
1975
2130
  {
1976
2131
  "inputs": [
1977
2132
  {
1978
- "internalType": "RoleId",
1979
- "name": "role",
1980
- "type": "bytes8"
1981
- },
2133
+ "internalType": "bytes4",
2134
+ "name": "interfaceId",
2135
+ "type": "bytes4"
2136
+ }
2137
+ ],
2138
+ "name": "supportsInterface",
2139
+ "outputs": [
1982
2140
  {
1983
2141
  "internalType": "bool",
1984
- "name": "active",
2142
+ "name": "",
1985
2143
  "type": "bool"
1986
2144
  }
1987
2145
  ],
1988
- "name": "setRoleState",
2146
+ "stateMutability": "view",
2147
+ "type": "function"
2148
+ },
2149
+ {
2150
+ "inputs": [
2151
+ {
2152
+ "internalType": "NftId",
2153
+ "name": "nftId",
2154
+ "type": "uint96"
2155
+ },
2156
+ {
2157
+ "internalType": "StateId",
2158
+ "name": "state",
2159
+ "type": "uint8"
2160
+ }
2161
+ ],
2162
+ "name": "updateBundleState",
1989
2163
  "outputs": [],
1990
2164
  "stateMutability": "nonpayable",
1991
2165
  "type": "function"
@@ -1993,20 +2167,78 @@
1993
2167
  {
1994
2168
  "inputs": [
1995
2169
  {
1996
- "internalType": "bytes4",
1997
- "name": "interfaceId",
1998
- "type": "bytes4"
2170
+ "internalType": "NftId",
2171
+ "name": "nftId",
2172
+ "type": "uint96"
2173
+ },
2174
+ {
2175
+ "internalType": "StateId",
2176
+ "name": "state",
2177
+ "type": "uint8"
1999
2178
  }
2000
2179
  ],
2001
- "name": "supportsInterface",
2002
- "outputs": [
2180
+ "name": "updatePolicyState",
2181
+ "outputs": [],
2182
+ "stateMutability": "nonpayable",
2183
+ "type": "function"
2184
+ },
2185
+ {
2186
+ "inputs": [
2003
2187
  {
2004
- "internalType": "bool",
2005
- "name": "",
2006
- "type": "bool"
2188
+ "internalType": "RiskId",
2189
+ "name": "riskId",
2190
+ "type": "bytes8"
2191
+ },
2192
+ {
2193
+ "internalType": "StateId",
2194
+ "name": "state",
2195
+ "type": "uint8"
2007
2196
  }
2008
2197
  ],
2009
- "stateMutability": "view",
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"
2209
+ },
2210
+ {
2211
+ "internalType": "StateId",
2212
+ "name": "state",
2213
+ "type": "uint8"
2214
+ }
2215
+ ],
2216
+ "name": "updateState",
2217
+ "outputs": [],
2218
+ "stateMutability": "nonpayable",
2219
+ "type": "function"
2220
+ },
2221
+ {
2222
+ "inputs": [
2223
+ {
2224
+ "internalType": "address",
2225
+ "name": "implementation",
2226
+ "type": "address"
2227
+ },
2228
+ {
2229
+ "internalType": "address",
2230
+ "name": "activatedBy",
2231
+ "type": "address"
2232
+ },
2233
+ {
2234
+ "internalType": "bytes",
2235
+ "name": "upgradeData",
2236
+ "type": "bytes"
2237
+ }
2238
+ ],
2239
+ "name": "upgrade",
2240
+ "outputs": [],
2241
+ "stateMutability": "nonpayable",
2010
2242
  "type": "function"
2011
2243
  }
2012
2244
  ],