@etherisc/gif-next 0.0.2-f9bc4c7-556 → 0.0.2-fb8d07b-779

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