@etherisc/gif-next 0.0.2-cd89a0b-062 → 0.0.2-cdac553-411

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