@etherisc/gif-next 0.0.2-f0d86c2-077 → 0.0.2-f2b0fa2-473

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 +176 -11
  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 +447 -60
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +519 -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 +1119 -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 +234 -1749
  52. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +4 -0
  53. package/artifacts/contracts/instance/{base/ServiceBase.sol/ServiceBase.json → IInstanceService.sol/IInstanceService.json} +182 -61
  54. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  55. package/artifacts/contracts/instance/Instance.sol/Instance.json +2415 -1152
  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 +1257 -0
  60. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +4 -0
  61. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +703 -0
  62. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +4 -0
  63. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +424 -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 +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/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/service/IDistributionService.sol/IDistributionService.json +446 -0
  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 +190 -51
  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 +380 -139
  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 +504 -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} +199 -83
  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 +2 -2
  192. package/contracts/components/BaseComponent.sol +20 -22
  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 +115 -30
  199. package/contracts/components/Product.sol +212 -32
  200. package/contracts/experiment/cloning/Cloner.sol +47 -0
  201. package/contracts/instance/AccessManagedSimple.sol +114 -0
  202. package/contracts/instance/AccessManagerSimple.sol +682 -0
  203. package/contracts/instance/IAccessManagerSimple.sol +391 -0
  204. package/contracts/instance/IInstance.sol +17 -41
  205. package/contracts/instance/IInstanceService.sol +17 -0
  206. package/contracts/instance/Instance.sol +420 -52
  207. package/contracts/instance/InstanceAccessManager.sol +288 -0
  208. package/contracts/instance/InstanceReader.sol +280 -0
  209. package/contracts/instance/InstanceService.sol +102 -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 +11 -2
  213. package/contracts/instance/base/IKeyValueStore.sol +13 -13
  214. package/contracts/instance/base/ILifecycle.sol +3 -3
  215. package/contracts/instance/base/KeyValueStore.sol +53 -37
  216. package/contracts/instance/base/Lifecycle.sol +16 -11
  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 +244 -97
  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 +28 -28
  231. package/contracts/registry/IRegistryService.sol +35 -0
  232. package/contracts/registry/ITransferInterceptor.sol +6 -0
  233. package/contracts/registry/Registry.sol +315 -273
  234. package/contracts/registry/RegistryService.sol +439 -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 +51 -14
  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 +9 -0
  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 -296
  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 -296
  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 -188
  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 -188
  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 -261
  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 -261
  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 -149
  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 -149
  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 -533
  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 -533
  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 -387
  329. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +0 -4
  330. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +0 -393
  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 -80
  335. package/contracts/instance/base/ModuleBase.sol +0 -52
  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 -136
  340. package/contracts/instance/module/bundle/IBundle.sol +0 -58
  341. package/contracts/instance/module/compensation/CompensationModule.sol +0 -8
  342. package/contracts/instance/module/compensation/ICompensation.sol +0 -10
  343. package/contracts/instance/module/component/ComponentModule.sol +0 -95
  344. package/contracts/instance/module/component/IComponent.sol +0 -53
  345. package/contracts/instance/module/policy/IPolicy.sol +0 -60
  346. package/contracts/instance/module/policy/PolicyModule.sol +0 -76
  347. package/contracts/instance/module/pool/IPoolModule.sol +0 -41
  348. package/contracts/instance/module/pool/PoolModule.sol +0 -87
  349. package/contracts/instance/module/risk/IRisk.sol +0 -10
  350. package/contracts/instance/module/risk/RiskModule.sol +0 -8
  351. package/contracts/instance/module/treasury/ITreasury.sol +0 -103
  352. package/contracts/instance/module/treasury/TokenHandler.sol +0 -48
  353. package/contracts/instance/module/treasury/TreasuryModule.sol +0 -152
  354. package/contracts/instance/service/PoolService.sol +0 -123
  355. package/contracts/instance/service/ProductService.sol +0 -354
  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 -22
  360. package/contracts/test/TestProduct.sol +0 -44
@@ -3,1689 +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": "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": [
1151
- {
1152
- "components": [
1153
- {
1154
- "internalType": "Version",
1155
- "name": "version",
1156
- "type": "uint24"
1157
- },
1158
- {
1159
- "internalType": "address",
1160
- "name": "implementation",
1161
- "type": "address"
1162
- },
1163
- {
1164
- "internalType": "address",
1165
- "name": "activatedBy",
1166
- "type": "address"
1167
- },
1168
- {
1169
- "internalType": "Timestamp",
1170
- "name": "activatedAt",
1171
- "type": "uint40"
1172
- },
1173
- {
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": [
1193
- {
1194
- "internalType": "UFixed",
1195
- "name": "fractionalFee",
1196
- "type": "uint256"
1197
- },
1198
- {
1199
- "internalType": "uint256",
1200
- "name": "fixedFee",
1201
- "type": "uint256"
1202
- }
1203
- ],
1204
- "internalType": "struct Fee",
1205
- "name": "fee",
1206
- "type": "tuple"
1207
- }
1208
- ],
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",
1305
- "outputs": [],
1306
- "stateMutability": "nonpayable",
1307
- "type": "function"
1308
- },
1309
- {
1310
- "inputs": [
1311
- {
1312
- "internalType": "NftId",
1313
- "name": "poolNftId",
1314
- "type": "uint96"
1315
- },
1316
- {
1317
- "internalType": "address",
1318
- "name": "wallet",
1319
- "type": "address"
1320
- },
1321
- {
1322
- "components": [
1323
- {
1324
- "internalType": "UFixed",
1325
- "name": "fractionalFee",
1326
- "type": "uint256"
1327
- },
1328
- {
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": [
1340
- {
1341
- "internalType": "UFixed",
1342
- "name": "fractionalFee",
1343
- "type": "uint256"
1344
- },
1345
- {
1346
- "internalType": "uint256",
1347
- "name": "fixedFee",
1348
- "type": "uint256"
1349
- }
1350
- ],
1351
- "internalType": "struct Fee",
1352
- "name": "performanceFee",
1353
- "type": "tuple"
1354
- }
1355
- ],
1356
- "name": "registerPool",
1357
- "outputs": [],
1358
- "stateMutability": "nonpayable",
1359
- "type": "function"
1360
- },
1361
- {
1362
- "inputs": [
1363
- {
1364
- "internalType": "NftId",
1365
- "name": "poolNftId",
1366
- "type": "uint96"
1367
- },
1368
- {
1369
- "internalType": "bool",
1370
- "name": "isVerifying",
1371
- "type": "bool"
1372
- },
1373
- {
1374
- "internalType": "UFixed",
1375
- "name": "collateralizationLevel",
1376
- "type": "uint256"
1377
- }
1378
- ],
1379
- "name": "registerPool",
1380
- "outputs": [],
1381
- "stateMutability": "nonpayable",
1382
- "type": "function"
1383
- },
1384
6
  {
1385
7
  "inputs": [
1386
8
  {
1387
9
  "internalType": "NftId",
1388
- "name": "productNftId",
1389
- "type": "uint96"
1390
- },
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
- {
1412
- "components": [
1413
- {
1414
- "internalType": "UFixed",
1415
- "name": "fractionalFee",
1416
- "type": "uint256"
1417
- },
1418
- {
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": [
1430
- {
1431
- "internalType": "UFixed",
1432
- "name": "fractionalFee",
1433
- "type": "uint256"
1434
- },
1435
- {
1436
- "internalType": "uint256",
1437
- "name": "fixedFee",
1438
- "type": "uint256"
1439
- }
1440
- ],
1441
- "internalType": "struct Fee",
1442
- "name": "processingFee",
1443
- "type": "tuple"
1444
- }
1445
- ],
1446
- "name": "registerProduct",
1447
- "outputs": [],
1448
- "stateMutability": "nonpayable",
1449
- "type": "function"
1450
- },
1451
- {
1452
- "inputs": [
1453
- {
1454
- "internalType": "NftId",
1455
- "name": "bundleNftId",
1456
- "type": "uint96"
1457
- },
1458
- {
1459
- "internalType": "NftId",
1460
- "name": "policyNftId",
10
+ "name": "distributionNftId",
1461
11
  "type": "uint96"
1462
- }
1463
- ],
1464
- "name": "releasePolicy",
1465
- "outputs": [
1466
- {
1467
- "internalType": "uint256",
1468
- "name": "collateralAmount",
1469
- "type": "uint256"
1470
- }
1471
- ],
1472
- "stateMutability": "nonpayable",
1473
- "type": "function"
1474
- },
1475
- {
1476
- "inputs": [
1477
- {
1478
- "internalType": "RoleId",
1479
- "name": "role",
1480
- "type": "bytes8"
1481
12
  },
1482
- {
1483
- "internalType": "address",
1484
- "name": "member",
1485
- "type": "address"
1486
- }
1487
- ],
1488
- "name": "revokeRole",
1489
- "outputs": [],
1490
- "stateMutability": "nonpayable",
1491
- "type": "function"
1492
- },
1493
- {
1494
- "inputs": [
1495
- {
1496
- "internalType": "RoleId",
1497
- "name": "role",
1498
- "type": "bytes8"
1499
- }
1500
- ],
1501
- "name": "roleExists",
1502
- "outputs": [
1503
- {
1504
- "internalType": "bool",
1505
- "name": "",
1506
- "type": "bool"
1507
- }
1508
- ],
1509
- "stateMutability": "view",
1510
- "type": "function"
1511
- },
1512
- {
1513
- "inputs": [
1514
- {
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"
1560
- }
1561
- ],
1562
- "name": "setBundleInfo",
1563
- "outputs": [],
1564
- "stateMutability": "nonpayable",
1565
- "type": "function"
1566
- },
1567
- {
1568
- "inputs": [
1569
- {
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"
1590
- }
1591
- ],
1592
- "name": "setComponentInfo",
1593
- "outputs": [
1594
- {
1595
- "internalType": "NftId",
1596
- "name": "componentNftId",
1597
- "type": "uint96"
1598
- }
1599
- ],
1600
- "stateMutability": "nonpayable",
1601
- "type": "function"
1602
- },
1603
- {
1604
- "inputs": [
1605
13
  {
1606
14
  "components": [
1607
- {
1608
- "internalType": "NftId",
1609
- "name": "nftId",
1610
- "type": "uint96"
1611
- },
1612
15
  {
1613
16
  "internalType": "NftId",
1614
17
  "name": "productNftId",
1615
18
  "type": "uint96"
1616
19
  },
1617
20
  {
1618
- "internalType": "NftId",
1619
- "name": "bundleNftId",
1620
- "type": "uint96"
1621
- },
1622
- {
1623
- "internalType": "address",
1624
- "name": "beneficiary",
21
+ "internalType": "contract TokenHandler",
22
+ "name": "tokenHandler",
1625
23
  "type": "address"
1626
24
  },
1627
25
  {
1628
- "internalType": "StateId",
1629
- "name": "state",
1630
- "type": "uint8"
1631
- },
1632
- {
1633
- "internalType": "uint256",
1634
- "name": "sumInsuredAmount",
1635
- "type": "uint256"
1636
- },
1637
- {
1638
- "internalType": "uint256",
1639
- "name": "premiumAmount",
1640
- "type": "uint256"
1641
- },
1642
- {
1643
- "internalType": "uint256",
1644
- "name": "premiumPaidAmount",
1645
- "type": "uint256"
1646
- },
1647
- {
1648
- "internalType": "uint256",
1649
- "name": "lifetime",
1650
- "type": "uint256"
1651
- },
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
- {
1668
- "internalType": "Timestamp",
1669
- "name": "expiredAt",
1670
- "type": "uint40"
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"
1671
41
  },
1672
42
  {
1673
- "internalType": "Timestamp",
1674
- "name": "closedAt",
1675
- "type": "uint40"
43
+ "internalType": "bool",
44
+ "name": "isIntercepting",
45
+ "type": "bool"
1676
46
  },
1677
47
  {
1678
- "internalType": "Blocknumber",
1679
- "name": "updatedIn",
1680
- "type": "uint32"
48
+ "internalType": "address",
49
+ "name": "wallet",
50
+ "type": "address"
1681
51
  }
1682
52
  ],
1683
- "internalType": "struct IPolicy.PolicyInfo",
1684
- "name": "policyInfo",
53
+ "internalType": "struct ISetup.DistributionSetupInfo",
54
+ "name": "setup",
1685
55
  "type": "tuple"
1686
56
  }
1687
57
  ],
1688
- "name": "setPolicyInfo",
58
+ "name": "createDistributionSetup",
1689
59
  "outputs": [],
1690
60
  "stateMutability": "nonpayable",
1691
61
  "type": "function"
@@ -1694,45 +64,94 @@
1694
64
  "inputs": [
1695
65
  {
1696
66
  "internalType": "NftId",
1697
- "name": "poolNftId",
67
+ "name": "distributionNftId",
1698
68
  "type": "uint96"
1699
69
  },
1700
70
  {
1701
71
  "components": [
1702
72
  {
1703
- "internalType": "UFixed",
1704
- "name": "fractionalFee",
1705
- "type": "uint256"
73
+ "internalType": "NftId",
74
+ "name": "productNftId",
75
+ "type": "uint96"
1706
76
  },
1707
77
  {
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": [
78
+ "internalType": "contract TokenHandler",
79
+ "name": "tokenHandler",
80
+ "type": "address"
81
+ },
1719
82
  {
1720
83
  "internalType": "UFixed",
1721
- "name": "fractionalFee",
84
+ "name": "collateralizationLevel",
1722
85
  "type": "uint256"
1723
86
  },
1724
87
  {
1725
- "internalType": "uint256",
1726
- "name": "fixedFee",
1727
- "type": "uint256"
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"
103
+ },
104
+ {
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"
120
+ },
121
+ {
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"
137
+ },
138
+ {
139
+ "internalType": "bool",
140
+ "name": "isIntercepting",
141
+ "type": "bool"
142
+ },
143
+ {
144
+ "internalType": "address",
145
+ "name": "wallet",
146
+ "type": "address"
1728
147
  }
1729
148
  ],
1730
- "internalType": "struct Fee",
1731
- "name": "performanceFee",
149
+ "internalType": "struct ISetup.PoolSetupInfo",
150
+ "name": "setup",
1732
151
  "type": "tuple"
1733
152
  }
1734
153
  ],
1735
- "name": "setPoolFees",
154
+ "name": "createPoolSetup",
1736
155
  "outputs": [],
1737
156
  "stateMutability": "nonpayable",
1738
157
  "type": "function"
@@ -1747,75 +166,159 @@
1747
166
  {
1748
167
  "components": [
1749
168
  {
1750
- "internalType": "UFixed",
1751
- "name": "fractionalFee",
1752
- "type": "uint256"
169
+ "internalType": "contract IERC20Metadata",
170
+ "name": "token",
171
+ "type": "address"
1753
172
  },
1754
173
  {
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": [
174
+ "internalType": "contract TokenHandler",
175
+ "name": "tokenHandler",
176
+ "type": "address"
177
+ },
1766
178
  {
1767
- "internalType": "UFixed",
1768
- "name": "fractionalFee",
1769
- "type": "uint256"
179
+ "internalType": "NftId",
180
+ "name": "distributionNftId",
181
+ "type": "uint96"
1770
182
  },
1771
183
  {
1772
- "internalType": "uint256",
1773
- "name": "fixedFee",
1774
- "type": "uint256"
184
+ "internalType": "NftId",
185
+ "name": "poolNftId",
186
+ "type": "uint96"
187
+ },
188
+ {
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"
204
+ },
205
+ {
206
+ "components": [
207
+ {
208
+ "internalType": "UFixed",
209
+ "name": "fractionalFee",
210
+ "type": "uint256"
211
+ },
212
+ {
213
+ "internalType": "uint256",
214
+ "name": "fixedFee",
215
+ "type": "uint256"
216
+ }
217
+ ],
218
+ "internalType": "struct Fee",
219
+ "name": "productFee",
220
+ "type": "tuple"
221
+ },
222
+ {
223
+ "components": [
224
+ {
225
+ "internalType": "UFixed",
226
+ "name": "fractionalFee",
227
+ "type": "uint256"
228
+ },
229
+ {
230
+ "internalType": "uint256",
231
+ "name": "fixedFee",
232
+ "type": "uint256"
233
+ }
234
+ ],
235
+ "internalType": "struct Fee",
236
+ "name": "processingFee",
237
+ "type": "tuple"
238
+ },
239
+ {
240
+ "components": [
241
+ {
242
+ "internalType": "UFixed",
243
+ "name": "fractionalFee",
244
+ "type": "uint256"
245
+ },
246
+ {
247
+ "internalType": "uint256",
248
+ "name": "fixedFee",
249
+ "type": "uint256"
250
+ }
251
+ ],
252
+ "internalType": "struct Fee",
253
+ "name": "poolFee",
254
+ "type": "tuple"
255
+ },
256
+ {
257
+ "components": [
258
+ {
259
+ "internalType": "UFixed",
260
+ "name": "fractionalFee",
261
+ "type": "uint256"
262
+ },
263
+ {
264
+ "internalType": "uint256",
265
+ "name": "fixedFee",
266
+ "type": "uint256"
267
+ }
268
+ ],
269
+ "internalType": "struct Fee",
270
+ "name": "stakingFee",
271
+ "type": "tuple"
272
+ },
273
+ {
274
+ "components": [
275
+ {
276
+ "internalType": "UFixed",
277
+ "name": "fractionalFee",
278
+ "type": "uint256"
279
+ },
280
+ {
281
+ "internalType": "uint256",
282
+ "name": "fixedFee",
283
+ "type": "uint256"
284
+ }
285
+ ],
286
+ "internalType": "struct Fee",
287
+ "name": "performanceFee",
288
+ "type": "tuple"
1775
289
  }
1776
290
  ],
1777
- "internalType": "struct Fee",
1778
- "name": "processingFee",
291
+ "internalType": "struct ISetup.ProductSetupInfo",
292
+ "name": "setup",
1779
293
  "type": "tuple"
1780
294
  }
1781
295
  ],
1782
- "name": "setProductFees",
296
+ "name": "createProductSetup",
1783
297
  "outputs": [],
1784
298
  "stateMutability": "nonpayable",
1785
299
  "type": "function"
1786
300
  },
1787
301
  {
1788
- "inputs": [
1789
- {
1790
- "internalType": "RoleId",
1791
- "name": "role",
1792
- "type": "bytes8"
1793
- },
302
+ "inputs": [],
303
+ "name": "getComponentOwnerService",
304
+ "outputs": [
1794
305
  {
1795
- "internalType": "bool",
1796
- "name": "active",
1797
- "type": "bool"
306
+ "internalType": "contract IComponentOwnerService",
307
+ "name": "",
308
+ "type": "address"
1798
309
  }
1799
310
  ],
1800
- "name": "setRoleState",
1801
- "outputs": [],
1802
- "stateMutability": "nonpayable",
311
+ "stateMutability": "view",
1803
312
  "type": "function"
1804
313
  },
1805
314
  {
1806
- "inputs": [
1807
- {
1808
- "internalType": "bytes4",
1809
- "name": "interfaceId",
1810
- "type": "bytes4"
1811
- }
1812
- ],
1813
- "name": "supportsInterface",
315
+ "inputs": [],
316
+ "name": "getInstanceReader",
1814
317
  "outputs": [
1815
318
  {
1816
- "internalType": "bool",
319
+ "internalType": "contract InstanceReader",
1817
320
  "name": "",
1818
- "type": "bool"
321
+ "type": "address"
1819
322
  }
1820
323
  ],
1821
324
  "stateMutability": "view",
@@ -1824,39 +327,21 @@
1824
327
  {
1825
328
  "inputs": [
1826
329
  {
1827
- "internalType": "NftId",
1828
- "name": "bundleNftId",
1829
- "type": "uint96"
330
+ "internalType": "bytes4",
331
+ "name": "interfaceId",
332
+ "type": "bytes4"
1830
333
  }
1831
334
  ],
1832
- "name": "toBundleKey32",
335
+ "name": "supportsInterface",
1833
336
  "outputs": [
1834
337
  {
1835
- "internalType": "Key32",
1836
- "name": "key32",
1837
- "type": "bytes32"
338
+ "internalType": "bool",
339
+ "name": "",
340
+ "type": "bool"
1838
341
  }
1839
342
  ],
1840
343
  "stateMutability": "view",
1841
344
  "type": "function"
1842
- },
1843
- {
1844
- "inputs": [
1845
- {
1846
- "internalType": "NftId",
1847
- "name": "bundleNftId",
1848
- "type": "uint96"
1849
- },
1850
- {
1851
- "internalType": "StateId",
1852
- "name": "state",
1853
- "type": "uint8"
1854
- }
1855
- ],
1856
- "name": "updateBundleState",
1857
- "outputs": [],
1858
- "stateMutability": "nonpayable",
1859
- "type": "function"
1860
345
  }
1861
346
  ],
1862
347
  "bytecode": "0x",