@etherisc/gif-next 0.0.2-de220d6-949 → 0.0.2-def25d4-556

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