@etherisc/gif-next 0.0.2-eb7397c → 0.0.2-ec436bf-674

Sign up to get free protection for your applications and to get access to all the features.
Files changed (390) hide show
  1. package/README.md +301 -7
  2. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +4 -0
  3. package/artifacts/contracts/{instance/component/ComponentModule.sol/ComponentModule.json → components/BaseComponent.sol/BaseComponent.json} +156 -156
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +618 -0
  6. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +4 -0
  7. package/artifacts/contracts/{instance/component/IComponent.sol/IComponentModule.json → components/IBaseComponent.sol/IBaseComponent.json} +139 -104
  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 +4 -0
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +249 -0
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +4 -0
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +157 -0
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +606 -37
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +590 -46
  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/Require.sol/Require.json +2 -2
  26. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +2 -2
  28. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  29. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +2 -2
  30. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  31. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +2 -2
  32. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  33. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  34. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  35. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  36. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  37. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  38. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +4 -0
  39. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +59 -0
  40. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +4 -0
  41. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +124 -0
  42. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +4 -0
  43. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +74 -0
  44. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +4 -0
  45. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +124 -0
  46. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +4 -0
  47. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +207 -0
  48. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  49. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +2 -2
  50. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  51. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +2 -2
  52. package/artifacts/contracts/instance/AccessManagedSimple.sol/AccessManagedSimple.dbg.json +4 -0
  53. package/artifacts/contracts/instance/AccessManagedSimple.sol/AccessManagedSimple.json +101 -0
  54. package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.dbg.json +4 -0
  55. package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.json +1132 -0
  56. package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.dbg.json +4 -0
  57. package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.json +1082 -0
  58. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  59. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +502 -641
  60. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +4 -0
  61. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +480 -0
  62. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  63. package/artifacts/contracts/instance/Instance.sol/Instance.json +3043 -571
  64. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +4 -0
  65. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +917 -0
  66. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +4 -0
  67. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +1388 -0
  68. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +4 -0
  69. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +891 -0
  70. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +4 -0
  71. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +492 -0
  72. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
  73. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +540 -0
  74. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
  75. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +113 -0
  76. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
  77. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +429 -0
  78. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
  79. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.json +115 -0
  80. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
  81. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +502 -0
  82. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
  83. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +169 -0
  84. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +4 -0
  85. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +211 -0
  86. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +4 -0
  87. package/artifacts/contracts/instance/{access/IAccess.sol/IAccess.json → module/IBundle.sol/IBundle.json} +2 -2
  88. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +4 -0
  89. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.json +10 -0
  90. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +4 -0
  91. package/artifacts/contracts/instance/{policy → module}/IPolicy.sol/IPolicy.json +1 -1
  92. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +4 -0
  93. package/artifacts/contracts/instance/{pool/IPoolModule.sol/IPool.json → module/IRisk.sol/IRisk.json} +2 -2
  94. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +4 -0
  95. package/artifacts/contracts/instance/{component/IComponent.sol/IComponent.json → module/ISetup.sol/ISetup.json} +2 -2
  96. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +4 -0
  97. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.json +10 -0
  98. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +4 -0
  99. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +827 -0
  100. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  101. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +716 -0
  102. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +4 -0
  103. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +448 -0
  104. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +4 -0
  105. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +466 -0
  106. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
  107. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +446 -0
  108. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +4 -0
  109. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +561 -0
  110. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +4 -0
  111. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +751 -0
  112. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +4 -0
  113. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +855 -0
  114. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +4 -0
  115. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +460 -0
  116. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  117. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +239 -2
  118. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  119. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +537 -63
  120. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
  121. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +853 -0
  122. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
  123. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +34 -0
  124. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  125. package/artifacts/contracts/registry/Registry.sol/Registry.json +676 -76
  126. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
  127. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +1237 -0
  128. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
  129. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +525 -0
  130. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +4 -0
  131. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +410 -0
  132. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +4 -0
  133. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.json +107 -0
  134. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +4 -0
  135. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +35 -0
  136. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +4 -0
  137. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +127 -0
  138. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +4 -0
  139. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +201 -0
  140. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +4 -0
  141. package/artifacts/contracts/shared/IService.sol/IService.json +421 -0
  142. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +4 -0
  143. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +205 -0
  144. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +4 -0
  145. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +158 -0
  146. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
  147. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +349 -0
  148. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +4 -0
  149. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +274 -0
  150. package/artifacts/contracts/shared/RegisterableUpgradable.sol/RegisterableUpgradable.dbg.json +4 -0
  151. package/artifacts/contracts/shared/RegisterableUpgradable.sol/RegisterableUpgradable.json +442 -0
  152. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +4 -0
  153. package/artifacts/contracts/shared/Service.sol/Service.json +468 -0
  154. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +4 -0
  155. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +96 -0
  156. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
  157. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
  158. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +4 -0
  159. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +228 -0
  160. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +4 -0
  161. package/artifacts/contracts/test/TestFee.sol/TestFee.json +119 -0
  162. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +4 -0
  163. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +305 -0
  164. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +4 -0
  165. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +116 -0
  166. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +4 -0
  167. package/artifacts/contracts/test/TestService.sol/TestService.json +600 -0
  168. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +4 -0
  169. package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +376 -0
  170. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +4 -0
  171. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +218 -0
  172. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +4 -0
  173. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +286 -0
  174. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
  175. package/artifacts/contracts/test/Usdc.sol/USDC.json +376 -0
  176. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +4 -0
  177. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.json +10 -0
  178. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  179. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +2 -2
  180. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  181. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +2 -2
  182. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +4 -0
  183. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +104 -0
  184. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +4 -0
  185. package/artifacts/contracts/types/Fee.sol/FeeLib.json +257 -0
  186. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
  187. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +125 -0
  188. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  189. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +65 -4
  190. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +4 -0
  191. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +10 -0
  192. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +4 -0
  193. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.json +100 -0
  194. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +4 -0
  195. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +92 -0
  196. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +4 -0
  197. package/artifacts/contracts/types/Referral.sol/ReferralLib.json +123 -0
  198. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  199. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  200. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
  201. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +156 -0
  202. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +4 -0
  203. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +92 -0
  204. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  205. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +77 -2
  206. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +4 -0
  207. package/artifacts/contracts/types/UFixed.sol/MathLib.json +10 -0
  208. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +4 -0
  209. package/artifacts/contracts/types/UFixed.sol/UFixedLib.json +479 -0
  210. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +4 -0
  211. package/artifacts/contracts/types/Version.sol/VersionLib.json +177 -0
  212. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +4 -0
  213. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +49 -0
  214. package/contracts/components/BaseComponent.sol +91 -0
  215. package/contracts/components/Distribution.sol +160 -0
  216. package/contracts/components/IBaseComponent.sol +25 -0
  217. package/contracts/components/IDistributionComponent.sol +44 -0
  218. package/contracts/components/IPoolComponent.sol +62 -0
  219. package/contracts/components/IProductComponent.sol +35 -0
  220. package/contracts/components/Pool.sol +232 -18
  221. package/contracts/components/Product.sol +267 -36
  222. package/contracts/experiment/cloning/Cloner.sol +47 -0
  223. package/contracts/experiment/errors/Require.sol +10 -5
  224. package/contracts/experiment/errors/Revert.sol +13 -8
  225. package/contracts/experiment/inheritance/A.sol +8 -11
  226. package/contracts/experiment/inheritance/B.sol +10 -5
  227. package/contracts/experiment/inheritance/C.sol +11 -5
  228. package/contracts/experiment/inheritance/IA.sol +2 -7
  229. package/contracts/experiment/inheritance/IB.sol +3 -2
  230. package/contracts/experiment/inheritance/IC.sol +4 -3
  231. package/contracts/experiment/statemachine/Dummy.sol +27 -0
  232. package/contracts/experiment/statemachine/ISM.sol +25 -0
  233. package/contracts/experiment/statemachine/SM.sol +57 -0
  234. package/contracts/experiment/statemachine/SimpleStateMachine.sol +31 -0
  235. package/contracts/experiment/types/TypeA.sol +14 -9
  236. package/contracts/experiment/types/TypeB.sol +14 -9
  237. package/contracts/instance/AccessManagedSimple.sol +115 -0
  238. package/contracts/instance/AccessManagerSimple.sol +692 -0
  239. package/contracts/instance/IAccessManagerSimple.sol +391 -0
  240. package/contracts/instance/IInstance.sol +34 -15
  241. package/contracts/instance/IInstanceService.sol +30 -0
  242. package/contracts/instance/Instance.sol +423 -44
  243. package/contracts/instance/InstanceAccessManager.sol +288 -0
  244. package/contracts/instance/InstanceReader.sol +306 -0
  245. package/contracts/instance/InstanceService.sol +182 -0
  246. package/contracts/instance/InstanceServiceManager.sol +56 -0
  247. package/contracts/instance/base/ComponentServiceBase.sol +118 -0
  248. package/contracts/instance/base/IInstanceBase.sol +23 -0
  249. package/contracts/instance/base/IKeyValueStore.sol +49 -0
  250. package/contracts/instance/base/ILifecycle.sol +30 -0
  251. package/contracts/instance/base/KeyValueStore.sol +172 -0
  252. package/contracts/instance/base/Lifecycle.sol +100 -0
  253. package/contracts/instance/module/IAccess.sol +38 -0
  254. package/contracts/instance/module/IBundle.sol +20 -0
  255. package/contracts/instance/module/IDistribution.sol +39 -0
  256. package/contracts/instance/module/IPolicy.sol +45 -0
  257. package/contracts/instance/module/IRisk.sol +11 -0
  258. package/contracts/instance/module/ISetup.sol +44 -0
  259. package/contracts/instance/module/ITreasury.sol +23 -0
  260. package/contracts/instance/service/ComponentOwnerService.sol +317 -0
  261. package/contracts/instance/service/DistributionService.sol +87 -0
  262. package/contracts/instance/service/DistributionServiceManager.sol +53 -0
  263. package/contracts/instance/service/IComponentOwnerService.sol +20 -0
  264. package/contracts/instance/service/IDistributionService.sol +12 -0
  265. package/contracts/instance/service/IPoolService.sol +37 -0
  266. package/contracts/instance/service/IProductService.sol +107 -0
  267. package/contracts/instance/service/PoolService.sol +193 -0
  268. package/contracts/instance/service/PoolServiceManager.sol +53 -0
  269. package/contracts/registry/ChainNft.sol +138 -109
  270. package/contracts/registry/IRegistry.sol +81 -57
  271. package/contracts/registry/IRegistryService.sol +33 -0
  272. package/contracts/registry/ITransferInterceptor.sol +6 -0
  273. package/contracts/registry/Registry.sol +427 -120
  274. package/contracts/registry/RegistryService.sol +399 -0
  275. package/contracts/registry/RegistryServiceManager.sol +80 -0
  276. package/contracts/registry/TokenRegistry.sol +111 -0
  277. package/contracts/shared/ContractDeployerLib.sol +72 -0
  278. package/contracts/shared/ERC165.sol +25 -0
  279. package/contracts/shared/INftOwnable.sol +22 -0
  280. package/contracts/shared/IRegisterable.sol +17 -0
  281. package/contracts/shared/IService.sol +15 -0
  282. package/contracts/shared/IVersionable.sol +96 -0
  283. package/contracts/shared/NftOwnable.sol +136 -0
  284. package/contracts/shared/ProxyManager.sol +94 -0
  285. package/contracts/shared/Registerable.sol +90 -0
  286. package/contracts/shared/RegisterableUpgradable.sol +16 -0
  287. package/contracts/shared/Service.sol +55 -0
  288. package/contracts/shared/TokenHandler.sol +27 -0
  289. package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
  290. package/contracts/shared/Versionable.sol +147 -0
  291. package/contracts/test/TestFee.sol +25 -0
  292. package/contracts/test/TestRegisterable.sol +18 -0
  293. package/contracts/test/TestRoleId.sol +14 -0
  294. package/contracts/test/TestService.sol +24 -0
  295. package/contracts/test/TestToken.sol +26 -0
  296. package/contracts/test/TestVersion.sol +44 -0
  297. package/contracts/test/TestVersionable.sol +17 -0
  298. package/contracts/test/Usdc.sol +26 -0
  299. package/contracts/types/AddressSet.sol +58 -0
  300. package/contracts/types/Blocknumber.sol +76 -18
  301. package/contracts/types/ChainId.sol +18 -10
  302. package/contracts/types/DistributorType.sol +55 -0
  303. package/contracts/types/Fee.sol +56 -0
  304. package/contracts/types/Key32.sol +50 -0
  305. package/contracts/types/NftId.sol +48 -11
  306. package/contracts/types/NftIdSet.sol +60 -0
  307. package/contracts/types/NumberId.sol +52 -0
  308. package/contracts/types/ObjectType.sol +152 -0
  309. package/contracts/types/Referral.sol +85 -0
  310. package/contracts/types/RiskId.sol +43 -0
  311. package/contracts/types/RoleId.sol +89 -0
  312. package/contracts/types/StateId.sol +105 -0
  313. package/contracts/types/Timestamp.sol +89 -17
  314. package/contracts/types/UFixed.sol +193 -75
  315. package/contracts/types/Version.sol +107 -0
  316. package/package.json +21 -6
  317. package/artifacts/contracts/components/Component.sol/Component.dbg.json +0 -4
  318. package/artifacts/contracts/components/Component.sol/Component.json +0 -179
  319. package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +0 -4
  320. package/artifacts/contracts/components/Component.sol/InstanceLinked.json +0 -35
  321. package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +0 -4
  322. package/artifacts/contracts/components/IPool.sol/IPoolComponent.json +0 -179
  323. package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +0 -4
  324. package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +0 -192
  325. package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +0 -4
  326. package/artifacts/contracts/instance/access/Access.sol/AccessModule.json +0 -400
  327. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +0 -4
  328. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +0 -4
  329. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.json +0 -35
  330. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +0 -4
  331. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.json +0 -50
  332. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +0 -4
  333. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.json +0 -336
  334. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
  335. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +0 -4
  336. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +0 -147
  337. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +0 -4
  338. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +0 -4
  339. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.json +0 -179
  340. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +0 -4
  341. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +0 -4
  342. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +0 -94
  343. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +0 -4
  344. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.json +0 -24
  345. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
  346. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
  347. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.json +0 -231
  348. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
  349. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.json +0 -231
  350. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +0 -4
  351. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
  352. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.json +0 -149
  353. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
  354. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.json +0 -162
  355. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +0 -4
  356. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.json +0 -75
  357. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +0 -4
  358. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.json +0 -114
  359. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +0 -4
  360. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.json +0 -75
  361. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +0 -4
  362. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +0 -167
  363. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +0 -4
  364. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +0 -452
  365. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +0 -4
  366. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.json +0 -24
  367. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +0 -4
  368. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.json +0 -166
  369. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +0 -4
  370. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.json +0 -49
  371. package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +0 -4
  372. package/artifacts/contracts/registry/Registry.sol/Registerable.json +0 -166
  373. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +0 -4
  374. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +0 -60
  375. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +0 -4
  376. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +0 -440
  377. package/contracts/components/Component.sol +0 -62
  378. package/contracts/components/IPool.sol +0 -9
  379. package/contracts/components/IProduct.sol +0 -12
  380. package/contracts/instance/access/Access.sol +0 -218
  381. package/contracts/instance/access/IAccess.sol +0 -83
  382. package/contracts/instance/component/ComponentModule.sol +0 -248
  383. package/contracts/instance/component/IComponent.sol +0 -95
  384. package/contracts/instance/policy/IPolicy.sol +0 -66
  385. package/contracts/instance/policy/PolicyModule.sol +0 -107
  386. package/contracts/instance/pool/IPoolModule.sol +0 -41
  387. package/contracts/instance/pool/PoolModule.sol +0 -86
  388. package/contracts/instance/product/IProductService.sol +0 -46
  389. package/contracts/instance/product/ProductService.sol +0 -108
  390. package/contracts/registry/IChainNft.sol +0 -18
@@ -3,231 +3,79 @@
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": "uint256",
12
- "name": "idx",
13
- "type": "uint256"
14
- },
15
- {
16
- "indexed": false,
17
- "internalType": "address",
18
- "name": "module",
19
- "type": "address"
20
- },
21
- {
22
- "indexed": false,
23
- "internalType": "string",
24
- "name": "comment",
25
- "type": "string"
26
- }
27
- ],
28
- "name": "LogDebug",
29
- "type": "event"
30
- },
31
- {
32
- "inputs": [],
33
- "name": "ORACLE_OWNER_ROLE",
34
- "outputs": [
35
- {
36
- "internalType": "bytes32",
37
- "name": "role",
38
- "type": "bytes32"
39
- }
40
- ],
41
- "stateMutability": "view",
42
- "type": "function"
43
- },
44
- {
45
- "inputs": [],
46
- "name": "POOL_OWNER_ROLE",
47
- "outputs": [
48
- {
49
- "internalType": "bytes32",
50
- "name": "role",
51
- "type": "bytes32"
52
- }
53
- ],
54
- "stateMutability": "view",
55
- "type": "function"
56
- },
57
- {
58
- "inputs": [],
59
- "name": "PRODUCT_OWNER_ROLE",
60
- "outputs": [
61
- {
62
- "internalType": "bytes32",
63
- "name": "role",
64
- "type": "bytes32"
65
- }
66
- ],
67
- "stateMutability": "view",
68
- "type": "function"
69
- },
70
6
  {
71
7
  "inputs": [
72
8
  {
73
9
  "internalType": "NftId",
74
- "name": "nftId",
10
+ "name": "bundleNftId",
75
11
  "type": "uint96"
76
- }
77
- ],
78
- "name": "activate",
79
- "outputs": [],
80
- "stateMutability": "nonpayable",
81
- "type": "function"
82
- },
83
- {
84
- "inputs": [],
85
- "name": "components",
86
- "outputs": [
87
- {
88
- "internalType": "uint256",
89
- "name": "numberOfCompnents",
90
- "type": "uint256"
91
- }
92
- ],
93
- "stateMutability": "view",
94
- "type": "function"
95
- },
96
- {
97
- "inputs": [
12
+ },
98
13
  {
99
14
  "components": [
100
15
  {
101
16
  "internalType": "NftId",
102
- "name": "nftId",
17
+ "name": "poolNftId",
103
18
  "type": "uint96"
104
19
  },
105
20
  {
106
- "internalType": "NftId",
107
- "name": "parentNftId",
108
- "type": "uint96"
21
+ "components": [
22
+ {
23
+ "internalType": "UFixed",
24
+ "name": "fractionalFee",
25
+ "type": "uint256"
26
+ },
27
+ {
28
+ "internalType": "uint256",
29
+ "name": "fixedFee",
30
+ "type": "uint256"
31
+ }
32
+ ],
33
+ "internalType": "struct Fee",
34
+ "name": "fee",
35
+ "type": "tuple"
36
+ },
37
+ {
38
+ "internalType": "bytes",
39
+ "name": "filter",
40
+ "type": "bytes"
109
41
  },
110
42
  {
111
43
  "internalType": "uint256",
112
- "name": "objectType",
44
+ "name": "capitalAmount",
113
45
  "type": "uint256"
114
46
  },
115
47
  {
116
- "internalType": "address",
117
- "name": "objectAddress",
118
- "type": "address"
48
+ "internalType": "uint256",
49
+ "name": "lockedAmount",
50
+ "type": "uint256"
119
51
  },
120
52
  {
121
- "internalType": "address",
122
- "name": "initialOwner",
123
- "type": "address"
53
+ "internalType": "uint256",
54
+ "name": "balanceAmount",
55
+ "type": "uint256"
56
+ },
57
+ {
58
+ "internalType": "uint256",
59
+ "name": "lifetime",
60
+ "type": "uint256"
61
+ },
62
+ {
63
+ "internalType": "Timestamp",
64
+ "name": "expiredAt",
65
+ "type": "uint40"
66
+ },
67
+ {
68
+ "internalType": "Timestamp",
69
+ "name": "closedAt",
70
+ "type": "uint40"
124
71
  }
125
72
  ],
126
- "internalType": "struct IRegistry.RegistryInfo",
127
- "name": "productInfo",
73
+ "internalType": "struct IBundle.BundleInfo",
74
+ "name": "bundle",
128
75
  "type": "tuple"
129
- },
130
- {
131
- "internalType": "address",
132
- "name": "applicationOwner",
133
- "type": "address"
134
- },
135
- {
136
- "internalType": "uint256",
137
- "name": "sumInsuredAmount",
138
- "type": "uint256"
139
- },
140
- {
141
- "internalType": "uint256",
142
- "name": "premiumAmount",
143
- "type": "uint256"
144
- },
145
- {
146
- "internalType": "uint256",
147
- "name": "lifetime",
148
- "type": "uint256"
149
- },
150
- {
151
- "internalType": "NftId",
152
- "name": "bundleNftId",
153
- "type": "uint96"
154
- }
155
- ],
156
- "name": "createApplication",
157
- "outputs": [
158
- {
159
- "internalType": "NftId",
160
- "name": "nftId",
161
- "type": "uint96"
162
- }
163
- ],
164
- "stateMutability": "nonpayable",
165
- "type": "function"
166
- },
167
- {
168
- "inputs": [
169
- {
170
- "internalType": "NftId",
171
- "name": "nftId",
172
- "type": "uint96"
173
- },
174
- {
175
- "internalType": "address",
176
- "name": "wallet",
177
- "type": "address"
178
- },
179
- {
180
- "internalType": "address",
181
- "name": "token",
182
- "type": "address"
183
- }
184
- ],
185
- "name": "createPoolInfo",
186
- "outputs": [],
187
- "stateMutability": "nonpayable",
188
- "type": "function"
189
- },
190
- {
191
- "inputs": [
192
- {
193
- "internalType": "string",
194
- "name": "roleName",
195
- "type": "string"
196
- }
197
- ],
198
- "name": "createRole",
199
- "outputs": [
200
- {
201
- "internalType": "bytes32",
202
- "name": "role",
203
- "type": "bytes32"
204
- }
205
- ],
206
- "stateMutability": "nonpayable",
207
- "type": "function"
208
- },
209
- {
210
- "inputs": [
211
- {
212
- "internalType": "bytes32",
213
- "name": "role",
214
- "type": "bytes32"
215
- }
216
- ],
217
- "name": "disableRole",
218
- "outputs": [],
219
- "stateMutability": "nonpayable",
220
- "type": "function"
221
- },
222
- {
223
- "inputs": [
224
- {
225
- "internalType": "bytes32",
226
- "name": "role",
227
- "type": "bytes32"
228
76
  }
229
77
  ],
230
- "name": "enableRole",
78
+ "name": "createBundle",
231
79
  "outputs": [],
232
80
  "stateMutability": "nonpayable",
233
81
  "type": "function"
@@ -236,324 +84,303 @@
236
84
  "inputs": [
237
85
  {
238
86
  "internalType": "NftId",
239
- "name": "nftId",
240
- "type": "uint96"
241
- }
242
- ],
243
- "name": "getBundleNftForPolicy",
244
- "outputs": [
245
- {
246
- "internalType": "NftId",
247
- "name": "bundleNft",
248
- "type": "uint96"
249
- }
250
- ],
251
- "stateMutability": "view",
252
- "type": "function"
253
- },
254
- {
255
- "inputs": [
256
- {
257
- "internalType": "address",
258
- "name": "componentAddress",
259
- "type": "address"
260
- }
261
- ],
262
- "name": "getComponentId",
263
- "outputs": [
264
- {
265
- "internalType": "NftId",
266
- "name": "nftId",
267
- "type": "uint96"
268
- }
269
- ],
270
- "stateMutability": "view",
271
- "type": "function"
272
- },
273
- {
274
- "inputs": [
275
- {
276
- "internalType": "uint256",
277
- "name": "idx",
278
- "type": "uint256"
279
- }
280
- ],
281
- "name": "getComponentId",
282
- "outputs": [
283
- {
284
- "internalType": "NftId",
285
- "name": "nftId",
286
- "type": "uint96"
287
- }
288
- ],
289
- "stateMutability": "view",
290
- "type": "function"
291
- },
292
- {
293
- "inputs": [
294
- {
295
- "internalType": "NftId",
296
- "name": "nftId",
87
+ "name": "distributionNftId",
297
88
  "type": "uint96"
298
- }
299
- ],
300
- "name": "getComponentInfo",
301
- "outputs": [
89
+ },
302
90
  {
303
91
  "components": [
304
92
  {
305
93
  "internalType": "NftId",
306
- "name": "nftId",
94
+ "name": "productNftId",
307
95
  "type": "uint96"
308
96
  },
309
97
  {
310
- "internalType": "enum IComponent.CState",
311
- "name": "state",
312
- "type": "uint8"
98
+ "internalType": "contract TokenHandler",
99
+ "name": "tokenHandler",
100
+ "type": "address"
101
+ },
102
+ {
103
+ "components": [
104
+ {
105
+ "internalType": "UFixed",
106
+ "name": "fractionalFee",
107
+ "type": "uint256"
108
+ },
109
+ {
110
+ "internalType": "uint256",
111
+ "name": "fixedFee",
112
+ "type": "uint256"
113
+ }
114
+ ],
115
+ "internalType": "struct Fee",
116
+ "name": "distributionFee",
117
+ "type": "tuple"
118
+ },
119
+ {
120
+ "internalType": "bool",
121
+ "name": "isIntercepting",
122
+ "type": "bool"
123
+ },
124
+ {
125
+ "internalType": "address",
126
+ "name": "wallet",
127
+ "type": "address"
313
128
  }
314
129
  ],
315
- "internalType": "struct IComponent.ComponentInfo",
316
- "name": "info",
130
+ "internalType": "struct ISetup.DistributionSetupInfo",
131
+ "name": "setup",
317
132
  "type": "tuple"
318
133
  }
319
134
  ],
320
- "stateMutability": "view",
321
- "type": "function"
322
- },
323
- {
324
- "inputs": [
325
- {
326
- "internalType": "NftId",
327
- "name": "nftId",
328
- "type": "uint96"
329
- }
330
- ],
331
- "name": "getComponentOwner",
332
- "outputs": [
333
- {
334
- "internalType": "address",
335
- "name": "owner",
336
- "type": "address"
337
- }
338
- ],
339
- "stateMutability": "view",
340
- "type": "function"
341
- },
342
- {
343
- "inputs": [],
344
- "name": "getComponentOwnerService",
345
- "outputs": [
346
- {
347
- "internalType": "contract IComponentOwnerService",
348
- "name": "",
349
- "type": "address"
350
- }
351
- ],
352
- "stateMutability": "view",
353
- "type": "function"
354
- },
355
- {
356
- "inputs": [],
357
- "name": "getData",
358
- "outputs": [
359
- {
360
- "internalType": "bytes",
361
- "name": "data",
362
- "type": "bytes"
363
- }
364
- ],
365
- "stateMutability": "view",
366
- "type": "function"
367
- },
368
- {
369
- "inputs": [],
370
- "name": "getInitialOwner",
371
- "outputs": [
372
- {
373
- "internalType": "address",
374
- "name": "initialOwner",
375
- "type": "address"
376
- }
377
- ],
378
- "stateMutability": "view",
379
- "type": "function"
380
- },
381
- {
382
- "inputs": [],
383
- "name": "getNftId",
384
- "outputs": [
385
- {
386
- "internalType": "NftId",
387
- "name": "nftId",
388
- "type": "uint96"
389
- }
390
- ],
391
- "stateMutability": "view",
392
- "type": "function"
393
- },
394
- {
395
- "inputs": [],
396
- "name": "getOwner",
397
- "outputs": [
398
- {
399
- "internalType": "address",
400
- "name": "owner",
401
- "type": "address"
402
- }
403
- ],
404
- "stateMutability": "view",
405
- "type": "function"
406
- },
407
- {
408
- "inputs": [],
409
- "name": "getParentNftId",
410
- "outputs": [
411
- {
412
- "internalType": "NftId",
413
- "name": "parentNftId",
414
- "type": "uint96"
415
- }
416
- ],
417
- "stateMutability": "view",
135
+ "name": "createDistributionSetup",
136
+ "outputs": [],
137
+ "stateMutability": "nonpayable",
418
138
  "type": "function"
419
139
  },
420
140
  {
421
141
  "inputs": [
422
142
  {
423
143
  "internalType": "NftId",
424
- "name": "nftId",
144
+ "name": "poolNftId",
425
145
  "type": "uint96"
426
- }
427
- ],
428
- "name": "getPolicyInfo",
429
- "outputs": [
146
+ },
430
147
  {
431
148
  "components": [
432
149
  {
433
150
  "internalType": "NftId",
434
- "name": "nftId",
151
+ "name": "productNftId",
435
152
  "type": "uint96"
436
153
  },
437
154
  {
438
- "internalType": "enum IPolicy.PolicyState",
439
- "name": "state",
440
- "type": "uint8"
441
- },
442
- {
443
- "internalType": "uint256",
444
- "name": "sumInsuredAmount",
445
- "type": "uint256"
155
+ "internalType": "contract TokenHandler",
156
+ "name": "tokenHandler",
157
+ "type": "address"
446
158
  },
447
159
  {
448
- "internalType": "uint256",
449
- "name": "premiumAmount",
160
+ "internalType": "UFixed",
161
+ "name": "collateralizationLevel",
450
162
  "type": "uint256"
451
163
  },
452
164
  {
453
- "internalType": "uint256",
454
- "name": "lifetime",
455
- "type": "uint256"
165
+ "components": [
166
+ {
167
+ "internalType": "UFixed",
168
+ "name": "fractionalFee",
169
+ "type": "uint256"
170
+ },
171
+ {
172
+ "internalType": "uint256",
173
+ "name": "fixedFee",
174
+ "type": "uint256"
175
+ }
176
+ ],
177
+ "internalType": "struct Fee",
178
+ "name": "poolFee",
179
+ "type": "tuple"
456
180
  },
457
181
  {
458
- "internalType": "uint256",
459
- "name": "createdAt",
460
- "type": "uint256"
182
+ "components": [
183
+ {
184
+ "internalType": "UFixed",
185
+ "name": "fractionalFee",
186
+ "type": "uint256"
187
+ },
188
+ {
189
+ "internalType": "uint256",
190
+ "name": "fixedFee",
191
+ "type": "uint256"
192
+ }
193
+ ],
194
+ "internalType": "struct Fee",
195
+ "name": "stakingFee",
196
+ "type": "tuple"
461
197
  },
462
198
  {
463
- "internalType": "uint256",
464
- "name": "activatedAt",
465
- "type": "uint256"
199
+ "components": [
200
+ {
201
+ "internalType": "UFixed",
202
+ "name": "fractionalFee",
203
+ "type": "uint256"
204
+ },
205
+ {
206
+ "internalType": "uint256",
207
+ "name": "fixedFee",
208
+ "type": "uint256"
209
+ }
210
+ ],
211
+ "internalType": "struct Fee",
212
+ "name": "performanceFee",
213
+ "type": "tuple"
466
214
  },
467
215
  {
468
- "internalType": "uint256",
469
- "name": "expiredAt",
470
- "type": "uint256"
216
+ "internalType": "bool",
217
+ "name": "isIntercepting",
218
+ "type": "bool"
471
219
  },
472
220
  {
473
- "internalType": "uint256",
474
- "name": "closedAt",
475
- "type": "uint256"
221
+ "internalType": "address",
222
+ "name": "wallet",
223
+ "type": "address"
476
224
  }
477
225
  ],
478
- "internalType": "struct IPolicy.PolicyInfo",
479
- "name": "info",
226
+ "internalType": "struct ISetup.PoolSetupInfo",
227
+ "name": "setup",
480
228
  "type": "tuple"
481
229
  }
482
230
  ],
483
- "stateMutability": "view",
231
+ "name": "createPoolSetup",
232
+ "outputs": [],
233
+ "stateMutability": "nonpayable",
484
234
  "type": "function"
485
235
  },
486
236
  {
487
237
  "inputs": [
488
238
  {
489
239
  "internalType": "NftId",
490
- "name": "nftId",
240
+ "name": "productNftId",
491
241
  "type": "uint96"
492
- }
493
- ],
494
- "name": "getPoolInfo",
495
- "outputs": [
242
+ },
496
243
  {
497
244
  "components": [
245
+ {
246
+ "internalType": "contract IERC20Metadata",
247
+ "name": "token",
248
+ "type": "address"
249
+ },
250
+ {
251
+ "internalType": "contract TokenHandler",
252
+ "name": "tokenHandler",
253
+ "type": "address"
254
+ },
498
255
  {
499
256
  "internalType": "NftId",
500
- "name": "nftId",
257
+ "name": "distributionNftId",
501
258
  "type": "uint96"
502
259
  },
503
260
  {
504
- "internalType": "address",
505
- "name": "wallet",
506
- "type": "address"
261
+ "internalType": "NftId",
262
+ "name": "poolNftId",
263
+ "type": "uint96"
507
264
  },
508
265
  {
509
- "internalType": "address",
510
- "name": "token",
511
- "type": "address"
266
+ "components": [
267
+ {
268
+ "internalType": "UFixed",
269
+ "name": "fractionalFee",
270
+ "type": "uint256"
271
+ },
272
+ {
273
+ "internalType": "uint256",
274
+ "name": "fixedFee",
275
+ "type": "uint256"
276
+ }
277
+ ],
278
+ "internalType": "struct Fee",
279
+ "name": "distributionFee",
280
+ "type": "tuple"
512
281
  },
513
282
  {
514
- "internalType": "uint256",
515
- "name": "capital",
516
- "type": "uint256"
283
+ "components": [
284
+ {
285
+ "internalType": "UFixed",
286
+ "name": "fractionalFee",
287
+ "type": "uint256"
288
+ },
289
+ {
290
+ "internalType": "uint256",
291
+ "name": "fixedFee",
292
+ "type": "uint256"
293
+ }
294
+ ],
295
+ "internalType": "struct Fee",
296
+ "name": "productFee",
297
+ "type": "tuple"
517
298
  },
518
299
  {
519
- "internalType": "uint256",
520
- "name": "lockedCapital",
521
- "type": "uint256"
300
+ "components": [
301
+ {
302
+ "internalType": "UFixed",
303
+ "name": "fractionalFee",
304
+ "type": "uint256"
305
+ },
306
+ {
307
+ "internalType": "uint256",
308
+ "name": "fixedFee",
309
+ "type": "uint256"
310
+ }
311
+ ],
312
+ "internalType": "struct Fee",
313
+ "name": "processingFee",
314
+ "type": "tuple"
315
+ },
316
+ {
317
+ "components": [
318
+ {
319
+ "internalType": "UFixed",
320
+ "name": "fractionalFee",
321
+ "type": "uint256"
322
+ },
323
+ {
324
+ "internalType": "uint256",
325
+ "name": "fixedFee",
326
+ "type": "uint256"
327
+ }
328
+ ],
329
+ "internalType": "struct Fee",
330
+ "name": "poolFee",
331
+ "type": "tuple"
332
+ },
333
+ {
334
+ "components": [
335
+ {
336
+ "internalType": "UFixed",
337
+ "name": "fractionalFee",
338
+ "type": "uint256"
339
+ },
340
+ {
341
+ "internalType": "uint256",
342
+ "name": "fixedFee",
343
+ "type": "uint256"
344
+ }
345
+ ],
346
+ "internalType": "struct Fee",
347
+ "name": "stakingFee",
348
+ "type": "tuple"
349
+ },
350
+ {
351
+ "components": [
352
+ {
353
+ "internalType": "UFixed",
354
+ "name": "fractionalFee",
355
+ "type": "uint256"
356
+ },
357
+ {
358
+ "internalType": "uint256",
359
+ "name": "fixedFee",
360
+ "type": "uint256"
361
+ }
362
+ ],
363
+ "internalType": "struct Fee",
364
+ "name": "performanceFee",
365
+ "type": "tuple"
522
366
  }
523
367
  ],
524
- "internalType": "struct IPool.PoolInfo",
525
- "name": "info",
368
+ "internalType": "struct ISetup.ProductSetupInfo",
369
+ "name": "setup",
526
370
  "type": "tuple"
527
371
  }
528
372
  ],
529
- "stateMutability": "view",
530
- "type": "function"
531
- },
532
- {
533
- "inputs": [
534
- {
535
- "internalType": "NftId",
536
- "name": "productNftId",
537
- "type": "uint96"
538
- }
539
- ],
540
- "name": "getPoolNftId",
541
- "outputs": [
542
- {
543
- "internalType": "NftId",
544
- "name": "poolNftId",
545
- "type": "uint96"
546
- }
547
- ],
548
- "stateMutability": "view",
373
+ "name": "createProductSetup",
374
+ "outputs": [],
375
+ "stateMutability": "nonpayable",
549
376
  "type": "function"
550
377
  },
551
378
  {
552
379
  "inputs": [],
553
- "name": "getProductService",
380
+ "name": "getComponentOwnerService",
554
381
  "outputs": [
555
382
  {
556
- "internalType": "contract IProductService",
383
+ "internalType": "contract IComponentOwnerService",
557
384
  "name": "",
558
385
  "type": "address"
559
386
  }
@@ -563,11 +390,11 @@
563
390
  },
564
391
  {
565
392
  "inputs": [],
566
- "name": "getRegistry",
393
+ "name": "getDistributionService",
567
394
  "outputs": [
568
395
  {
569
- "internalType": "contract IRegistry",
570
- "name": "registry",
396
+ "internalType": "contract IDistributionService",
397
+ "name": "",
571
398
  "type": "address"
572
399
  }
573
400
  ],
@@ -575,19 +402,13 @@
575
402
  "type": "function"
576
403
  },
577
404
  {
578
- "inputs": [
579
- {
580
- "internalType": "uint256",
581
- "name": "idx",
582
- "type": "uint256"
583
- }
584
- ],
585
- "name": "getRole",
405
+ "inputs": [],
406
+ "name": "getInstanceReader",
586
407
  "outputs": [
587
408
  {
588
- "internalType": "bytes32",
589
- "name": "role",
590
- "type": "bytes32"
409
+ "internalType": "contract InstanceReader",
410
+ "name": "",
411
+ "type": "address"
591
412
  }
592
413
  ],
593
414
  "stateMutability": "view",
@@ -595,12 +416,12 @@
595
416
  },
596
417
  {
597
418
  "inputs": [],
598
- "name": "getRoleCount",
419
+ "name": "getPoolService",
599
420
  "outputs": [
600
421
  {
601
- "internalType": "uint256",
602
- "name": "roles",
603
- "type": "uint256"
422
+ "internalType": "contract IPoolService",
423
+ "name": "",
424
+ "type": "address"
604
425
  }
605
426
  ],
606
427
  "stateMutability": "view",
@@ -609,128 +430,118 @@
609
430
  {
610
431
  "inputs": [
611
432
  {
612
- "internalType": "string",
613
- "name": "roleName",
614
- "type": "string"
433
+ "internalType": "bytes4",
434
+ "name": "interfaceId",
435
+ "type": "bytes4"
615
436
  }
616
437
  ],
617
- "name": "getRoleForName",
438
+ "name": "supportsInterface",
618
439
  "outputs": [
619
440
  {
620
- "internalType": "bytes32",
621
- "name": "role",
622
- "type": "bytes32"
441
+ "internalType": "bool",
442
+ "name": "",
443
+ "type": "bool"
623
444
  }
624
445
  ],
625
- "stateMutability": "pure",
446
+ "stateMutability": "view",
626
447
  "type": "function"
627
448
  },
628
449
  {
629
450
  "inputs": [
630
451
  {
631
- "internalType": "bytes32",
632
- "name": "role",
633
- "type": "bytes32"
634
- }
635
- ],
636
- "name": "getRoleInfo",
637
- "outputs": [
452
+ "internalType": "NftId",
453
+ "name": "bundleNftId",
454
+ "type": "uint96"
455
+ },
638
456
  {
639
457
  "components": [
640
458
  {
641
- "internalType": "bytes32",
642
- "name": "id",
643
- "type": "bytes32"
459
+ "internalType": "NftId",
460
+ "name": "poolNftId",
461
+ "type": "uint96"
644
462
  },
645
463
  {
646
- "internalType": "string",
647
- "name": "name",
648
- "type": "string"
464
+ "components": [
465
+ {
466
+ "internalType": "UFixed",
467
+ "name": "fractionalFee",
468
+ "type": "uint256"
469
+ },
470
+ {
471
+ "internalType": "uint256",
472
+ "name": "fixedFee",
473
+ "type": "uint256"
474
+ }
475
+ ],
476
+ "internalType": "struct Fee",
477
+ "name": "fee",
478
+ "type": "tuple"
649
479
  },
650
480
  {
651
- "internalType": "bool",
652
- "name": "isActive",
653
- "type": "bool"
481
+ "internalType": "bytes",
482
+ "name": "filter",
483
+ "type": "bytes"
484
+ },
485
+ {
486
+ "internalType": "uint256",
487
+ "name": "capitalAmount",
488
+ "type": "uint256"
489
+ },
490
+ {
491
+ "internalType": "uint256",
492
+ "name": "lockedAmount",
493
+ "type": "uint256"
494
+ },
495
+ {
496
+ "internalType": "uint256",
497
+ "name": "balanceAmount",
498
+ "type": "uint256"
499
+ },
500
+ {
501
+ "internalType": "uint256",
502
+ "name": "lifetime",
503
+ "type": "uint256"
504
+ },
505
+ {
506
+ "internalType": "Timestamp",
507
+ "name": "expiredAt",
508
+ "type": "uint40"
509
+ },
510
+ {
511
+ "internalType": "Timestamp",
512
+ "name": "closedAt",
513
+ "type": "uint40"
654
514
  }
655
515
  ],
656
- "internalType": "struct IAccess.RoleInfo",
657
- "name": "info",
516
+ "internalType": "struct IBundle.BundleInfo",
517
+ "name": "bundle",
658
518
  "type": "tuple"
659
- }
660
- ],
661
- "stateMutability": "view",
662
- "type": "function"
663
- },
664
- {
665
- "inputs": [
666
- {
667
- "internalType": "bytes32",
668
- "name": "role",
669
- "type": "bytes32"
670
519
  },
671
520
  {
672
- "internalType": "uint256",
673
- "name": "idx",
674
- "type": "uint256"
675
- }
676
- ],
677
- "name": "getRoleMember",
678
- "outputs": [
679
- {
680
- "internalType": "address",
681
- "name": "roleMembers",
682
- "type": "address"
683
- }
684
- ],
685
- "stateMutability": "view",
686
- "type": "function"
687
- },
688
- {
689
- "inputs": [
690
- {
691
- "internalType": "bytes32",
692
- "name": "role",
693
- "type": "bytes32"
694
- }
695
- ],
696
- "name": "getRoleMemberCount",
697
- "outputs": [
698
- {
699
- "internalType": "uint256",
700
- "name": "roleMembers",
701
- "type": "uint256"
702
- }
703
- ],
704
- "stateMutability": "view",
705
- "type": "function"
706
- },
707
- {
708
- "inputs": [],
709
- "name": "getType",
710
- "outputs": [
711
- {
712
- "internalType": "uint256",
713
- "name": "objectType",
714
- "type": "uint256"
521
+ "internalType": "StateId",
522
+ "name": "newState",
523
+ "type": "uint8"
715
524
  }
716
525
  ],
717
- "stateMutability": "view",
526
+ "name": "updateBundle",
527
+ "outputs": [],
528
+ "stateMutability": "nonpayable",
718
529
  "type": "function"
719
530
  },
720
531
  {
721
532
  "inputs": [
722
533
  {
723
- "internalType": "bytes32",
724
- "name": "role",
725
- "type": "bytes32"
534
+ "internalType": "NftId",
535
+ "name": "bundleNftId",
536
+ "type": "uint96"
726
537
  },
727
538
  {
728
- "internalType": "address",
729
- "name": "member",
730
- "type": "address"
539
+ "internalType": "StateId",
540
+ "name": "newState",
541
+ "type": "uint8"
731
542
  }
732
543
  ],
733
- "name": "grantRole",
544
+ "name": "updateBundleState",
734
545
  "outputs": [],
735
546
  "stateMutability": "nonpayable",
736
547
  "type": "function"
@@ -738,131 +549,181 @@
738
549
  {
739
550
  "inputs": [
740
551
  {
741
- "internalType": "bytes32",
742
- "name": "role",
743
- "type": "bytes32"
552
+ "internalType": "NftId",
553
+ "name": "distributionNftId",
554
+ "type": "uint96"
744
555
  },
745
556
  {
746
- "internalType": "address",
747
- "name": "member",
748
- "type": "address"
749
- }
750
- ],
751
- "name": "hasRole",
752
- "outputs": [
753
- {
754
- "internalType": "bool",
755
- "name": "",
756
- "type": "bool"
757
- }
758
- ],
759
- "stateMutability": "view",
760
- "type": "function"
761
- },
762
- {
763
- "inputs": [],
764
- "name": "isRegisterable",
765
- "outputs": [
766
- {
767
- "internalType": "bool",
768
- "name": "",
769
- "type": "bool"
770
- }
771
- ],
772
- "stateMutability": "pure",
773
- "type": "function"
774
- },
775
- {
776
- "inputs": [],
777
- "name": "isRegistered",
778
- "outputs": [
779
- {
780
- "internalType": "bool",
781
- "name": "",
782
- "type": "bool"
783
- }
784
- ],
785
- "stateMutability": "view",
786
- "type": "function"
787
- },
788
- {
789
- "inputs": [],
790
- "name": "register",
791
- "outputs": [
557
+ "components": [
558
+ {
559
+ "internalType": "NftId",
560
+ "name": "productNftId",
561
+ "type": "uint96"
562
+ },
563
+ {
564
+ "internalType": "contract TokenHandler",
565
+ "name": "tokenHandler",
566
+ "type": "address"
567
+ },
568
+ {
569
+ "components": [
570
+ {
571
+ "internalType": "UFixed",
572
+ "name": "fractionalFee",
573
+ "type": "uint256"
574
+ },
575
+ {
576
+ "internalType": "uint256",
577
+ "name": "fixedFee",
578
+ "type": "uint256"
579
+ }
580
+ ],
581
+ "internalType": "struct Fee",
582
+ "name": "distributionFee",
583
+ "type": "tuple"
584
+ },
585
+ {
586
+ "internalType": "bool",
587
+ "name": "isIntercepting",
588
+ "type": "bool"
589
+ },
590
+ {
591
+ "internalType": "address",
592
+ "name": "wallet",
593
+ "type": "address"
594
+ }
595
+ ],
596
+ "internalType": "struct ISetup.DistributionSetupInfo",
597
+ "name": "setup",
598
+ "type": "tuple"
599
+ },
792
600
  {
793
- "internalType": "NftId",
794
- "name": "nftId",
795
- "type": "uint96"
601
+ "internalType": "StateId",
602
+ "name": "newState",
603
+ "type": "uint8"
796
604
  }
797
605
  ],
606
+ "name": "updateDistributionSetup",
607
+ "outputs": [],
798
608
  "stateMutability": "nonpayable",
799
609
  "type": "function"
800
610
  },
801
611
  {
802
612
  "inputs": [
803
- {
804
- "internalType": "contract IComponentContract",
805
- "name": "component",
806
- "type": "address"
807
- }
808
- ],
809
- "name": "registerComponent",
810
- "outputs": [
811
613
  {
812
614
  "internalType": "NftId",
813
- "name": "nftId",
615
+ "name": "distributionNftId",
814
616
  "type": "uint96"
815
- }
816
- ],
817
- "stateMutability": "nonpayable",
818
- "type": "function"
819
- },
820
- {
821
- "inputs": [
822
- {
823
- "internalType": "bytes32",
824
- "name": "role",
825
- "type": "bytes32"
826
617
  },
827
618
  {
828
- "internalType": "address",
829
- "name": "member",
830
- "type": "address"
619
+ "internalType": "StateId",
620
+ "name": "newState",
621
+ "type": "uint8"
831
622
  }
832
623
  ],
833
- "name": "revokeRole",
624
+ "name": "updateDistributionSetupState",
834
625
  "outputs": [],
835
626
  "stateMutability": "nonpayable",
836
627
  "type": "function"
837
628
  },
838
629
  {
839
630
  "inputs": [
631
+ {
632
+ "internalType": "NftId",
633
+ "name": "poolNftId",
634
+ "type": "uint96"
635
+ },
840
636
  {
841
637
  "components": [
842
638
  {
843
639
  "internalType": "NftId",
844
- "name": "nftId",
640
+ "name": "productNftId",
845
641
  "type": "uint96"
846
642
  },
847
643
  {
848
- "internalType": "enum IComponent.CState",
849
- "name": "state",
850
- "type": "uint8"
644
+ "internalType": "contract TokenHandler",
645
+ "name": "tokenHandler",
646
+ "type": "address"
647
+ },
648
+ {
649
+ "internalType": "UFixed",
650
+ "name": "collateralizationLevel",
651
+ "type": "uint256"
652
+ },
653
+ {
654
+ "components": [
655
+ {
656
+ "internalType": "UFixed",
657
+ "name": "fractionalFee",
658
+ "type": "uint256"
659
+ },
660
+ {
661
+ "internalType": "uint256",
662
+ "name": "fixedFee",
663
+ "type": "uint256"
664
+ }
665
+ ],
666
+ "internalType": "struct Fee",
667
+ "name": "poolFee",
668
+ "type": "tuple"
669
+ },
670
+ {
671
+ "components": [
672
+ {
673
+ "internalType": "UFixed",
674
+ "name": "fractionalFee",
675
+ "type": "uint256"
676
+ },
677
+ {
678
+ "internalType": "uint256",
679
+ "name": "fixedFee",
680
+ "type": "uint256"
681
+ }
682
+ ],
683
+ "internalType": "struct Fee",
684
+ "name": "stakingFee",
685
+ "type": "tuple"
686
+ },
687
+ {
688
+ "components": [
689
+ {
690
+ "internalType": "UFixed",
691
+ "name": "fractionalFee",
692
+ "type": "uint256"
693
+ },
694
+ {
695
+ "internalType": "uint256",
696
+ "name": "fixedFee",
697
+ "type": "uint256"
698
+ }
699
+ ],
700
+ "internalType": "struct Fee",
701
+ "name": "performanceFee",
702
+ "type": "tuple"
703
+ },
704
+ {
705
+ "internalType": "bool",
706
+ "name": "isIntercepting",
707
+ "type": "bool"
708
+ },
709
+ {
710
+ "internalType": "address",
711
+ "name": "wallet",
712
+ "type": "address"
851
713
  }
852
714
  ],
853
- "internalType": "struct IComponent.ComponentInfo",
854
- "name": "info",
715
+ "internalType": "struct ISetup.PoolSetupInfo",
716
+ "name": "setup",
855
717
  "type": "tuple"
856
- }
857
- ],
858
- "name": "setComponentInfo",
859
- "outputs": [
718
+ },
860
719
  {
861
- "internalType": "NftId",
862
- "name": "componentNftId",
863
- "type": "uint96"
720
+ "internalType": "StateId",
721
+ "name": "newState",
722
+ "type": "uint8"
864
723
  }
865
724
  ],
725
+ "name": "updatePoolSetup",
726
+ "outputs": [],
866
727
  "stateMutability": "nonpayable",
867
728
  "type": "function"
868
729
  },
@@ -874,12 +735,12 @@
874
735
  "type": "uint96"
875
736
  },
876
737
  {
877
- "internalType": "NftId",
878
- "name": "policyNftId",
879
- "type": "uint96"
738
+ "internalType": "StateId",
739
+ "name": "newState",
740
+ "type": "uint8"
880
741
  }
881
742
  ],
882
- "name": "underwrite",
743
+ "name": "updatePoolSetupState",
883
744
  "outputs": [],
884
745
  "stateMutability": "nonpayable",
885
746
  "type": "function"