@etherisc/gif-next 0.0.2-de220d6-949 → 0.0.2-e1e92ab-754

Sign up to get free protection for your applications and to get access to all the features.
Files changed (302) hide show
  1. package/README.md +82 -0
  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/errors/Revert.sol/Revert.json +2 -34
  21. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  22. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  23. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  24. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  26. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  28. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  29. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
  30. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
  31. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
  32. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
  33. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
  34. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
  35. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  36. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  37. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  38. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +762 -698
  39. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +1 -1
  40. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  41. package/artifacts/contracts/instance/Instance.sol/Instance.json +945 -817
  42. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +1 -1
  43. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +224 -43
  44. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +1 -1
  45. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +51 -1
  46. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  47. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +49 -0
  48. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  49. package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +1 -1
  50. package/artifacts/contracts/instance/base/IService.sol/IService.json +174 -53
  51. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +1 -1
  52. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +263 -45
  53. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  54. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +41 -23
  55. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  56. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +4 -4
  57. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +1 -1
  58. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +1 -1
  59. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.json +220 -52
  60. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +1 -1
  61. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +55 -54
  62. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +1 -1
  63. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +1 -1
  64. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +56 -55
  65. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
  66. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +22 -93
  67. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +1 -1
  68. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +1 -1
  69. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +22 -93
  70. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +4 -0
  71. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +10 -0
  72. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +4 -0
  73. package/artifacts/contracts/instance/module/{access/IAccess.sol/IAccess.json → distribution/IDistribution.sol/IDistribution.json} +2 -2
  74. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +4 -0
  75. package/artifacts/contracts/instance/module/{compensation/ICompensation.sol/ICompensation.json → distribution/IDistribution.sol/IDistributionModule.json} +2 -2
  76. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
  77. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
  78. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +53 -53
  79. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
  80. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +53 -53
  81. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +1 -1
  82. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
  83. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +29 -14
  84. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
  85. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +28 -13
  86. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +1 -1
  87. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +1 -1
  88. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +104 -1
  89. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +1 -1
  90. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +126 -5
  91. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +1 -1
  92. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +1 -1
  93. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +326 -221
  94. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  95. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +2 -2
  96. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +1 -1
  97. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +326 -221
  98. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +1 -1
  99. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +374 -70
  100. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  101. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +630 -0
  102. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +1 -1
  103. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +176 -74
  104. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
  105. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +446 -0
  106. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  107. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +235 -50
  108. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  109. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +325 -51
  110. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  111. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +335 -53
  112. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  113. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +468 -73
  114. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  115. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +141 -12
  116. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
  117. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +5 -0
  118. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  119. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +190 -51
  120. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
  121. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +872 -0
  122. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
  123. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +34 -0
  124. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  125. package/artifacts/contracts/registry/Registry.sol/Registry.json +380 -139
  126. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
  127. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +1245 -0
  128. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
  129. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +490 -0
  130. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +4 -0
  131. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.json +107 -0
  132. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  133. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +2 -2
  134. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +4 -0
  135. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +127 -0
  136. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  137. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +117 -37
  138. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  139. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +55 -14
  140. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +4 -0
  141. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +158 -0
  142. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
  143. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +349 -0
  144. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  145. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +190 -37
  146. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
  147. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
  148. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  149. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +78 -14
  150. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
  151. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +557 -0
  152. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  153. package/artifacts/contracts/test/TestFee.sol/TestFee.json +4 -4
  154. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +1 -1
  155. package/artifacts/contracts/test/TestPool.sol/TestPool.json +417 -88
  156. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +1 -1
  157. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +407 -56
  158. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  159. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +204 -36
  160. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  161. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +2 -2
  162. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  163. package/artifacts/contracts/test/TestService.sol/TestService.json +267 -62
  164. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  165. package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +91 -53
  166. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  167. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +2 -2
  168. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  169. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +89 -25
  170. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  171. package/artifacts/contracts/test/Usdc.sol/USDC.json +91 -53
  172. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  173. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  174. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  175. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  176. package/artifacts/contracts/types/Fee.sol/FeeLib.json +52 -13
  177. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  178. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
  179. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  180. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
  181. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  182. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
  183. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  184. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  185. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
  186. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
  187. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  188. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  189. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
  190. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +2 -2
  191. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  192. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  193. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +4 -0
  194. package/artifacts/contracts/types/UFixed.sol/MathLib.json +10 -0
  195. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +4 -0
  196. package/artifacts/contracts/types/UFixed.sol/{UFixedMathLib.json → UFixedLib.json} +3 -3
  197. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  198. package/artifacts/contracts/types/Version.sol/VersionLib.json +40 -2
  199. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  200. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
  201. package/contracts/components/BaseComponent.sol +11 -20
  202. package/contracts/components/Distribution.sol +155 -0
  203. package/contracts/components/IBaseComponent.sol +1 -1
  204. package/contracts/components/IDistributionComponent.sol +46 -0
  205. package/contracts/components/IPoolComponent.sol +15 -8
  206. package/contracts/components/IProductComponent.sol +26 -8
  207. package/contracts/components/Pool.sol +99 -27
  208. package/contracts/components/Product.sol +204 -22
  209. package/contracts/experiment/errors/Revert.sol +4 -13
  210. package/contracts/instance/IInstance.sol +11 -11
  211. package/contracts/instance/Instance.sol +28 -13
  212. package/contracts/instance/base/ComponentServiceBase.sol +13 -6
  213. package/contracts/instance/base/IInstanceBase.sol +11 -2
  214. package/contracts/instance/base/IKeyValueStore.sol +4 -3
  215. package/contracts/instance/base/InstanceBase.sol +19 -10
  216. package/contracts/instance/base/KeyValueStore.sol +12 -7
  217. package/contracts/instance/base/Lifecycle.sol +15 -10
  218. package/contracts/instance/base/ModuleBase.sol +22 -17
  219. package/contracts/instance/base/ServiceBase.sol +20 -13
  220. package/contracts/instance/module/bundle/BundleModule.sol +10 -12
  221. package/contracts/instance/module/bundle/IBundle.sol +6 -11
  222. package/contracts/instance/module/component/ComponentModule.sol +33 -57
  223. package/contracts/instance/module/component/IComponent.sol +6 -31
  224. package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
  225. package/contracts/instance/module/distribution/IDistribution.sol +10 -0
  226. package/contracts/instance/module/policy/IPolicy.sol +11 -9
  227. package/contracts/instance/module/policy/PolicyModule.sol +33 -19
  228. package/contracts/instance/module/pool/IPoolModule.sol +4 -4
  229. package/contracts/instance/module/pool/PoolModule.sol +23 -15
  230. package/contracts/instance/module/risk/IRisk.sol +18 -2
  231. package/contracts/instance/module/risk/RiskModule.sol +56 -2
  232. package/contracts/instance/module/treasury/ITreasury.sol +31 -50
  233. package/contracts/instance/module/treasury/TokenHandler.sol +1 -1
  234. package/contracts/instance/module/treasury/TreasuryModule.sol +70 -91
  235. package/contracts/instance/service/ComponentOwnerService.sol +238 -93
  236. package/contracts/instance/service/DistributionService.sol +54 -0
  237. package/contracts/instance/service/IComponentOwnerService.sol +0 -2
  238. package/contracts/instance/service/IDistributionService.sol +12 -0
  239. package/contracts/instance/service/IPoolService.sol +7 -0
  240. package/contracts/instance/service/IProductService.sol +56 -7
  241. package/contracts/instance/service/PoolService.sol +49 -23
  242. package/contracts/instance/service/ProductService.sol +249 -93
  243. package/contracts/registry/ChainNft.sol +42 -14
  244. package/contracts/registry/IChainNft.sol +2 -1
  245. package/contracts/registry/IRegistry.sol +27 -27
  246. package/contracts/registry/IRegistryService.sol +35 -0
  247. package/contracts/registry/ITransferInterceptor.sol +6 -0
  248. package/contracts/registry/Registry.sol +313 -268
  249. package/contracts/registry/RegistryService.sol +441 -0
  250. package/contracts/registry/RegistryServiceManager.sol +63 -0
  251. package/contracts/shared/ContractDeployerLib.sol +72 -0
  252. package/contracts/shared/INftOwnable.sol +22 -0
  253. package/contracts/shared/IRegisterable.sol +8 -15
  254. package/contracts/shared/IVersionable.sol +55 -11
  255. package/contracts/shared/NftOwnable.sol +136 -0
  256. package/contracts/shared/ProxyManager.sol +94 -0
  257. package/contracts/shared/Registerable.sol +62 -59
  258. package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
  259. package/contracts/shared/Versionable.sol +112 -54
  260. package/contracts/test/TestDistribution.sol +22 -0
  261. package/contracts/test/TestFee.sol +2 -2
  262. package/contracts/test/TestPool.sol +7 -2
  263. package/contracts/test/TestProduct.sol +37 -7
  264. package/contracts/test/TestRegisterable.sol +5 -6
  265. package/contracts/test/TestService.sol +5 -11
  266. package/contracts/types/Fee.sol +10 -5
  267. package/contracts/types/ObjectType.sol +24 -8
  268. package/contracts/types/ReferralId.sol +48 -0
  269. package/contracts/types/RiskId.sol +43 -0
  270. package/contracts/types/RoleId.sol +9 -2
  271. package/contracts/types/UFixed.sol +128 -12
  272. package/contracts/types/Version.sol +9 -0
  273. package/package.json +4 -3
  274. package/artifacts/contracts/experiment/errors/IncrementRevert.sol/IIncrementRevert.dbg.json +0 -4
  275. package/artifacts/contracts/experiment/errors/IncrementRevert.sol/IIncrementRevert.json +0 -27
  276. package/artifacts/contracts/experiment/errors/IncrementRevert.sol/IncrementRevert.dbg.json +0 -4
  277. package/artifacts/contracts/experiment/errors/IncrementRevert.sol/IncrementRevert.json +0 -83
  278. package/artifacts/contracts/experiment/errors/Revert.sol/IRevert.dbg.json +0 -4
  279. package/artifacts/contracts/experiment/errors/Revert.sol/IRevert.json +0 -75
  280. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +0 -4
  281. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.json +0 -333
  282. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +0 -4
  283. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +0 -4
  284. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.json +0 -333
  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/compensation/ICompensation.sol/ICompensationModule.json +0 -10
  290. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +0 -4
  291. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +0 -24
  292. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +0 -4
  293. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.json +0 -24
  294. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +0 -4
  295. package/contracts/experiment/errors/IncrementRevert.sol +0 -43
  296. package/contracts/experiment/statemachine/README.md +0 -112
  297. package/contracts/instance/module/access/Access.sol +0 -149
  298. package/contracts/instance/module/access/IAccess.sol +0 -53
  299. package/contracts/instance/module/compensation/CompensationModule.sol +0 -8
  300. package/contracts/instance/module/compensation/ICompensation.sol +0 -10
  301. package/contracts/registry/IRegistryLinked.sol +0 -8
  302. package/contracts/shared/IOwnable.sol +0 -6
@@ -4,67 +4,74 @@
4
4
  "sourceName": "contracts/instance/IInstance.sol",
5
5
  "abi": [
6
6
  {
7
- "anonymous": false,
8
7
  "inputs": [
9
8
  {
10
- "indexed": false,
11
- "internalType": "RoleId",
12
- "name": "role",
13
- "type": "bytes8"
9
+ "internalType": "address",
10
+ "name": "registry",
11
+ "type": "address"
14
12
  },
15
13
  {
16
- "indexed": false,
17
- "internalType": "string",
18
- "name": "roleName",
19
- "type": "string"
14
+ "internalType": "NftId",
15
+ "name": "nftId",
16
+ "type": "uint96"
20
17
  }
21
18
  ],
22
- "name": "LogAccessRoleCreated",
23
- "type": "event"
19
+ "name": "ErrorAlreadyLinked",
20
+ "type": "error"
24
21
  },
25
22
  {
26
- "anonymous": false,
27
23
  "inputs": [
28
24
  {
29
- "indexed": false,
30
- "internalType": "RoleId",
31
- "name": "role",
32
- "type": "bytes8"
33
- },
34
- {
35
- "indexed": false,
36
25
  "internalType": "address",
37
- "name": "member",
26
+ "name": "contractAddress",
38
27
  "type": "address"
39
- },
28
+ }
29
+ ],
30
+ "name": "ErrorContractNotRegistered",
31
+ "type": "error"
32
+ },
33
+ {
34
+ "inputs": [
40
35
  {
41
- "indexed": false,
42
- "internalType": "bool",
43
- "name": "isMember",
44
- "type": "bool"
36
+ "internalType": "address",
37
+ "name": "account",
38
+ "type": "address"
45
39
  }
46
40
  ],
47
- "name": "LogAccessRoleGranted",
48
- "type": "event"
41
+ "name": "ErrorNotOwner",
42
+ "type": "error"
49
43
  },
50
44
  {
51
- "anonymous": false,
52
45
  "inputs": [
53
46
  {
54
- "indexed": false,
55
- "internalType": "RoleId",
56
- "name": "role",
57
- "type": "bytes8"
58
- },
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": [
59
62
  {
60
- "indexed": false,
61
- "internalType": "bool",
62
- "name": "active",
63
- "type": "bool"
63
+ "internalType": "address",
64
+ "name": "registry",
65
+ "type": "address"
64
66
  }
65
67
  ],
66
- "name": "LogAccessRoleStateSet",
67
- "type": "event"
68
+ "name": "ErrorRegistryAlreadyInitialized",
69
+ "type": "error"
70
+ },
71
+ {
72
+ "inputs": [],
73
+ "name": "ErrorRegistryNotInitialized",
74
+ "type": "error"
68
75
  },
69
76
  {
70
77
  "anonymous": false,
@@ -88,27 +95,9 @@
88
95
  "type": "address"
89
96
  }
90
97
  ],
91
- "name": "LogVersionableActivated",
98
+ "name": "LogVersionableInitialized",
92
99
  "type": "event"
93
100
  },
94
- {
95
- "inputs": [
96
- {
97
- "internalType": "address",
98
- "name": "implementation",
99
- "type": "address"
100
- },
101
- {
102
- "internalType": "address",
103
- "name": "activatedBy",
104
- "type": "address"
105
- }
106
- ],
107
- "name": "activate",
108
- "outputs": [],
109
- "stateMutability": "nonpayable",
110
- "type": "function"
111
- },
112
101
  {
113
102
  "inputs": [
114
103
  {
@@ -200,22 +189,34 @@
200
189
  "inputs": [
201
190
  {
202
191
  "internalType": "NftId",
203
- "name": "productNftId",
192
+ "name": "bundleNftId",
204
193
  "type": "uint96"
205
194
  },
206
195
  {
207
196
  "internalType": "NftId",
208
- "name": "policyNftId",
197
+ "name": "poolNftId",
209
198
  "type": "uint96"
210
199
  },
211
200
  {
212
- "internalType": "uint256",
213
- "name": "sumInsuredAmount",
214
- "type": "uint256"
201
+ "components": [
202
+ {
203
+ "internalType": "UFixed",
204
+ "name": "fractionalFee",
205
+ "type": "uint256"
206
+ },
207
+ {
208
+ "internalType": "uint256",
209
+ "name": "fixedFee",
210
+ "type": "uint256"
211
+ }
212
+ ],
213
+ "internalType": "struct Fee",
214
+ "name": "fee",
215
+ "type": "tuple"
215
216
  },
216
217
  {
217
218
  "internalType": "uint256",
218
- "name": "premiumAmount",
219
+ "name": "amount",
219
220
  "type": "uint256"
220
221
  },
221
222
  {
@@ -224,12 +225,12 @@
224
225
  "type": "uint256"
225
226
  },
226
227
  {
227
- "internalType": "NftId",
228
- "name": "bundleNftId",
229
- "type": "uint96"
228
+ "internalType": "bytes",
229
+ "name": "filter",
230
+ "type": "bytes"
230
231
  }
231
232
  ],
232
- "name": "createApplication",
233
+ "name": "createBundleInfo",
233
234
  "outputs": [],
234
235
  "stateMutability": "nonpayable",
235
236
  "type": "function"
@@ -238,17 +239,32 @@
238
239
  "inputs": [
239
240
  {
240
241
  "internalType": "NftId",
241
- "name": "bundleNftId",
242
+ "name": "policyNftId",
242
243
  "type": "uint96"
243
244
  },
244
245
  {
245
246
  "internalType": "NftId",
246
- "name": "poolNftId",
247
+ "name": "productNftId",
247
248
  "type": "uint96"
248
249
  },
250
+ {
251
+ "internalType": "ReferralId",
252
+ "name": "referralId",
253
+ "type": "bytes8"
254
+ },
255
+ {
256
+ "internalType": "RiskId",
257
+ "name": "riskId",
258
+ "type": "bytes8"
259
+ },
249
260
  {
250
261
  "internalType": "uint256",
251
- "name": "amount",
262
+ "name": "sumInsuredAmount",
263
+ "type": "uint256"
264
+ },
265
+ {
266
+ "internalType": "uint256",
267
+ "name": "premiumAmount",
252
268
  "type": "uint256"
253
269
  },
254
270
  {
@@ -257,12 +273,12 @@
257
273
  "type": "uint256"
258
274
  },
259
275
  {
260
- "internalType": "bytes",
261
- "name": "filter",
262
- "type": "bytes"
276
+ "internalType": "NftId",
277
+ "name": "bundleNftId",
278
+ "type": "uint96"
263
279
  }
264
280
  ],
265
- "name": "createBundleInfo",
281
+ "name": "createPolicyInfo",
266
282
  "outputs": [],
267
283
  "stateMutability": "nonpayable",
268
284
  "type": "function"
@@ -270,19 +286,23 @@
270
286
  {
271
287
  "inputs": [
272
288
  {
273
- "internalType": "string",
274
- "name": "roleName",
275
- "type": "string"
276
- }
277
- ],
278
- "name": "createRole",
279
- "outputs": [
280
- {
281
- "internalType": "RoleId",
282
- "name": "role",
289
+ "internalType": "RiskId",
290
+ "name": "riskId",
283
291
  "type": "bytes8"
292
+ },
293
+ {
294
+ "internalType": "NftId",
295
+ "name": "productNftId",
296
+ "type": "uint96"
297
+ },
298
+ {
299
+ "internalType": "bytes",
300
+ "name": "data",
301
+ "type": "bytes"
284
302
  }
285
303
  ],
304
+ "name": "createRisk",
305
+ "outputs": [],
286
306
  "stateMutability": "nonpayable",
287
307
  "type": "function"
288
308
  },
@@ -309,7 +329,7 @@
309
329
  "inputs": [
310
330
  {
311
331
  "internalType": "NftId",
312
- "name": "bundleNftId",
332
+ "name": "nftId",
313
333
  "type": "uint96"
314
334
  }
315
335
  ],
@@ -319,13 +339,25 @@
319
339
  "components": [
320
340
  {
321
341
  "internalType": "NftId",
322
- "name": "nftId",
342
+ "name": "poolNftId",
323
343
  "type": "uint96"
324
344
  },
325
345
  {
326
- "internalType": "NftId",
327
- "name": "poolNftId",
328
- "type": "uint96"
346
+ "components": [
347
+ {
348
+ "internalType": "UFixed",
349
+ "name": "fractionalFee",
350
+ "type": "uint256"
351
+ },
352
+ {
353
+ "internalType": "uint256",
354
+ "name": "fixedFee",
355
+ "type": "uint256"
356
+ }
357
+ ],
358
+ "internalType": "struct Fee",
359
+ "name": "fee",
360
+ "type": "tuple"
329
361
  },
330
362
  {
331
363
  "internalType": "bytes",
@@ -422,6 +454,19 @@
422
454
  "stateMutability": "view",
423
455
  "type": "function"
424
456
  },
457
+ {
458
+ "inputs": [],
459
+ "name": "getComponentOwnerService",
460
+ "outputs": [
461
+ {
462
+ "internalType": "contract IComponentOwnerService",
463
+ "name": "",
464
+ "type": "address"
465
+ }
466
+ ],
467
+ "stateMutability": "view",
468
+ "type": "function"
469
+ },
425
470
  {
426
471
  "inputs": [
427
472
  {
@@ -430,41 +475,30 @@
430
475
  "type": "uint96"
431
476
  }
432
477
  ],
433
- "name": "getComponentInfo",
478
+ "name": "getComponentToken",
434
479
  "outputs": [
435
480
  {
436
- "components": [
437
- {
438
- "internalType": "NftId",
439
- "name": "nftId",
440
- "type": "uint96"
441
- },
442
- {
443
- "internalType": "StateId",
444
- "name": "state",
445
- "type": "uint8"
446
- },
447
- {
448
- "internalType": "contract IERC20Metadata",
449
- "name": "token",
450
- "type": "address"
451
- }
452
- ],
453
- "internalType": "struct IComponent.ComponentInfo",
454
- "name": "info",
455
- "type": "tuple"
481
+ "internalType": "contract IERC20Metadata",
482
+ "name": "token",
483
+ "type": "address"
456
484
  }
457
485
  ],
458
486
  "stateMutability": "view",
459
487
  "type": "function"
460
488
  },
461
489
  {
462
- "inputs": [],
463
- "name": "getComponentOwnerService",
490
+ "inputs": [
491
+ {
492
+ "internalType": "NftId",
493
+ "name": "nftId",
494
+ "type": "uint96"
495
+ }
496
+ ],
497
+ "name": "getComponentWallet",
464
498
  "outputs": [
465
499
  {
466
- "internalType": "contract IComponentOwnerService",
467
- "name": "",
500
+ "internalType": "address",
501
+ "name": "wallet",
468
502
  "type": "address"
469
503
  }
470
504
  ],
@@ -473,12 +507,12 @@
473
507
  },
474
508
  {
475
509
  "inputs": [],
476
- "name": "getData",
510
+ "name": "getDistributionService",
477
511
  "outputs": [
478
512
  {
479
- "internalType": "bytes",
480
- "name": "data",
481
- "type": "bytes"
513
+ "internalType": "contract IDistributionService",
514
+ "name": "",
515
+ "type": "address"
482
516
  }
483
517
  ],
484
518
  "stateMutability": "view",
@@ -522,12 +556,54 @@
522
556
  },
523
557
  {
524
558
  "inputs": [],
525
- "name": "getKeyValueStore",
559
+ "name": "getInitialInfo",
526
560
  "outputs": [
527
561
  {
528
- "internalType": "contract IKeyValueStore",
529
- "name": "keyValueStore",
530
- "type": "address"
562
+ "components": [
563
+ {
564
+ "internalType": "NftId",
565
+ "name": "nftId",
566
+ "type": "uint96"
567
+ },
568
+ {
569
+ "internalType": "NftId",
570
+ "name": "parentNftId",
571
+ "type": "uint96"
572
+ },
573
+ {
574
+ "internalType": "ObjectType",
575
+ "name": "objectType",
576
+ "type": "uint8"
577
+ },
578
+ {
579
+ "internalType": "bool",
580
+ "name": "isInterceptor",
581
+ "type": "bool"
582
+ },
583
+ {
584
+ "internalType": "address",
585
+ "name": "objectAddress",
586
+ "type": "address"
587
+ },
588
+ {
589
+ "internalType": "address",
590
+ "name": "initialOwner",
591
+ "type": "address"
592
+ },
593
+ {
594
+ "internalType": "bytes",
595
+ "name": "data",
596
+ "type": "bytes"
597
+ }
598
+ ],
599
+ "internalType": "struct IRegistry.ObjectInfo",
600
+ "name": "",
601
+ "type": "tuple"
602
+ },
603
+ {
604
+ "internalType": "bytes",
605
+ "name": "data",
606
+ "type": "bytes"
531
607
  }
532
608
  ],
533
609
  "stateMutability": "view",
@@ -535,12 +611,12 @@
535
611
  },
536
612
  {
537
613
  "inputs": [],
538
- "name": "getNftId",
614
+ "name": "getInitializedVersion",
539
615
  "outputs": [
540
616
  {
541
- "internalType": "NftId",
542
- "name": "nftId",
543
- "type": "uint96"
617
+ "internalType": "uint64",
618
+ "name": "",
619
+ "type": "uint64"
544
620
  }
545
621
  ],
546
622
  "stateMutability": "view",
@@ -548,11 +624,11 @@
548
624
  },
549
625
  {
550
626
  "inputs": [],
551
- "name": "getOwner",
627
+ "name": "getKeyValueStore",
552
628
  "outputs": [
553
629
  {
554
- "internalType": "address",
555
- "name": "owner",
630
+ "internalType": "contract IKeyValueStore",
631
+ "name": "keyValueStore",
556
632
  "type": "address"
557
633
  }
558
634
  ],
@@ -561,17 +637,30 @@
561
637
  },
562
638
  {
563
639
  "inputs": [],
564
- "name": "getParentNftId",
640
+ "name": "getNftId",
565
641
  "outputs": [
566
642
  {
567
643
  "internalType": "NftId",
568
- "name": "nftId",
644
+ "name": "",
569
645
  "type": "uint96"
570
646
  }
571
647
  ],
572
648
  "stateMutability": "view",
573
649
  "type": "function"
574
650
  },
651
+ {
652
+ "inputs": [],
653
+ "name": "getOwner",
654
+ "outputs": [
655
+ {
656
+ "internalType": "address",
657
+ "name": "owner",
658
+ "type": "address"
659
+ }
660
+ ],
661
+ "stateMutability": "view",
662
+ "type": "function"
663
+ },
575
664
  {
576
665
  "inputs": [
577
666
  {
@@ -584,11 +673,6 @@
584
673
  "outputs": [
585
674
  {
586
675
  "components": [
587
- {
588
- "internalType": "NftId",
589
- "name": "nftId",
590
- "type": "uint96"
591
- },
592
676
  {
593
677
  "internalType": "NftId",
594
678
  "name": "productNftId",
@@ -599,15 +683,20 @@
599
683
  "name": "bundleNftId",
600
684
  "type": "uint96"
601
685
  },
686
+ {
687
+ "internalType": "ReferralId",
688
+ "name": "referralId",
689
+ "type": "bytes8"
690
+ },
602
691
  {
603
692
  "internalType": "address",
604
693
  "name": "beneficiary",
605
694
  "type": "address"
606
695
  },
607
696
  {
608
- "internalType": "StateId",
609
- "name": "state",
610
- "type": "uint8"
697
+ "internalType": "RiskId",
698
+ "name": "riskId",
699
+ "type": "bytes8"
611
700
  },
612
701
  {
613
702
  "internalType": "uint256",
@@ -639,11 +728,6 @@
639
728
  "name": "policyData",
640
729
  "type": "bytes"
641
730
  },
642
- {
643
- "internalType": "Timestamp",
644
- "name": "createdAt",
645
- "type": "uint40"
646
- },
647
731
  {
648
732
  "internalType": "Timestamp",
649
733
  "name": "activatedAt",
@@ -658,11 +742,6 @@
658
742
  "internalType": "Timestamp",
659
743
  "name": "closedAt",
660
744
  "type": "uint40"
661
- },
662
- {
663
- "internalType": "Blocknumber",
664
- "name": "updatedIn",
665
- "type": "uint32"
666
745
  }
667
746
  ],
668
747
  "internalType": "struct IPolicy.PolicyInfo",
@@ -685,11 +764,6 @@
685
764
  "outputs": [
686
765
  {
687
766
  "components": [
688
- {
689
- "internalType": "NftId",
690
- "name": "nftId",
691
- "type": "uint96"
692
- },
693
767
  {
694
768
  "internalType": "bool",
695
769
  "name": "isVerifying",
@@ -726,61 +800,72 @@
726
800
  "inputs": [
727
801
  {
728
802
  "internalType": "NftId",
729
- "name": "poolNftId",
803
+ "name": "componentNftId",
804
+ "type": "uint96"
805
+ }
806
+ ],
807
+ "name": "getProductNftId",
808
+ "outputs": [
809
+ {
810
+ "internalType": "NftId",
811
+ "name": "productNftId",
730
812
  "type": "uint96"
731
813
  }
732
814
  ],
733
- "name": "getPoolSetup",
815
+ "stateMutability": "view",
816
+ "type": "function"
817
+ },
818
+ {
819
+ "inputs": [],
820
+ "name": "getProductService",
821
+ "outputs": [
822
+ {
823
+ "internalType": "contract IProductService",
824
+ "name": "",
825
+ "type": "address"
826
+ }
827
+ ],
828
+ "stateMutability": "view",
829
+ "type": "function"
830
+ },
831
+ {
832
+ "inputs": [],
833
+ "name": "getRegistry",
834
+ "outputs": [
835
+ {
836
+ "internalType": "contract IRegistry",
837
+ "name": "registry",
838
+ "type": "address"
839
+ }
840
+ ],
841
+ "stateMutability": "view",
842
+ "type": "function"
843
+ },
844
+ {
845
+ "inputs": [
846
+ {
847
+ "internalType": "RiskId",
848
+ "name": "riskId",
849
+ "type": "bytes8"
850
+ }
851
+ ],
852
+ "name": "getRiskInfo",
734
853
  "outputs": [
735
854
  {
736
855
  "components": [
737
856
  {
738
857
  "internalType": "NftId",
739
- "name": "poolNftId",
858
+ "name": "productNftId",
740
859
  "type": "uint96"
741
860
  },
742
861
  {
743
- "internalType": "address",
744
- "name": "wallet",
745
- "type": "address"
746
- },
747
- {
748
- "components": [
749
- {
750
- "internalType": "UFixed",
751
- "name": "fractionalFee",
752
- "type": "uint256"
753
- },
754
- {
755
- "internalType": "uint256",
756
- "name": "fixedFee",
757
- "type": "uint256"
758
- }
759
- ],
760
- "internalType": "struct Fee",
761
- "name": "stakingFee",
762
- "type": "tuple"
763
- },
764
- {
765
- "components": [
766
- {
767
- "internalType": "UFixed",
768
- "name": "fractionalFee",
769
- "type": "uint256"
770
- },
771
- {
772
- "internalType": "uint256",
773
- "name": "fixedFee",
774
- "type": "uint256"
775
- }
776
- ],
777
- "internalType": "struct Fee",
778
- "name": "performanceFee",
779
- "type": "tuple"
862
+ "internalType": "bytes",
863
+ "name": "data",
864
+ "type": "bytes"
780
865
  }
781
866
  ],
782
- "internalType": "struct ITreasury.PoolSetup",
783
- "name": "setup",
867
+ "internalType": "struct IRisk.RiskInfo",
868
+ "name": "info",
784
869
  "type": "tuple"
785
870
  }
786
871
  ],
@@ -788,12 +873,37 @@
788
873
  "type": "function"
789
874
  },
790
875
  {
791
- "inputs": [],
792
- "name": "getProductService",
876
+ "inputs": [
877
+ {
878
+ "internalType": "Key32",
879
+ "name": "key",
880
+ "type": "bytes32"
881
+ }
882
+ ],
883
+ "name": "getState",
793
884
  "outputs": [
794
885
  {
795
- "internalType": "contract IProductService",
796
- "name": "",
886
+ "internalType": "StateId",
887
+ "name": "state",
888
+ "type": "uint8"
889
+ }
890
+ ],
891
+ "stateMutability": "view",
892
+ "type": "function"
893
+ },
894
+ {
895
+ "inputs": [
896
+ {
897
+ "internalType": "NftId",
898
+ "name": "componentNftId",
899
+ "type": "uint96"
900
+ }
901
+ ],
902
+ "name": "getTokenHandler",
903
+ "outputs": [
904
+ {
905
+ "internalType": "contract TokenHandler",
906
+ "name": "tokenHandler",
797
907
  "type": "address"
798
908
  }
799
909
  ],
@@ -808,23 +918,18 @@
808
918
  "type": "uint96"
809
919
  }
810
920
  ],
811
- "name": "getProductSetup",
921
+ "name": "getTreasuryInfo",
812
922
  "outputs": [
813
923
  {
814
924
  "components": [
815
925
  {
816
926
  "internalType": "NftId",
817
- "name": "productNftId",
818
- "type": "uint96"
819
- },
820
- {
821
- "internalType": "NftId",
822
- "name": "distributorNftId",
927
+ "name": "poolNftId",
823
928
  "type": "uint96"
824
929
  },
825
930
  {
826
931
  "internalType": "NftId",
827
- "name": "poolNftId",
932
+ "name": "distributionNftId",
828
933
  "type": "uint96"
829
934
  },
830
935
  {
@@ -833,9 +938,21 @@
833
938
  "type": "address"
834
939
  },
835
940
  {
836
- "internalType": "address",
837
- "name": "wallet",
838
- "type": "address"
941
+ "components": [
942
+ {
943
+ "internalType": "UFixed",
944
+ "name": "fractionalFee",
945
+ "type": "uint256"
946
+ },
947
+ {
948
+ "internalType": "uint256",
949
+ "name": "fixedFee",
950
+ "type": "uint256"
951
+ }
952
+ ],
953
+ "internalType": "struct Fee",
954
+ "name": "productFee",
955
+ "type": "tuple"
839
956
  },
840
957
  {
841
958
  "components": [
@@ -851,7 +968,7 @@
851
968
  }
852
969
  ],
853
970
  "internalType": "struct Fee",
854
- "name": "policyFee",
971
+ "name": "processingFee",
855
972
  "type": "tuple"
856
973
  },
857
974
  {
@@ -868,198 +985,74 @@
868
985
  }
869
986
  ],
870
987
  "internalType": "struct Fee",
871
- "name": "processingFee",
988
+ "name": "poolFee",
989
+ "type": "tuple"
990
+ },
991
+ {
992
+ "components": [
993
+ {
994
+ "internalType": "UFixed",
995
+ "name": "fractionalFee",
996
+ "type": "uint256"
997
+ },
998
+ {
999
+ "internalType": "uint256",
1000
+ "name": "fixedFee",
1001
+ "type": "uint256"
1002
+ }
1003
+ ],
1004
+ "internalType": "struct Fee",
1005
+ "name": "stakingFee",
1006
+ "type": "tuple"
1007
+ },
1008
+ {
1009
+ "components": [
1010
+ {
1011
+ "internalType": "UFixed",
1012
+ "name": "fractionalFee",
1013
+ "type": "uint256"
1014
+ },
1015
+ {
1016
+ "internalType": "uint256",
1017
+ "name": "fixedFee",
1018
+ "type": "uint256"
1019
+ }
1020
+ ],
1021
+ "internalType": "struct Fee",
1022
+ "name": "performanceFee",
1023
+ "type": "tuple"
1024
+ },
1025
+ {
1026
+ "components": [
1027
+ {
1028
+ "internalType": "UFixed",
1029
+ "name": "fractionalFee",
1030
+ "type": "uint256"
1031
+ },
1032
+ {
1033
+ "internalType": "uint256",
1034
+ "name": "fixedFee",
1035
+ "type": "uint256"
1036
+ }
1037
+ ],
1038
+ "internalType": "struct Fee",
1039
+ "name": "distributionFee",
872
1040
  "type": "tuple"
873
1041
  }
874
1042
  ],
875
- "internalType": "struct ITreasury.ProductSetup",
876
- "name": "setup",
1043
+ "internalType": "struct ITreasury.TreasuryInfo",
1044
+ "name": "info",
877
1045
  "type": "tuple"
878
1046
  }
879
1047
  ],
880
1048
  "stateMutability": "view",
881
1049
  "type": "function"
882
1050
  },
883
- {
884
- "inputs": [],
885
- "name": "getRegistry",
886
- "outputs": [
887
- {
888
- "internalType": "contract IRegistry",
889
- "name": "registry",
890
- "type": "address"
891
- }
892
- ],
893
- "stateMutability": "view",
894
- "type": "function"
895
- },
896
1051
  {
897
1052
  "inputs": [
898
1053
  {
899
1054
  "internalType": "uint256",
900
- "name": "idx",
901
- "type": "uint256"
902
- }
903
- ],
904
- "name": "getRole",
905
- "outputs": [
906
- {
907
- "internalType": "RoleId",
908
- "name": "role",
909
- "type": "bytes8"
910
- }
911
- ],
912
- "stateMutability": "view",
913
- "type": "function"
914
- },
915
- {
916
- "inputs": [],
917
- "name": "getRoleCount",
918
- "outputs": [
919
- {
920
- "internalType": "uint256",
921
- "name": "roles",
922
- "type": "uint256"
923
- }
924
- ],
925
- "stateMutability": "view",
926
- "type": "function"
927
- },
928
- {
929
- "inputs": [
930
- {
931
- "internalType": "string",
932
- "name": "roleName",
933
- "type": "string"
934
- }
935
- ],
936
- "name": "getRoleId",
937
- "outputs": [
938
- {
939
- "internalType": "RoleId",
940
- "name": "role",
941
- "type": "bytes8"
942
- }
943
- ],
944
- "stateMutability": "pure",
945
- "type": "function"
946
- },
947
- {
948
- "inputs": [
949
- {
950
- "internalType": "RoleId",
951
- "name": "role",
952
- "type": "bytes8"
953
- }
954
- ],
955
- "name": "getRoleInfo",
956
- "outputs": [
957
- {
958
- "components": [
959
- {
960
- "internalType": "RoleId",
961
- "name": "id",
962
- "type": "bytes8"
963
- },
964
- {
965
- "internalType": "string",
966
- "name": "name",
967
- "type": "string"
968
- },
969
- {
970
- "internalType": "bool",
971
- "name": "isActive",
972
- "type": "bool"
973
- }
974
- ],
975
- "internalType": "struct IAccess.RoleInfo",
976
- "name": "info",
977
- "type": "tuple"
978
- }
979
- ],
980
- "stateMutability": "view",
981
- "type": "function"
982
- },
983
- {
984
- "inputs": [
985
- {
986
- "internalType": "RoleId",
987
- "name": "role",
988
- "type": "bytes8"
989
- },
990
- {
991
- "internalType": "uint256",
992
- "name": "idx",
993
- "type": "uint256"
994
- }
995
- ],
996
- "name": "getRoleMember",
997
- "outputs": [
998
- {
999
- "internalType": "address",
1000
- "name": "roleMember",
1001
- "type": "address"
1002
- }
1003
- ],
1004
- "stateMutability": "view",
1005
- "type": "function"
1006
- },
1007
- {
1008
- "inputs": [
1009
- {
1010
- "internalType": "RoleId",
1011
- "name": "role",
1012
- "type": "bytes8"
1013
- }
1014
- ],
1015
- "name": "getRoleMemberCount",
1016
- "outputs": [
1017
- {
1018
- "internalType": "uint256",
1019
- "name": "roleMembers",
1020
- "type": "uint256"
1021
- }
1022
- ],
1023
- "stateMutability": "view",
1024
- "type": "function"
1025
- },
1026
- {
1027
- "inputs": [
1028
- {
1029
- "internalType": "NftId",
1030
- "name": "componentNftId",
1031
- "type": "uint96"
1032
- }
1033
- ],
1034
- "name": "getTokenHandler",
1035
- "outputs": [
1036
- {
1037
- "internalType": "contract TokenHandler",
1038
- "name": "tokenHandler",
1039
- "type": "address"
1040
- }
1041
- ],
1042
- "stateMutability": "view",
1043
- "type": "function"
1044
- },
1045
- {
1046
- "inputs": [],
1047
- "name": "getType",
1048
- "outputs": [
1049
- {
1050
- "internalType": "ObjectType",
1051
- "name": "objectType",
1052
- "type": "uint8"
1053
- }
1054
- ],
1055
- "stateMutability": "pure",
1056
- "type": "function"
1057
- },
1058
- {
1059
- "inputs": [
1060
- {
1061
- "internalType": "uint256",
1062
- "name": "a",
1055
+ "name": "a",
1063
1056
  "type": "uint256"
1064
1057
  },
1065
1058
  {
@@ -1211,49 +1204,49 @@
1211
1204
  "type": "tuple"
1212
1205
  }
1213
1206
  ],
1214
- "stateMutability": "pure",
1207
+ "stateMutability": "view",
1215
1208
  "type": "function"
1216
1209
  },
1217
1210
  {
1218
1211
  "inputs": [
1219
1212
  {
1220
- "internalType": "RoleId",
1221
- "name": "role",
1222
- "type": "bytes8"
1223
- },
1213
+ "internalType": "NftId",
1214
+ "name": "productNftId",
1215
+ "type": "uint96"
1216
+ }
1217
+ ],
1218
+ "name": "hasTreasuryInfo",
1219
+ "outputs": [
1224
1220
  {
1225
- "internalType": "address",
1226
- "name": "member",
1227
- "type": "address"
1221
+ "internalType": "bool",
1222
+ "name": "hasInfo",
1223
+ "type": "bool"
1228
1224
  }
1229
1225
  ],
1230
- "name": "grantRole",
1231
- "outputs": [],
1232
- "stateMutability": "nonpayable",
1226
+ "stateMutability": "view",
1233
1227
  "type": "function"
1234
1228
  },
1235
1229
  {
1236
1230
  "inputs": [
1237
1231
  {
1238
- "internalType": "RoleId",
1239
- "name": "role",
1240
- "type": "bytes8"
1232
+ "internalType": "address",
1233
+ "name": "implementation",
1234
+ "type": "address"
1241
1235
  },
1242
1236
  {
1243
1237
  "internalType": "address",
1244
- "name": "member",
1238
+ "name": "activatedBy",
1245
1239
  "type": "address"
1246
- }
1247
- ],
1248
- "name": "hasRole",
1249
- "outputs": [
1240
+ },
1250
1241
  {
1251
- "internalType": "bool",
1252
- "name": "hasRole",
1253
- "type": "bool"
1242
+ "internalType": "bytes",
1243
+ "name": "activationData",
1244
+ "type": "bytes"
1254
1245
  }
1255
1246
  ],
1256
- "stateMutability": "view",
1247
+ "name": "initialize",
1248
+ "outputs": [],
1249
+ "stateMutability": "nonpayable",
1257
1250
  "type": "function"
1258
1251
  },
1259
1252
  {
@@ -1264,7 +1257,7 @@
1264
1257
  "type": "uint24"
1265
1258
  }
1266
1259
  ],
1267
- "name": "isActivated",
1260
+ "name": "isInitialized",
1268
1261
  "outputs": [
1269
1262
  {
1270
1263
  "internalType": "bool",
@@ -1277,14 +1270,8 @@
1277
1270
  },
1278
1271
  {
1279
1272
  "inputs": [],
1280
- "name": "register",
1281
- "outputs": [
1282
- {
1283
- "internalType": "NftId",
1284
- "name": "nftId",
1285
- "type": "uint96"
1286
- }
1287
- ],
1273
+ "name": "linkToRegisteredNftId",
1274
+ "outputs": [],
1288
1275
  "stateMutability": "nonpayable",
1289
1276
  "type": "function"
1290
1277
  },
@@ -1295,15 +1282,15 @@
1295
1282
  "name": "nftId",
1296
1283
  "type": "uint96"
1297
1284
  },
1298
- {
1299
- "internalType": "ObjectType",
1300
- "name": "objectType",
1301
- "type": "uint8"
1302
- },
1303
1285
  {
1304
1286
  "internalType": "contract IERC20Metadata",
1305
1287
  "name": "token",
1306
1288
  "type": "address"
1289
+ },
1290
+ {
1291
+ "internalType": "address",
1292
+ "name": "wallet",
1293
+ "type": "address"
1307
1294
  }
1308
1295
  ],
1309
1296
  "name": "registerComponent",
@@ -1315,46 +1302,24 @@
1315
1302
  "inputs": [
1316
1303
  {
1317
1304
  "internalType": "NftId",
1318
- "name": "poolNftId",
1305
+ "name": "nftId",
1319
1306
  "type": "uint96"
1320
1307
  },
1321
- {
1322
- "internalType": "address",
1323
- "name": "wallet",
1324
- "type": "address"
1325
- },
1326
1308
  {
1327
1309
  "components": [
1328
1310
  {
1329
- "internalType": "UFixed",
1330
- "name": "fractionalFee",
1331
- "type": "uint256"
1311
+ "internalType": "bool",
1312
+ "name": "isVerifying",
1313
+ "type": "bool"
1332
1314
  },
1333
- {
1334
- "internalType": "uint256",
1335
- "name": "fixedFee",
1336
- "type": "uint256"
1337
- }
1338
- ],
1339
- "internalType": "struct Fee",
1340
- "name": "stakingFee",
1341
- "type": "tuple"
1342
- },
1343
- {
1344
- "components": [
1345
1315
  {
1346
1316
  "internalType": "UFixed",
1347
- "name": "fractionalFee",
1348
- "type": "uint256"
1349
- },
1350
- {
1351
- "internalType": "uint256",
1352
- "name": "fixedFee",
1317
+ "name": "collateralizationLevel",
1353
1318
  "type": "uint256"
1354
1319
  }
1355
1320
  ],
1356
- "internalType": "struct Fee",
1357
- "name": "performanceFee",
1321
+ "internalType": "struct IPool.PoolInfo",
1322
+ "name": "info",
1358
1323
  "type": "tuple"
1359
1324
  }
1360
1325
  ],
@@ -1363,29 +1328,6 @@
1363
1328
  "stateMutability": "nonpayable",
1364
1329
  "type": "function"
1365
1330
  },
1366
- {
1367
- "inputs": [
1368
- {
1369
- "internalType": "NftId",
1370
- "name": "poolNftId",
1371
- "type": "uint96"
1372
- },
1373
- {
1374
- "internalType": "bool",
1375
- "name": "isVerifying",
1376
- "type": "bool"
1377
- },
1378
- {
1379
- "internalType": "UFixed",
1380
- "name": "collateralizationLevel",
1381
- "type": "uint256"
1382
- }
1383
- ],
1384
- "name": "registerPool",
1385
- "outputs": [],
1386
- "stateMutability": "nonpayable",
1387
- "type": "function"
1388
- },
1389
1331
  {
1390
1332
  "inputs": [
1391
1333
  {
@@ -1393,62 +1335,132 @@
1393
1335
  "name": "productNftId",
1394
1336
  "type": "uint96"
1395
1337
  },
1396
- {
1397
- "internalType": "NftId",
1398
- "name": "distributorNftId",
1399
- "type": "uint96"
1400
- },
1401
- {
1402
- "internalType": "NftId",
1403
- "name": "poolNftId",
1404
- "type": "uint96"
1405
- },
1406
- {
1407
- "internalType": "contract IERC20Metadata",
1408
- "name": "token",
1409
- "type": "address"
1410
- },
1411
- {
1412
- "internalType": "address",
1413
- "name": "wallet",
1414
- "type": "address"
1415
- },
1416
1338
  {
1417
1339
  "components": [
1418
1340
  {
1419
- "internalType": "UFixed",
1420
- "name": "fractionalFee",
1421
- "type": "uint256"
1422
- },
1423
- {
1424
- "internalType": "uint256",
1425
- "name": "fixedFee",
1426
- "type": "uint256"
1427
- }
1428
- ],
1429
- "internalType": "struct Fee",
1430
- "name": "policyFee",
1431
- "type": "tuple"
1432
- },
1433
- {
1434
- "components": [
1341
+ "internalType": "NftId",
1342
+ "name": "poolNftId",
1343
+ "type": "uint96"
1344
+ },
1435
1345
  {
1436
- "internalType": "UFixed",
1437
- "name": "fractionalFee",
1438
- "type": "uint256"
1346
+ "internalType": "NftId",
1347
+ "name": "distributionNftId",
1348
+ "type": "uint96"
1439
1349
  },
1440
1350
  {
1441
- "internalType": "uint256",
1442
- "name": "fixedFee",
1443
- "type": "uint256"
1351
+ "internalType": "contract IERC20Metadata",
1352
+ "name": "token",
1353
+ "type": "address"
1354
+ },
1355
+ {
1356
+ "components": [
1357
+ {
1358
+ "internalType": "UFixed",
1359
+ "name": "fractionalFee",
1360
+ "type": "uint256"
1361
+ },
1362
+ {
1363
+ "internalType": "uint256",
1364
+ "name": "fixedFee",
1365
+ "type": "uint256"
1366
+ }
1367
+ ],
1368
+ "internalType": "struct Fee",
1369
+ "name": "productFee",
1370
+ "type": "tuple"
1371
+ },
1372
+ {
1373
+ "components": [
1374
+ {
1375
+ "internalType": "UFixed",
1376
+ "name": "fractionalFee",
1377
+ "type": "uint256"
1378
+ },
1379
+ {
1380
+ "internalType": "uint256",
1381
+ "name": "fixedFee",
1382
+ "type": "uint256"
1383
+ }
1384
+ ],
1385
+ "internalType": "struct Fee",
1386
+ "name": "processingFee",
1387
+ "type": "tuple"
1388
+ },
1389
+ {
1390
+ "components": [
1391
+ {
1392
+ "internalType": "UFixed",
1393
+ "name": "fractionalFee",
1394
+ "type": "uint256"
1395
+ },
1396
+ {
1397
+ "internalType": "uint256",
1398
+ "name": "fixedFee",
1399
+ "type": "uint256"
1400
+ }
1401
+ ],
1402
+ "internalType": "struct Fee",
1403
+ "name": "poolFee",
1404
+ "type": "tuple"
1405
+ },
1406
+ {
1407
+ "components": [
1408
+ {
1409
+ "internalType": "UFixed",
1410
+ "name": "fractionalFee",
1411
+ "type": "uint256"
1412
+ },
1413
+ {
1414
+ "internalType": "uint256",
1415
+ "name": "fixedFee",
1416
+ "type": "uint256"
1417
+ }
1418
+ ],
1419
+ "internalType": "struct Fee",
1420
+ "name": "stakingFee",
1421
+ "type": "tuple"
1422
+ },
1423
+ {
1424
+ "components": [
1425
+ {
1426
+ "internalType": "UFixed",
1427
+ "name": "fractionalFee",
1428
+ "type": "uint256"
1429
+ },
1430
+ {
1431
+ "internalType": "uint256",
1432
+ "name": "fixedFee",
1433
+ "type": "uint256"
1434
+ }
1435
+ ],
1436
+ "internalType": "struct Fee",
1437
+ "name": "performanceFee",
1438
+ "type": "tuple"
1439
+ },
1440
+ {
1441
+ "components": [
1442
+ {
1443
+ "internalType": "UFixed",
1444
+ "name": "fractionalFee",
1445
+ "type": "uint256"
1446
+ },
1447
+ {
1448
+ "internalType": "uint256",
1449
+ "name": "fixedFee",
1450
+ "type": "uint256"
1451
+ }
1452
+ ],
1453
+ "internalType": "struct Fee",
1454
+ "name": "distributionFee",
1455
+ "type": "tuple"
1444
1456
  }
1445
1457
  ],
1446
- "internalType": "struct Fee",
1447
- "name": "processingFee",
1458
+ "internalType": "struct ITreasury.TreasuryInfo",
1459
+ "name": "info",
1448
1460
  "type": "tuple"
1449
1461
  }
1450
1462
  ],
1451
- "name": "registerProduct",
1463
+ "name": "registerProductSetup",
1452
1464
  "outputs": [],
1453
1465
  "stateMutability": "nonpayable",
1454
1466
  "type": "function"
@@ -1480,53 +1492,33 @@
1480
1492
  {
1481
1493
  "inputs": [
1482
1494
  {
1483
- "internalType": "RoleId",
1484
- "name": "role",
1485
- "type": "bytes8"
1495
+ "internalType": "NftId",
1496
+ "name": "nftId",
1497
+ "type": "uint96"
1486
1498
  },
1487
- {
1488
- "internalType": "address",
1489
- "name": "member",
1490
- "type": "address"
1491
- }
1492
- ],
1493
- "name": "revokeRole",
1494
- "outputs": [],
1495
- "stateMutability": "nonpayable",
1496
- "type": "function"
1497
- },
1498
- {
1499
- "inputs": [
1500
- {
1501
- "internalType": "RoleId",
1502
- "name": "role",
1503
- "type": "bytes8"
1504
- }
1505
- ],
1506
- "name": "roleExists",
1507
- "outputs": [
1508
- {
1509
- "internalType": "bool",
1510
- "name": "",
1511
- "type": "bool"
1512
- }
1513
- ],
1514
- "stateMutability": "view",
1515
- "type": "function"
1516
- },
1517
- {
1518
- "inputs": [
1519
1499
  {
1520
1500
  "components": [
1521
1501
  {
1522
1502
  "internalType": "NftId",
1523
- "name": "nftId",
1503
+ "name": "poolNftId",
1524
1504
  "type": "uint96"
1525
1505
  },
1526
1506
  {
1527
- "internalType": "NftId",
1528
- "name": "poolNftId",
1529
- "type": "uint96"
1507
+ "components": [
1508
+ {
1509
+ "internalType": "UFixed",
1510
+ "name": "fractionalFee",
1511
+ "type": "uint256"
1512
+ },
1513
+ {
1514
+ "internalType": "uint256",
1515
+ "name": "fixedFee",
1516
+ "type": "uint256"
1517
+ }
1518
+ ],
1519
+ "internalType": "struct Fee",
1520
+ "name": "fee",
1521
+ "type": "tuple"
1530
1522
  },
1531
1523
  {
1532
1524
  "internalType": "bytes",
@@ -1571,49 +1563,13 @@
1571
1563
  },
1572
1564
  {
1573
1565
  "inputs": [
1574
- {
1575
- "components": [
1576
- {
1577
- "internalType": "NftId",
1578
- "name": "nftId",
1579
- "type": "uint96"
1580
- },
1581
- {
1582
- "internalType": "StateId",
1583
- "name": "state",
1584
- "type": "uint8"
1585
- },
1586
- {
1587
- "internalType": "contract IERC20Metadata",
1588
- "name": "token",
1589
- "type": "address"
1590
- }
1591
- ],
1592
- "internalType": "struct IComponent.ComponentInfo",
1593
- "name": "info",
1594
- "type": "tuple"
1595
- }
1596
- ],
1597
- "name": "setComponentInfo",
1598
- "outputs": [
1599
1566
  {
1600
1567
  "internalType": "NftId",
1601
- "name": "componentNftId",
1568
+ "name": "policyNftId",
1602
1569
  "type": "uint96"
1603
- }
1604
- ],
1605
- "stateMutability": "nonpayable",
1606
- "type": "function"
1607
- },
1608
- {
1609
- "inputs": [
1570
+ },
1610
1571
  {
1611
1572
  "components": [
1612
- {
1613
- "internalType": "NftId",
1614
- "name": "nftId",
1615
- "type": "uint96"
1616
- },
1617
1573
  {
1618
1574
  "internalType": "NftId",
1619
1575
  "name": "productNftId",
@@ -1624,15 +1580,20 @@
1624
1580
  "name": "bundleNftId",
1625
1581
  "type": "uint96"
1626
1582
  },
1583
+ {
1584
+ "internalType": "ReferralId",
1585
+ "name": "referralId",
1586
+ "type": "bytes8"
1587
+ },
1627
1588
  {
1628
1589
  "internalType": "address",
1629
1590
  "name": "beneficiary",
1630
1591
  "type": "address"
1631
1592
  },
1632
1593
  {
1633
- "internalType": "StateId",
1634
- "name": "state",
1635
- "type": "uint8"
1594
+ "internalType": "RiskId",
1595
+ "name": "riskId",
1596
+ "type": "bytes8"
1636
1597
  },
1637
1598
  {
1638
1599
  "internalType": "uint256",
@@ -1664,11 +1625,6 @@
1664
1625
  "name": "policyData",
1665
1626
  "type": "bytes"
1666
1627
  },
1667
- {
1668
- "internalType": "Timestamp",
1669
- "name": "createdAt",
1670
- "type": "uint40"
1671
- },
1672
1628
  {
1673
1629
  "internalType": "Timestamp",
1674
1630
  "name": "activatedAt",
@@ -1683,15 +1639,10 @@
1683
1639
  "internalType": "Timestamp",
1684
1640
  "name": "closedAt",
1685
1641
  "type": "uint40"
1686
- },
1687
- {
1688
- "internalType": "Blocknumber",
1689
- "name": "updatedIn",
1690
- "type": "uint32"
1691
1642
  }
1692
1643
  ],
1693
1644
  "internalType": "struct IPolicy.PolicyInfo",
1694
- "name": "policyInfo",
1645
+ "name": "info",
1695
1646
  "type": "tuple"
1696
1647
  }
1697
1648
  ],
@@ -1703,46 +1654,29 @@
1703
1654
  {
1704
1655
  "inputs": [
1705
1656
  {
1706
- "internalType": "NftId",
1707
- "name": "poolNftId",
1708
- "type": "uint96"
1709
- },
1710
- {
1711
- "components": [
1712
- {
1713
- "internalType": "UFixed",
1714
- "name": "fractionalFee",
1715
- "type": "uint256"
1716
- },
1717
- {
1718
- "internalType": "uint256",
1719
- "name": "fixedFee",
1720
- "type": "uint256"
1721
- }
1722
- ],
1723
- "internalType": "struct Fee",
1724
- "name": "stakingFee",
1725
- "type": "tuple"
1657
+ "internalType": "RiskId",
1658
+ "name": "riskId",
1659
+ "type": "bytes8"
1726
1660
  },
1727
1661
  {
1728
1662
  "components": [
1729
1663
  {
1730
- "internalType": "UFixed",
1731
- "name": "fractionalFee",
1732
- "type": "uint256"
1664
+ "internalType": "NftId",
1665
+ "name": "productNftId",
1666
+ "type": "uint96"
1733
1667
  },
1734
1668
  {
1735
- "internalType": "uint256",
1736
- "name": "fixedFee",
1737
- "type": "uint256"
1669
+ "internalType": "bytes",
1670
+ "name": "data",
1671
+ "type": "bytes"
1738
1672
  }
1739
1673
  ],
1740
- "internalType": "struct Fee",
1741
- "name": "performanceFee",
1674
+ "internalType": "struct IRisk.RiskInfo",
1675
+ "name": "info",
1742
1676
  "type": "tuple"
1743
1677
  }
1744
1678
  ],
1745
- "name": "setPoolFees",
1679
+ "name": "setRiskInfo",
1746
1680
  "outputs": [],
1747
1681
  "stateMutability": "nonpayable",
1748
1682
  "type": "function"
@@ -1757,57 +1691,129 @@
1757
1691
  {
1758
1692
  "components": [
1759
1693
  {
1760
- "internalType": "UFixed",
1761
- "name": "fractionalFee",
1762
- "type": "uint256"
1694
+ "internalType": "NftId",
1695
+ "name": "poolNftId",
1696
+ "type": "uint96"
1763
1697
  },
1764
1698
  {
1765
- "internalType": "uint256",
1766
- "name": "fixedFee",
1767
- "type": "uint256"
1768
- }
1769
- ],
1770
- "internalType": "struct Fee",
1771
- "name": "policyFee",
1772
- "type": "tuple"
1773
- },
1774
- {
1775
- "components": [
1699
+ "internalType": "NftId",
1700
+ "name": "distributionNftId",
1701
+ "type": "uint96"
1702
+ },
1776
1703
  {
1777
- "internalType": "UFixed",
1778
- "name": "fractionalFee",
1779
- "type": "uint256"
1704
+ "internalType": "contract IERC20Metadata",
1705
+ "name": "token",
1706
+ "type": "address"
1780
1707
  },
1781
1708
  {
1782
- "internalType": "uint256",
1783
- "name": "fixedFee",
1784
- "type": "uint256"
1709
+ "components": [
1710
+ {
1711
+ "internalType": "UFixed",
1712
+ "name": "fractionalFee",
1713
+ "type": "uint256"
1714
+ },
1715
+ {
1716
+ "internalType": "uint256",
1717
+ "name": "fixedFee",
1718
+ "type": "uint256"
1719
+ }
1720
+ ],
1721
+ "internalType": "struct Fee",
1722
+ "name": "productFee",
1723
+ "type": "tuple"
1724
+ },
1725
+ {
1726
+ "components": [
1727
+ {
1728
+ "internalType": "UFixed",
1729
+ "name": "fractionalFee",
1730
+ "type": "uint256"
1731
+ },
1732
+ {
1733
+ "internalType": "uint256",
1734
+ "name": "fixedFee",
1735
+ "type": "uint256"
1736
+ }
1737
+ ],
1738
+ "internalType": "struct Fee",
1739
+ "name": "processingFee",
1740
+ "type": "tuple"
1741
+ },
1742
+ {
1743
+ "components": [
1744
+ {
1745
+ "internalType": "UFixed",
1746
+ "name": "fractionalFee",
1747
+ "type": "uint256"
1748
+ },
1749
+ {
1750
+ "internalType": "uint256",
1751
+ "name": "fixedFee",
1752
+ "type": "uint256"
1753
+ }
1754
+ ],
1755
+ "internalType": "struct Fee",
1756
+ "name": "poolFee",
1757
+ "type": "tuple"
1758
+ },
1759
+ {
1760
+ "components": [
1761
+ {
1762
+ "internalType": "UFixed",
1763
+ "name": "fractionalFee",
1764
+ "type": "uint256"
1765
+ },
1766
+ {
1767
+ "internalType": "uint256",
1768
+ "name": "fixedFee",
1769
+ "type": "uint256"
1770
+ }
1771
+ ],
1772
+ "internalType": "struct Fee",
1773
+ "name": "stakingFee",
1774
+ "type": "tuple"
1775
+ },
1776
+ {
1777
+ "components": [
1778
+ {
1779
+ "internalType": "UFixed",
1780
+ "name": "fractionalFee",
1781
+ "type": "uint256"
1782
+ },
1783
+ {
1784
+ "internalType": "uint256",
1785
+ "name": "fixedFee",
1786
+ "type": "uint256"
1787
+ }
1788
+ ],
1789
+ "internalType": "struct Fee",
1790
+ "name": "performanceFee",
1791
+ "type": "tuple"
1792
+ },
1793
+ {
1794
+ "components": [
1795
+ {
1796
+ "internalType": "UFixed",
1797
+ "name": "fractionalFee",
1798
+ "type": "uint256"
1799
+ },
1800
+ {
1801
+ "internalType": "uint256",
1802
+ "name": "fixedFee",
1803
+ "type": "uint256"
1804
+ }
1805
+ ],
1806
+ "internalType": "struct Fee",
1807
+ "name": "distributionFee",
1808
+ "type": "tuple"
1785
1809
  }
1786
1810
  ],
1787
- "internalType": "struct Fee",
1788
- "name": "processingFee",
1811
+ "internalType": "struct ITreasury.TreasuryInfo",
1812
+ "name": "info",
1789
1813
  "type": "tuple"
1790
1814
  }
1791
1815
  ],
1792
- "name": "setProductFees",
1793
- "outputs": [],
1794
- "stateMutability": "nonpayable",
1795
- "type": "function"
1796
- },
1797
- {
1798
- "inputs": [
1799
- {
1800
- "internalType": "RoleId",
1801
- "name": "role",
1802
- "type": "bytes8"
1803
- },
1804
- {
1805
- "internalType": "bool",
1806
- "name": "active",
1807
- "type": "bool"
1808
- }
1809
- ],
1810
- "name": "setRoleState",
1816
+ "name": "setTreasuryInfo",
1811
1817
  "outputs": [],
1812
1818
  "stateMutability": "nonpayable",
1813
1819
  "type": "function"
@@ -1835,26 +1841,25 @@
1835
1841
  "inputs": [
1836
1842
  {
1837
1843
  "internalType": "NftId",
1838
- "name": "bundleNftId",
1844
+ "name": "nftId",
1839
1845
  "type": "uint96"
1840
- }
1841
- ],
1842
- "name": "toBundleKey32",
1843
- "outputs": [
1846
+ },
1844
1847
  {
1845
- "internalType": "Key32",
1846
- "name": "key32",
1847
- "type": "bytes32"
1848
+ "internalType": "StateId",
1849
+ "name": "state",
1850
+ "type": "uint8"
1848
1851
  }
1849
1852
  ],
1850
- "stateMutability": "view",
1853
+ "name": "updateBundleState",
1854
+ "outputs": [],
1855
+ "stateMutability": "nonpayable",
1851
1856
  "type": "function"
1852
1857
  },
1853
1858
  {
1854
1859
  "inputs": [
1855
1860
  {
1856
1861
  "internalType": "NftId",
1857
- "name": "bundleNftId",
1862
+ "name": "nftId",
1858
1863
  "type": "uint96"
1859
1864
  },
1860
1865
  {
@@ -1863,7 +1868,66 @@
1863
1868
  "type": "uint8"
1864
1869
  }
1865
1870
  ],
1866
- "name": "updateBundleState",
1871
+ "name": "updatePolicyState",
1872
+ "outputs": [],
1873
+ "stateMutability": "nonpayable",
1874
+ "type": "function"
1875
+ },
1876
+ {
1877
+ "inputs": [
1878
+ {
1879
+ "internalType": "RiskId",
1880
+ "name": "riskId",
1881
+ "type": "bytes8"
1882
+ },
1883
+ {
1884
+ "internalType": "StateId",
1885
+ "name": "state",
1886
+ "type": "uint8"
1887
+ }
1888
+ ],
1889
+ "name": "updateRiskState",
1890
+ "outputs": [],
1891
+ "stateMutability": "nonpayable",
1892
+ "type": "function"
1893
+ },
1894
+ {
1895
+ "inputs": [
1896
+ {
1897
+ "internalType": "Key32",
1898
+ "name": "key",
1899
+ "type": "bytes32"
1900
+ },
1901
+ {
1902
+ "internalType": "StateId",
1903
+ "name": "state",
1904
+ "type": "uint8"
1905
+ }
1906
+ ],
1907
+ "name": "updateState",
1908
+ "outputs": [],
1909
+ "stateMutability": "nonpayable",
1910
+ "type": "function"
1911
+ },
1912
+ {
1913
+ "inputs": [
1914
+ {
1915
+ "internalType": "address",
1916
+ "name": "implementation",
1917
+ "type": "address"
1918
+ },
1919
+ {
1920
+ "internalType": "address",
1921
+ "name": "activatedBy",
1922
+ "type": "address"
1923
+ },
1924
+ {
1925
+ "internalType": "bytes",
1926
+ "name": "upgradeData",
1927
+ "type": "bytes"
1928
+ }
1929
+ ],
1930
+ "name": "upgrade",
1867
1931
  "outputs": [],
1868
1932
  "stateMutability": "nonpayable",
1869
1933
  "type": "function"