@etherisc/gif-next 0.0.2-e875d61-189 → 0.0.2-eb13b47-989

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