@etherisc/gif-next 0.0.2-dc7e4cb-141 → 0.0.2-dc95063-418

Sign up to get free protection for your applications and to get access to all the features.
Files changed (479) hide show
  1. package/README.md +314 -11
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +4 -0
  3. package/artifacts/contracts/components/Component.sol/Component.json +832 -0
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +1319 -0
  6. package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +4 -0
  7. package/artifacts/contracts/{registry/IChainNft.sol/IChainNft.json → components/IComponent.sol/IComponent.json} +279 -226
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +869 -0
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +714 -116
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +512 -61
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +1112 -143
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +957 -105
  18. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +4 -0
  19. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.json +1206 -0
  20. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +4 -0
  21. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +778 -0
  22. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +4 -0
  23. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.json +190 -0
  24. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  25. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +1420 -1090
  26. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +4 -0
  27. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +567 -0
  28. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  29. package/artifacts/contracts/instance/Instance.sol/Instance.json +2263 -1267
  30. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +4 -0
  31. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +1311 -0
  32. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +4 -0
  33. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +1279 -0
  34. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +4 -0
  35. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +1033 -0
  36. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +4 -0
  37. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +701 -0
  38. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +4 -0
  39. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +256 -0
  40. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +4 -0
  41. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.json +552 -0
  42. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
  43. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +429 -0
  44. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
  45. package/artifacts/contracts/instance/{module/lifecycle/ILifecycle.sol/ILifecycleModule.json → base/ILifecycle.sol/ILifecycle.json} +10 -77
  46. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
  47. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +532 -0
  48. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
  49. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +194 -0
  50. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +4 -0
  51. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +237 -0
  52. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +4 -0
  53. package/artifacts/contracts/instance/module/{bundle/IBundle.sol → IBundle.sol}/IBundle.json +1 -1
  54. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +4 -0
  55. package/artifacts/contracts/instance/module/{access/IAccess.sol/IAccess.json → IComponents.sol/IComponents.json} +2 -2
  56. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +4 -0
  57. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.json +10 -0
  58. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +4 -0
  59. package/artifacts/contracts/instance/module/{policy/IPolicy.sol → IPolicy.sol}/IPolicy.json +1 -1
  60. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +4 -0
  61. package/artifacts/contracts/instance/module/{risk/IRisk.sol → IRisk.sol}/IRisk.json +1 -1
  62. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +4 -0
  63. package/artifacts/contracts/instance/module/{pool/IPoolModule.sol/IPool.json → ISetup.sol/ISetup.json} +2 -2
  64. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +4 -0
  65. package/artifacts/contracts/instance/module/{treasury/ITreasury.sol → ITreasury.sol}/ITreasury.json +1 -1
  66. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.dbg.json +4 -0
  67. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.json +968 -0
  68. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +4 -0
  69. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.json +665 -0
  70. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +4 -0
  71. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +1093 -0
  72. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +4 -0
  73. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +661 -0
  74. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.dbg.json +4 -0
  75. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.json +754 -0
  76. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +4 -0
  77. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.json +637 -0
  78. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  79. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +1732 -0
  80. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +4 -0
  81. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +805 -0
  82. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +4 -0
  83. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.json +556 -0
  84. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +4 -0
  85. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +630 -0
  86. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.dbg.json +4 -0
  87. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.json +409 -0
  88. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
  89. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +1013 -0
  90. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +4 -0
  91. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +540 -0
  92. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  93. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +205 -153
  94. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  95. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +139 -232
  96. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +4 -0
  97. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +1021 -0
  98. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +4 -0
  99. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +689 -0
  100. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  101. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +508 -155
  102. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +4 -0
  103. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +657 -0
  104. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  105. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +401 -297
  106. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +4 -0
  107. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +649 -0
  108. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  109. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +199 -12
  110. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  111. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +485 -34
  112. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +4 -0
  113. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +890 -0
  114. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +4 -0
  115. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +52 -0
  116. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  117. package/artifacts/contracts/registry/Registry.sol/Registry.json +487 -101
  118. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +4 -0
  119. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +285 -0
  120. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +4 -0
  121. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +1177 -0
  122. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +4 -0
  123. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +670 -0
  124. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +4 -0
  125. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +547 -0
  126. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +4 -0
  127. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +498 -0
  128. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +4 -0
  129. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.json +107 -0
  130. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  131. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +41 -3
  132. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +4 -0
  133. package/artifacts/contracts/{components/IBaseComponent.sol/IBaseComponent.json → shared/INftOwnable.sol/INftOwnable.json} +38 -74
  134. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +4 -0
  135. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +129 -0
  136. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  137. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +100 -33
  138. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
  139. package/artifacts/contracts/{experiment/inheritance/IB.sol/IB.json → shared/IRegistryLinked.sol/IRegistryLinked.json} +18 -20
  140. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +4 -0
  141. package/artifacts/contracts/{instance/service/ServiceBase.sol/ServiceBase.json → shared/IService.sol/IService.json} +121 -152
  142. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  143. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +16 -125
  144. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +4 -0
  145. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +251 -0
  146. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +4 -0
  147. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +248 -0
  148. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +4 -0
  149. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +582 -0
  150. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  151. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +256 -25
  152. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +4 -0
  153. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +84 -0
  154. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +4 -0
  155. package/artifacts/contracts/{instance/service/IComponentOwnerService.sol/IComponentOwnerService.json → shared/Service.sol/Service.json} +220 -159
  156. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +4 -0
  157. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +96 -0
  158. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +4 -0
  159. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +129 -0
  160. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  161. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +29 -115
  162. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  163. package/artifacts/contracts/test/TestFee.sol/TestFee.json +4 -4
  164. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  165. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +272 -26
  166. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  167. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +44 -10
  168. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  169. package/artifacts/contracts/test/TestService.sol/TestService.json +281 -139
  170. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  171. package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +91 -53
  172. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  173. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +2 -2
  174. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  175. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +38 -140
  176. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  177. package/artifacts/contracts/test/Usdc.sol/USDC.json +91 -53
  178. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  179. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  180. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +2 -2
  181. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  182. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.dbg.json +4 -0
  183. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.json +100 -0
  184. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +4 -0
  185. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +104 -0
  186. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  187. package/artifacts/contracts/types/Fee.sol/FeeLib.json +52 -13
  188. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
  189. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +125 -0
  190. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  191. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +78 -4
  192. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  193. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +26 -3
  194. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +4 -0
  195. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.json +100 -0
  196. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  197. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  198. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.dbg.json +4 -0
  199. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.json +100 -0
  200. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +4 -0
  201. package/artifacts/contracts/types/Referral.sol/ReferralLib.json +142 -0
  202. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  203. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  204. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
  205. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +156 -0
  206. package/artifacts/contracts/types/Seconds.sol/SecondsLib.dbg.json +4 -0
  207. package/artifacts/contracts/types/Seconds.sol/SecondsLib.json +124 -0
  208. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  209. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  210. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  211. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +38 -7
  212. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +4 -0
  213. package/artifacts/contracts/{experiment/types/TypeB.sol/TypeBLib.json → types/UFixed.sol/MathLib.json} +4 -4
  214. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +4 -0
  215. package/artifacts/contracts/types/UFixed.sol/{UFixedMathLib.json → UFixedLib.json} +3 -3
  216. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  217. package/artifacts/contracts/types/Version.sol/VersionLib.json +40 -2
  218. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  219. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +22 -3
  220. package/contracts/components/Component.sol +251 -0
  221. package/contracts/components/Distribution.sol +280 -0
  222. package/contracts/components/IComponent.sol +74 -0
  223. package/contracts/components/IDistributionComponent.sol +71 -0
  224. package/contracts/components/IPoolComponent.sol +98 -42
  225. package/contracts/components/IProductComponent.sol +30 -9
  226. package/contracts/components/Pool.sol +232 -107
  227. package/contracts/components/Product.sol +218 -42
  228. package/contracts/instance/AccessManagerUpgradeableInitializeable.sol +13 -0
  229. package/contracts/instance/BundleManager.sol +127 -0
  230. package/contracts/instance/Cloneable.sol +51 -0
  231. package/contracts/instance/IInstance.sol +87 -42
  232. package/contracts/instance/IInstanceService.sol +72 -0
  233. package/contracts/instance/Instance.sol +311 -50
  234. package/contracts/instance/InstanceAccessManager.sol +522 -0
  235. package/contracts/instance/InstanceReader.sol +290 -0
  236. package/contracts/instance/InstanceService.sol +495 -0
  237. package/contracts/instance/InstanceServiceManager.sol +54 -0
  238. package/contracts/instance/ObjectManager.sol +82 -0
  239. package/contracts/instance/base/ComponentService.sol +134 -0
  240. package/contracts/instance/base/IKeyValueStore.sol +49 -0
  241. package/contracts/instance/base/ILifecycle.sol +30 -0
  242. package/contracts/instance/base/KeyValueStore.sol +175 -0
  243. package/contracts/instance/base/Lifecycle.sol +109 -0
  244. package/contracts/instance/module/IAccess.sol +54 -0
  245. package/contracts/instance/module/IBundle.sol +21 -0
  246. package/contracts/instance/module/IComponents.sol +35 -0
  247. package/contracts/instance/module/IDistribution.sol +41 -0
  248. package/contracts/instance/module/IPolicy.sol +72 -0
  249. package/contracts/instance/module/IRisk.sol +11 -0
  250. package/contracts/instance/module/ISetup.sol +33 -0
  251. package/contracts/instance/module/ITreasury.sol +23 -0
  252. package/contracts/instance/service/ApplicationService.sol +350 -0
  253. package/contracts/instance/service/ApplicationServiceManager.sol +35 -0
  254. package/contracts/instance/service/BundleService.sol +336 -0
  255. package/contracts/instance/service/BundleServiceManager.sol +51 -0
  256. package/contracts/instance/service/ClaimService.sol +151 -0
  257. package/contracts/instance/service/ClaimServiceManager.sol +35 -0
  258. package/contracts/instance/service/DistributionService.sol +467 -0
  259. package/contracts/instance/service/DistributionServiceManager.sol +51 -0
  260. package/contracts/instance/service/IApplicationService.sol +82 -0
  261. package/contracts/instance/service/IBundleService.sol +62 -0
  262. package/contracts/instance/service/IClaimService.sol +61 -0
  263. package/contracts/instance/service/IDistributionService.sol +98 -0
  264. package/contracts/instance/service/IPolicyService.sol +72 -0
  265. package/contracts/instance/service/IPoolService.sol +22 -17
  266. package/contracts/instance/service/IProductService.sol +21 -39
  267. package/contracts/instance/service/PolicyService.sol +403 -0
  268. package/contracts/instance/service/PolicyServiceManager.sol +54 -0
  269. package/contracts/instance/service/PoolService.sol +184 -87
  270. package/contracts/instance/service/PoolServiceManager.sol +51 -0
  271. package/contracts/instance/service/ProductService.sol +176 -290
  272. package/contracts/instance/service/ProductServiceManager.sol +54 -0
  273. package/contracts/registry/ChainNft.sol +87 -36
  274. package/contracts/registry/IRegistry.sol +68 -24
  275. package/contracts/registry/IRegistryService.sol +67 -0
  276. package/contracts/registry/ITransferInterceptor.sol +7 -0
  277. package/contracts/registry/Registry.sol +372 -286
  278. package/contracts/registry/RegistryAccessManager.sol +216 -0
  279. package/contracts/registry/RegistryService.sol +283 -0
  280. package/contracts/registry/RegistryServiceManager.sol +62 -0
  281. package/contracts/registry/ReleaseManager.sol +322 -0
  282. package/contracts/registry/TokenRegistry.sol +116 -0
  283. package/contracts/shared/ContractDeployerLib.sol +72 -0
  284. package/contracts/shared/ERC165.sol +14 -8
  285. package/contracts/shared/INftOwnable.sol +23 -0
  286. package/contracts/shared/IPolicyHolder.sol +26 -0
  287. package/contracts/shared/IRegisterable.sol +10 -19
  288. package/contracts/shared/IRegistryLinked.sol +12 -0
  289. package/contracts/shared/IService.sol +18 -0
  290. package/contracts/shared/IVersionable.sol +38 -37
  291. package/contracts/shared/NftOwnable.sol +120 -0
  292. package/contracts/shared/PolicyHolder.sol +81 -0
  293. package/contracts/shared/ProxyManager.sol +169 -0
  294. package/contracts/shared/Registerable.sol +54 -66
  295. package/contracts/shared/RegistryLinked.sol +48 -0
  296. package/contracts/shared/Service.sol +58 -0
  297. package/contracts/shared/TokenHandler.sol +33 -0
  298. package/contracts/shared/UpgradableProxyWithAdmin.sol +16 -0
  299. package/contracts/shared/Versionable.sol +38 -68
  300. package/contracts/test/TestFee.sol +2 -2
  301. package/contracts/test/TestRegisterable.sol +5 -6
  302. package/contracts/test/TestRoleId.sol +2 -2
  303. package/contracts/test/TestService.sol +7 -14
  304. package/contracts/types/Blocknumber.sol +1 -0
  305. package/contracts/types/ClaimId.sol +52 -0
  306. package/contracts/types/DistributorType.sol +55 -0
  307. package/contracts/types/Fee.sol +11 -5
  308. package/contracts/types/Key32.sol +50 -0
  309. package/contracts/types/NftId.sol +24 -1
  310. package/contracts/types/NftIdSet.sol +26 -24
  311. package/contracts/types/NumberId.sol +52 -0
  312. package/contracts/types/ObjectType.sol +56 -14
  313. package/contracts/types/PayoutId.sol +54 -0
  314. package/contracts/types/Referral.sol +89 -0
  315. package/contracts/types/RiskId.sol +43 -0
  316. package/contracts/types/RoleId.sol +72 -11
  317. package/contracts/types/Seconds.sol +54 -0
  318. package/contracts/types/StateId.sol +13 -2
  319. package/contracts/types/Timestamp.sol +17 -13
  320. package/contracts/types/UFixed.sol +129 -12
  321. package/contracts/types/Version.sol +14 -1
  322. package/package.json +6 -5
  323. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +0 -4
  324. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +0 -174
  325. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +0 -4
  326. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +0 -4
  327. package/artifacts/contracts/experiment/errors/Require.sol/Require.json +0 -105
  328. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +0 -4
  329. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +0 -105
  330. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +0 -4
  331. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +0 -128
  332. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +0 -4
  333. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +0 -42
  334. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +0 -4
  335. package/artifacts/contracts/experiment/inheritance/B.sol/B.json +0 -76
  336. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +0 -4
  337. package/artifacts/contracts/experiment/inheritance/C.sol/C.json +0 -89
  338. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +0 -4
  339. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +0 -128
  340. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +0 -4
  341. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +0 -37
  342. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +0 -4
  343. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +0 -4
  344. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +0 -63
  345. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +0 -4
  346. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +0 -59
  347. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +0 -4
  348. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +0 -124
  349. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +0 -4
  350. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +0 -74
  351. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +0 -4
  352. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +0 -124
  353. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +0 -4
  354. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +0 -207
  355. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +0 -4
  356. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +0 -10
  357. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +0 -4
  358. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +0 -4
  359. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.json +0 -24
  360. package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.dbg.json +0 -4
  361. package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.json +0 -50
  362. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +0 -4
  363. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.json +0 -313
  364. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +0 -4
  365. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.json +0 -333
  366. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +0 -4
  367. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +0 -4
  368. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.json +0 -333
  369. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +0 -4
  370. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +0 -276
  371. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +0 -4
  372. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +0 -4
  373. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +0 -276
  374. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +0 -4
  375. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +0 -10
  376. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +0 -4
  377. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.json +0 -10
  378. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +0 -4
  379. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.json +0 -10
  380. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
  381. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +0 -188
  382. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +0 -4
  383. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.json +0 -10
  384. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +0 -4
  385. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +0 -188
  386. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
  387. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
  388. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
  389. package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
  390. package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
  391. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
  392. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
  393. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +0 -261
  394. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
  395. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +0 -261
  396. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +0 -4
  397. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
  398. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +0 -149
  399. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
  400. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +0 -149
  401. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +0 -4
  402. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +0 -4
  403. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +0 -10
  404. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +0 -4
  405. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +0 -10
  406. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +0 -4
  407. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +0 -4
  408. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +0 -533
  409. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +0 -4
  410. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +0 -76
  411. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +0 -4
  412. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +0 -533
  413. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +0 -4
  414. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +0 -491
  415. package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
  416. package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.json +0 -300
  417. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +0 -4
  418. package/artifacts/contracts/instance/service/IService.sol/IService.dbg.json +0 -4
  419. package/artifacts/contracts/instance/service/IService.sol/IService.json +0 -300
  420. package/artifacts/contracts/instance/service/ServiceBase.sol/ServiceBase.dbg.json +0 -4
  421. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +0 -4
  422. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +0 -4
  423. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +0 -24
  424. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +0 -4
  425. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.json +0 -24
  426. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +0 -4
  427. package/artifacts/contracts/test/TestPool.sol/TestPool.json +0 -387
  428. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +0 -4
  429. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +0 -393
  430. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +0 -4
  431. package/contracts/components/BaseComponent.sol +0 -89
  432. package/contracts/components/IBaseComponent.sol +0 -19
  433. package/contracts/experiment/errors/Require.sol +0 -38
  434. package/contracts/experiment/errors/Revert.sol +0 -44
  435. package/contracts/experiment/inheritance/A.sol +0 -53
  436. package/contracts/experiment/inheritance/B.sol +0 -28
  437. package/contracts/experiment/inheritance/C.sol +0 -34
  438. package/contracts/experiment/inheritance/IA.sol +0 -13
  439. package/contracts/experiment/inheritance/IB.sol +0 -10
  440. package/contracts/experiment/inheritance/IC.sol +0 -12
  441. package/contracts/experiment/statemachine/Dummy.sol +0 -27
  442. package/contracts/experiment/statemachine/ISM.sol +0 -25
  443. package/contracts/experiment/statemachine/README.md +0 -112
  444. package/contracts/experiment/statemachine/SM.sol +0 -57
  445. package/contracts/experiment/statemachine/SimpleStateMachine.sol +0 -31
  446. package/contracts/experiment/types/TypeA.sol +0 -47
  447. package/contracts/experiment/types/TypeB.sol +0 -29
  448. package/contracts/instance/IInstanceLinked.sol +0 -8
  449. package/contracts/instance/IServiceLinked.sol +0 -12
  450. package/contracts/instance/InstanceBase.sol +0 -71
  451. package/contracts/instance/module/access/Access.sol +0 -149
  452. package/contracts/instance/module/access/IAccess.sol +0 -53
  453. package/contracts/instance/module/bundle/BundleModule.sol +0 -228
  454. package/contracts/instance/module/bundle/IBundle.sol +0 -53
  455. package/contracts/instance/module/compensation/CompensationModule.sol +0 -8
  456. package/contracts/instance/module/compensation/ICompensation.sol +0 -10
  457. package/contracts/instance/module/component/ComponentModule.sol +0 -103
  458. package/contracts/instance/module/component/IComponent.sol +0 -53
  459. package/contracts/instance/module/lifecycle/ILifecycle.sol +0 -47
  460. package/contracts/instance/module/lifecycle/LifecycleModule.sol +0 -89
  461. package/contracts/instance/module/policy/IPolicy.sol +0 -60
  462. package/contracts/instance/module/policy/PolicyModule.sol +0 -84
  463. package/contracts/instance/module/pool/IPoolModule.sol +0 -41
  464. package/contracts/instance/module/pool/PoolModule.sol +0 -87
  465. package/contracts/instance/module/risk/IRisk.sol +0 -10
  466. package/contracts/instance/module/risk/RiskModule.sol +0 -8
  467. package/contracts/instance/module/treasury/ITreasury.sol +0 -103
  468. package/contracts/instance/module/treasury/TokenHandler.sol +0 -48
  469. package/contracts/instance/module/treasury/TreasuryModule.sol +0 -152
  470. package/contracts/instance/service/ComponentOwnerService.sol +0 -171
  471. package/contracts/instance/service/ComponentServiceBase.sol +0 -41
  472. package/contracts/instance/service/IComponentOwnerService.sol +0 -22
  473. package/contracts/instance/service/IService.sol +0 -15
  474. package/contracts/instance/service/ServiceBase.sol +0 -39
  475. package/contracts/registry/IChainNft.sol +0 -21
  476. package/contracts/registry/IRegistryLinked.sol +0 -8
  477. package/contracts/shared/IOwnable.sol +0 -6
  478. package/contracts/test/TestPool.sol +0 -22
  479. package/contracts/test/TestProduct.sol +0 -44
@@ -6,10 +6,43 @@
6
6
  {
7
7
  "inputs": [
8
8
  {
9
- "internalType": "NftId",
10
- "name": "nftId",
11
- "type": "uint96"
9
+ "internalType": "address",
10
+ "name": "authority",
11
+ "type": "address"
12
+ }
13
+ ],
14
+ "name": "AccessManagedInvalidAuthority",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "inputs": [
19
+ {
20
+ "internalType": "address",
21
+ "name": "caller",
22
+ "type": "address"
12
23
  },
24
+ {
25
+ "internalType": "uint32",
26
+ "name": "delay",
27
+ "type": "uint32"
28
+ }
29
+ ],
30
+ "name": "AccessManagedRequiredDelay",
31
+ "type": "error"
32
+ },
33
+ {
34
+ "inputs": [
35
+ {
36
+ "internalType": "address",
37
+ "name": "caller",
38
+ "type": "address"
39
+ }
40
+ ],
41
+ "name": "AccessManagedUnauthorized",
42
+ "type": "error"
43
+ },
44
+ {
45
+ "inputs": [
13
46
  {
14
47
  "internalType": "ObjectType",
15
48
  "name": "objectType",
@@ -35,77 +68,76 @@
35
68
  "internalType": "NftId",
36
69
  "name": "nftId",
37
70
  "type": "uint96"
38
- },
39
- {
40
- "internalType": "ObjectType",
41
- "name": "objectType",
42
- "type": "uint8"
43
71
  }
44
72
  ],
45
- "name": "ErrorNoLifecycle",
73
+ "name": "ErrorNftOwnableAlreadyLinked",
46
74
  "type": "error"
47
75
  },
48
76
  {
49
- "anonymous": false,
50
77
  "inputs": [
51
78
  {
52
- "indexed": false,
53
- "internalType": "RoleId",
54
- "name": "role",
55
- "type": "bytes8"
56
- },
79
+ "internalType": "address",
80
+ "name": "contractAddress",
81
+ "type": "address"
82
+ }
83
+ ],
84
+ "name": "ErrorNftOwnableContractNotRegistered",
85
+ "type": "error"
86
+ },
87
+ {
88
+ "inputs": [],
89
+ "name": "ErrorNftOwnableInitialOwnerZero",
90
+ "type": "error"
91
+ },
92
+ {
93
+ "inputs": [
57
94
  {
58
- "indexed": false,
59
- "internalType": "string",
60
- "name": "roleName",
61
- "type": "string"
95
+ "internalType": "address",
96
+ "name": "account",
97
+ "type": "address"
62
98
  }
63
99
  ],
64
- "name": "LogAccessRoleCreated",
65
- "type": "event"
100
+ "name": "ErrorNftOwnableNotOwner",
101
+ "type": "error"
66
102
  },
67
103
  {
68
- "anonymous": false,
69
104
  "inputs": [
70
105
  {
71
- "indexed": false,
72
- "internalType": "RoleId",
73
- "name": "role",
74
- "type": "bytes8"
106
+ "internalType": "NftId",
107
+ "name": "nftId",
108
+ "type": "uint96"
75
109
  },
76
110
  {
77
- "indexed": false,
111
+ "internalType": "ObjectType",
112
+ "name": "objectType",
113
+ "type": "uint8"
114
+ }
115
+ ],
116
+ "name": "ErrorNoLifecycle",
117
+ "type": "error"
118
+ },
119
+ {
120
+ "inputs": [
121
+ {
78
122
  "internalType": "address",
79
- "name": "member",
123
+ "name": "registryAddress",
80
124
  "type": "address"
81
- },
82
- {
83
- "indexed": false,
84
- "internalType": "bool",
85
- "name": "isMember",
86
- "type": "bool"
87
125
  }
88
126
  ],
89
- "name": "LogAccessRoleGranted",
90
- "type": "event"
127
+ "name": "ErrorNotRegistry",
128
+ "type": "error"
91
129
  },
92
130
  {
93
131
  "anonymous": false,
94
132
  "inputs": [
95
133
  {
96
134
  "indexed": false,
97
- "internalType": "RoleId",
98
- "name": "role",
99
- "type": "bytes8"
100
- },
101
- {
102
- "indexed": false,
103
- "internalType": "bool",
104
- "name": "active",
105
- "type": "bool"
135
+ "internalType": "address",
136
+ "name": "authority",
137
+ "type": "address"
106
138
  }
107
139
  ],
108
- "name": "LogAccessRoleStateSet",
140
+ "name": "AuthorityUpdated",
109
141
  "type": "event"
110
142
  },
111
143
  {
@@ -113,35 +145,41 @@
113
145
  "inputs": [
114
146
  {
115
147
  "indexed": false,
116
- "internalType": "NftId",
117
- "name": "nftId",
118
- "type": "uint96"
148
+ "internalType": "ObjectType",
149
+ "name": "objectType",
150
+ "type": "uint8"
119
151
  },
120
152
  {
121
153
  "indexed": false,
122
- "internalType": "StateId",
123
- "name": "fromStateId",
124
- "type": "uint8"
154
+ "internalType": "KeyId",
155
+ "name": "keyId",
156
+ "type": "bytes31"
125
157
  },
126
158
  {
127
159
  "indexed": false,
128
160
  "internalType": "StateId",
129
- "name": "toStateId",
161
+ "name": "state",
130
162
  "type": "uint8"
163
+ },
164
+ {
165
+ "indexed": false,
166
+ "internalType": "address",
167
+ "name": "createdBy",
168
+ "type": "address"
169
+ },
170
+ {
171
+ "indexed": false,
172
+ "internalType": "address",
173
+ "name": "txOrigin",
174
+ "type": "address"
131
175
  }
132
176
  ],
133
- "name": "LogBundleStateChanged",
177
+ "name": "LogInfoCreated",
134
178
  "type": "event"
135
179
  },
136
180
  {
137
181
  "anonymous": false,
138
182
  "inputs": [
139
- {
140
- "indexed": false,
141
- "internalType": "NftId",
142
- "name": "nftId",
143
- "type": "uint96"
144
- },
145
183
  {
146
184
  "indexed": false,
147
185
  "internalType": "ObjectType",
@@ -150,18 +188,36 @@
150
188
  },
151
189
  {
152
190
  "indexed": false,
153
- "internalType": "StateId",
154
- "name": "fromStateId",
155
- "type": "uint8"
191
+ "internalType": "KeyId",
192
+ "name": "keyId",
193
+ "type": "bytes31"
156
194
  },
157
195
  {
158
196
  "indexed": false,
159
197
  "internalType": "StateId",
160
- "name": "toStateId",
198
+ "name": "state",
161
199
  "type": "uint8"
200
+ },
201
+ {
202
+ "indexed": false,
203
+ "internalType": "address",
204
+ "name": "updatedBy",
205
+ "type": "address"
206
+ },
207
+ {
208
+ "indexed": false,
209
+ "internalType": "address",
210
+ "name": "txOrigin",
211
+ "type": "address"
212
+ },
213
+ {
214
+ "indexed": false,
215
+ "internalType": "Blocknumber",
216
+ "name": "lastUpdatedIn",
217
+ "type": "uint32"
162
218
  }
163
219
  ],
164
- "name": "LogComponentStateChanged",
220
+ "name": "LogInfoUpdated",
165
221
  "type": "event"
166
222
  },
167
223
  {
@@ -169,88 +225,159 @@
169
225
  "inputs": [
170
226
  {
171
227
  "indexed": false,
172
- "internalType": "NftId",
173
- "name": "nftId",
174
- "type": "uint96"
228
+ "internalType": "ObjectType",
229
+ "name": "objectType",
230
+ "type": "uint8"
175
231
  },
176
232
  {
177
233
  "indexed": false,
178
- "internalType": "StateId",
179
- "name": "fromStateId",
180
- "type": "uint8"
234
+ "internalType": "KeyId",
235
+ "name": "keyId",
236
+ "type": "bytes31"
181
237
  },
182
238
  {
183
239
  "indexed": false,
184
240
  "internalType": "StateId",
185
- "name": "toStateId",
241
+ "name": "stateOld",
186
242
  "type": "uint8"
187
- }
188
- ],
189
- "name": "LogPolicyStateChanged",
190
- "type": "event"
191
- },
192
- {
193
- "anonymous": false,
194
- "inputs": [
243
+ },
195
244
  {
196
245
  "indexed": false,
197
- "internalType": "Version",
198
- "name": "version",
199
- "type": "uint24"
246
+ "internalType": "StateId",
247
+ "name": "stateNew",
248
+ "type": "uint8"
200
249
  },
201
250
  {
202
251
  "indexed": false,
203
252
  "internalType": "address",
204
- "name": "implementation",
253
+ "name": "updatedBy",
205
254
  "type": "address"
206
255
  },
207
256
  {
208
257
  "indexed": false,
209
258
  "internalType": "address",
210
- "name": "activatedBy",
259
+ "name": "txOrigin",
211
260
  "type": "address"
261
+ },
262
+ {
263
+ "indexed": false,
264
+ "internalType": "Blocknumber",
265
+ "name": "lastUpdatedIn",
266
+ "type": "uint32"
212
267
  }
213
268
  ],
214
- "name": "LogVersionableActivated",
269
+ "name": "LogStateUpdated",
215
270
  "type": "event"
216
271
  },
217
272
  {
218
- "inputs": [
219
- {
220
- "internalType": "address",
221
- "name": "implementation",
222
- "type": "address"
223
- },
273
+ "inputs": [],
274
+ "name": "authority",
275
+ "outputs": [
224
276
  {
225
277
  "internalType": "address",
226
- "name": "activatedBy",
278
+ "name": "",
227
279
  "type": "address"
228
280
  }
229
281
  ],
230
- "name": "activate",
231
- "outputs": [],
232
- "stateMutability": "nonpayable",
282
+ "stateMutability": "view",
233
283
  "type": "function"
234
284
  },
235
285
  {
236
286
  "inputs": [
237
287
  {
238
288
  "internalType": "NftId",
239
- "name": "bundleNftId",
240
- "type": "uint96"
241
- },
242
- {
243
- "internalType": "NftId",
244
- "name": "poolNftId",
289
+ "name": "applicationNftId",
245
290
  "type": "uint96"
246
291
  },
247
292
  {
248
- "internalType": "uint256",
249
- "name": "amount",
250
- "type": "uint256"
293
+ "components": [
294
+ {
295
+ "internalType": "NftId",
296
+ "name": "productNftId",
297
+ "type": "uint96"
298
+ },
299
+ {
300
+ "internalType": "NftId",
301
+ "name": "bundleNftId",
302
+ "type": "uint96"
303
+ },
304
+ {
305
+ "internalType": "ReferralId",
306
+ "name": "referralId",
307
+ "type": "bytes8"
308
+ },
309
+ {
310
+ "internalType": "RiskId",
311
+ "name": "riskId",
312
+ "type": "bytes8"
313
+ },
314
+ {
315
+ "internalType": "uint256",
316
+ "name": "sumInsuredAmount",
317
+ "type": "uint256"
318
+ },
319
+ {
320
+ "internalType": "uint256",
321
+ "name": "premiumAmount",
322
+ "type": "uint256"
323
+ },
324
+ {
325
+ "internalType": "uint256",
326
+ "name": "premiumPaidAmount",
327
+ "type": "uint256"
328
+ },
329
+ {
330
+ "internalType": "Seconds",
331
+ "name": "lifetime",
332
+ "type": "uint40"
333
+ },
334
+ {
335
+ "internalType": "bytes",
336
+ "name": "applicationData",
337
+ "type": "bytes"
338
+ },
339
+ {
340
+ "internalType": "bytes",
341
+ "name": "policyData",
342
+ "type": "bytes"
343
+ },
344
+ {
345
+ "internalType": "uint16",
346
+ "name": "claimsCount",
347
+ "type": "uint16"
348
+ },
349
+ {
350
+ "internalType": "uint16",
351
+ "name": "openClaimsCount",
352
+ "type": "uint16"
353
+ },
354
+ {
355
+ "internalType": "uint256",
356
+ "name": "payoutAmount",
357
+ "type": "uint256"
358
+ },
359
+ {
360
+ "internalType": "Timestamp",
361
+ "name": "activatedAt",
362
+ "type": "uint40"
363
+ },
364
+ {
365
+ "internalType": "Timestamp",
366
+ "name": "expiredAt",
367
+ "type": "uint40"
368
+ },
369
+ {
370
+ "internalType": "Timestamp",
371
+ "name": "closedAt",
372
+ "type": "uint40"
373
+ }
374
+ ],
375
+ "internalType": "struct IPolicy.PolicyInfo",
376
+ "name": "policy",
377
+ "type": "tuple"
251
378
  }
252
379
  ],
253
- "name": "addBundleToPool",
380
+ "name": "createApplication",
254
381
  "outputs": [],
255
382
  "stateMutability": "nonpayable",
256
383
  "type": "function"
@@ -258,202 +385,33 @@
258
385
  {
259
386
  "inputs": [
260
387
  {
261
- "internalType": "uint256",
262
- "name": "amount",
263
- "type": "uint256"
388
+ "internalType": "NftId",
389
+ "name": "bundleNftId",
390
+ "type": "uint96"
264
391
  },
265
392
  {
266
393
  "components": [
267
394
  {
268
- "internalType": "UFixed",
269
- "name": "fractionalFee",
270
- "type": "uint256"
395
+ "internalType": "NftId",
396
+ "name": "poolNftId",
397
+ "type": "uint96"
271
398
  },
272
399
  {
273
- "internalType": "uint256",
274
- "name": "fixedFee",
275
- "type": "uint256"
276
- }
277
- ],
278
- "internalType": "struct Fee",
279
- "name": "fee",
280
- "type": "tuple"
281
- }
282
- ],
283
- "name": "calculateFeeAmount",
284
- "outputs": [
285
- {
286
- "internalType": "uint256",
287
- "name": "feeAmount",
288
- "type": "uint256"
289
- },
290
- {
291
- "internalType": "uint256",
292
- "name": "netAmount",
293
- "type": "uint256"
294
- }
295
- ],
296
- "stateMutability": "pure",
297
- "type": "function"
298
- },
299
- {
300
- "inputs": [
301
- {
302
- "internalType": "NftId",
303
- "name": "bundleNftId",
304
- "type": "uint96"
305
- },
306
- {
307
- "internalType": "NftId",
308
- "name": "policyNftId",
309
- "type": "uint96"
310
- },
311
- {
312
- "internalType": "uint256",
313
- "name": "amount",
314
- "type": "uint256"
315
- }
316
- ],
317
- "name": "collateralizePolicy",
318
- "outputs": [],
319
- "stateMutability": "nonpayable",
320
- "type": "function"
321
- },
322
- {
323
- "inputs": [
324
- {
325
- "internalType": "NftId",
326
- "name": "productNftId",
327
- "type": "uint96"
328
- },
329
- {
330
- "internalType": "NftId",
331
- "name": "policyNftId",
332
- "type": "uint96"
333
- },
334
- {
335
- "internalType": "uint256",
336
- "name": "sumInsuredAmount",
337
- "type": "uint256"
338
- },
339
- {
340
- "internalType": "uint256",
341
- "name": "premiumAmount",
342
- "type": "uint256"
343
- },
344
- {
345
- "internalType": "uint256",
346
- "name": "lifetime",
347
- "type": "uint256"
348
- },
349
- {
350
- "internalType": "NftId",
351
- "name": "bundleNftId",
352
- "type": "uint96"
353
- }
354
- ],
355
- "name": "createApplication",
356
- "outputs": [],
357
- "stateMutability": "nonpayable",
358
- "type": "function"
359
- },
360
- {
361
- "inputs": [
362
- {
363
- "internalType": "NftId",
364
- "name": "bundleNftId",
365
- "type": "uint96"
366
- },
367
- {
368
- "internalType": "NftId",
369
- "name": "poolNftId",
370
- "type": "uint96"
371
- },
372
- {
373
- "internalType": "uint256",
374
- "name": "amount",
375
- "type": "uint256"
376
- },
377
- {
378
- "internalType": "uint256",
379
- "name": "lifetime",
380
- "type": "uint256"
381
- },
382
- {
383
- "internalType": "bytes",
384
- "name": "filter",
385
- "type": "bytes"
386
- }
387
- ],
388
- "name": "createBundleInfo",
389
- "outputs": [],
390
- "stateMutability": "nonpayable",
391
- "type": "function"
392
- },
393
- {
394
- "inputs": [
395
- {
396
- "internalType": "string",
397
- "name": "roleName",
398
- "type": "string"
399
- }
400
- ],
401
- "name": "createRole",
402
- "outputs": [
403
- {
404
- "internalType": "RoleId",
405
- "name": "role",
406
- "type": "bytes8"
407
- }
408
- ],
409
- "stateMutability": "nonpayable",
410
- "type": "function"
411
- },
412
- {
413
- "inputs": [
414
- {
415
- "internalType": "NftId",
416
- "name": "poolNftId",
417
- "type": "uint96"
418
- }
419
- ],
420
- "name": "getBundleCount",
421
- "outputs": [
422
- {
423
- "internalType": "uint256",
424
- "name": "bundleCount",
425
- "type": "uint256"
426
- }
427
- ],
428
- "stateMutability": "view",
429
- "type": "function"
430
- },
431
- {
432
- "inputs": [
433
- {
434
- "internalType": "NftId",
435
- "name": "bundleNftId",
436
- "type": "uint96"
437
- }
438
- ],
439
- "name": "getBundleInfo",
440
- "outputs": [
441
- {
442
- "components": [
443
- {
444
- "internalType": "NftId",
445
- "name": "nftId",
446
- "type": "uint96"
447
- },
448
- {
449
- "internalType": "NftId",
450
- "name": "poolNftId",
451
- "type": "uint96"
452
- },
453
- {
454
- "internalType": "StateId",
455
- "name": "state",
456
- "type": "uint8"
400
+ "components": [
401
+ {
402
+ "internalType": "UFixed",
403
+ "name": "fractionalFee",
404
+ "type": "uint256"
405
+ },
406
+ {
407
+ "internalType": "uint256",
408
+ "name": "fixedFee",
409
+ "type": "uint256"
410
+ }
411
+ ],
412
+ "internalType": "struct Fee",
413
+ "name": "fee",
414
+ "type": "tuple"
457
415
  },
458
416
  {
459
417
  "internalType": "bytes",
@@ -476,8 +434,8 @@
476
434
  "type": "uint256"
477
435
  },
478
436
  {
479
- "internalType": "Timestamp",
480
- "name": "createdAt",
437
+ "internalType": "Seconds",
438
+ "name": "lifetime",
481
439
  "type": "uint40"
482
440
  },
483
441
  {
@@ -489,373 +447,430 @@
489
447
  "internalType": "Timestamp",
490
448
  "name": "closedAt",
491
449
  "type": "uint40"
492
- },
493
- {
494
- "internalType": "Blocknumber",
495
- "name": "updatedIn",
496
- "type": "uint32"
497
450
  }
498
451
  ],
499
452
  "internalType": "struct IBundle.BundleInfo",
500
- "name": "bundleInfo",
453
+ "name": "bundle",
501
454
  "type": "tuple"
502
455
  }
503
456
  ],
504
- "stateMutability": "view",
457
+ "name": "createBundle",
458
+ "outputs": [],
459
+ "stateMutability": "nonpayable",
505
460
  "type": "function"
506
461
  },
507
462
  {
508
463
  "inputs": [
509
464
  {
510
465
  "internalType": "NftId",
511
- "name": "poolNftId",
466
+ "name": "distributionNftId",
512
467
  "type": "uint96"
513
468
  },
514
- {
515
- "internalType": "uint256",
516
- "name": "index",
517
- "type": "uint256"
518
- }
519
- ],
520
- "name": "getBundleNftId",
521
- "outputs": [
522
- {
523
- "internalType": "NftId",
524
- "name": "bundleNftId",
525
- "type": "uint96"
526
- }
527
- ],
528
- "stateMutability": "view",
529
- "type": "function"
530
- },
531
- {
532
- "inputs": [],
533
- "name": "getComponentCount",
534
- "outputs": [
535
- {
536
- "internalType": "uint256",
537
- "name": "numberOfCompnents",
538
- "type": "uint256"
539
- }
540
- ],
541
- "stateMutability": "view",
542
- "type": "function"
543
- },
544
- {
545
- "inputs": [
546
- {
547
- "internalType": "uint256",
548
- "name": "idx",
549
- "type": "uint256"
550
- }
551
- ],
552
- "name": "getComponentId",
553
- "outputs": [
554
- {
555
- "internalType": "NftId",
556
- "name": "nftId",
557
- "type": "uint96"
558
- }
559
- ],
560
- "stateMutability": "view",
561
- "type": "function"
562
- },
563
- {
564
- "inputs": [
565
- {
566
- "internalType": "NftId",
567
- "name": "nftId",
568
- "type": "uint96"
569
- }
570
- ],
571
- "name": "getComponentInfo",
572
- "outputs": [
573
469
  {
574
470
  "components": [
575
471
  {
576
472
  "internalType": "NftId",
577
- "name": "nftId",
473
+ "name": "productNftId",
578
474
  "type": "uint96"
579
475
  },
580
476
  {
581
- "internalType": "StateId",
582
- "name": "state",
583
- "type": "uint8"
477
+ "internalType": "contract TokenHandler",
478
+ "name": "tokenHandler",
479
+ "type": "address"
584
480
  },
585
481
  {
586
- "internalType": "contract IERC20Metadata",
587
- "name": "token",
482
+ "components": [
483
+ {
484
+ "internalType": "UFixed",
485
+ "name": "fractionalFee",
486
+ "type": "uint256"
487
+ },
488
+ {
489
+ "internalType": "uint256",
490
+ "name": "fixedFee",
491
+ "type": "uint256"
492
+ }
493
+ ],
494
+ "internalType": "struct Fee",
495
+ "name": "minDistributionOwnerFee",
496
+ "type": "tuple"
497
+ },
498
+ {
499
+ "components": [
500
+ {
501
+ "internalType": "UFixed",
502
+ "name": "fractionalFee",
503
+ "type": "uint256"
504
+ },
505
+ {
506
+ "internalType": "uint256",
507
+ "name": "fixedFee",
508
+ "type": "uint256"
509
+ }
510
+ ],
511
+ "internalType": "struct Fee",
512
+ "name": "distributionFee",
513
+ "type": "tuple"
514
+ },
515
+ {
516
+ "internalType": "address",
517
+ "name": "wallet",
588
518
  "type": "address"
519
+ },
520
+ {
521
+ "internalType": "uint256",
522
+ "name": "sumDistributionOwnerFees",
523
+ "type": "uint256"
589
524
  }
590
525
  ],
591
- "internalType": "struct IComponent.ComponentInfo",
592
- "name": "info",
526
+ "internalType": "struct ISetup.DistributionSetupInfo",
527
+ "name": "setup",
593
528
  "type": "tuple"
594
529
  }
595
530
  ],
596
- "stateMutability": "view",
597
- "type": "function"
598
- },
599
- {
600
- "inputs": [],
601
- "name": "getComponentOwnerService",
602
- "outputs": [
603
- {
604
- "internalType": "contract IComponentOwnerService",
605
- "name": "",
606
- "type": "address"
607
- }
608
- ],
609
- "stateMutability": "view",
610
- "type": "function"
611
- },
612
- {
613
- "inputs": [],
614
- "name": "getData",
615
- "outputs": [
616
- {
617
- "internalType": "bytes",
618
- "name": "data",
619
- "type": "bytes"
620
- }
621
- ],
622
- "stateMutability": "view",
531
+ "name": "createDistributionSetup",
532
+ "outputs": [],
533
+ "stateMutability": "nonpayable",
623
534
  "type": "function"
624
535
  },
625
536
  {
626
537
  "inputs": [
627
538
  {
628
- "internalType": "UFixed",
629
- "name": "fractionalFee",
630
- "type": "uint256"
539
+ "internalType": "NftId",
540
+ "name": "nftId",
541
+ "type": "uint96"
631
542
  },
632
- {
633
- "internalType": "uint256",
634
- "name": "fixedFee",
635
- "type": "uint256"
636
- }
637
- ],
638
- "name": "getFee",
639
- "outputs": [
640
543
  {
641
544
  "components": [
642
545
  {
643
- "internalType": "UFixed",
644
- "name": "fractionalFee",
546
+ "internalType": "DistributorType",
547
+ "name": "distributorType",
548
+ "type": "bytes8"
549
+ },
550
+ {
551
+ "internalType": "bool",
552
+ "name": "active",
553
+ "type": "bool"
554
+ },
555
+ {
556
+ "internalType": "bytes",
557
+ "name": "data",
558
+ "type": "bytes"
559
+ },
560
+ {
561
+ "internalType": "uint256",
562
+ "name": "sumCommisions",
645
563
  "type": "uint256"
646
564
  },
647
565
  {
648
566
  "internalType": "uint256",
649
- "name": "fixedFee",
567
+ "name": "numPoliciesSold",
650
568
  "type": "uint256"
651
569
  }
652
570
  ],
653
- "internalType": "struct Fee",
654
- "name": "fee",
571
+ "internalType": "struct IDistribution.DistributorInfo",
572
+ "name": "info",
655
573
  "type": "tuple"
656
574
  }
657
575
  ],
658
- "stateMutability": "pure",
576
+ "name": "createDistributor",
577
+ "outputs": [],
578
+ "stateMutability": "nonpayable",
659
579
  "type": "function"
660
580
  },
661
581
  {
662
582
  "inputs": [
663
583
  {
664
- "internalType": "ObjectType",
665
- "name": "objectType",
666
- "type": "uint8"
667
- }
668
- ],
669
- "name": "getInitialState",
670
- "outputs": [
584
+ "internalType": "Key32",
585
+ "name": "distributorKey",
586
+ "type": "bytes32"
587
+ },
671
588
  {
672
- "internalType": "StateId",
673
- "name": "",
674
- "type": "uint8"
589
+ "components": [
590
+ {
591
+ "internalType": "string",
592
+ "name": "name",
593
+ "type": "string"
594
+ },
595
+ {
596
+ "internalType": "UFixed",
597
+ "name": "minDiscountPercentage",
598
+ "type": "uint256"
599
+ },
600
+ {
601
+ "internalType": "UFixed",
602
+ "name": "maxDiscountPercentage",
603
+ "type": "uint256"
604
+ },
605
+ {
606
+ "internalType": "UFixed",
607
+ "name": "commissionPercentage",
608
+ "type": "uint256"
609
+ },
610
+ {
611
+ "internalType": "uint32",
612
+ "name": "maxReferralCount",
613
+ "type": "uint32"
614
+ },
615
+ {
616
+ "internalType": "uint32",
617
+ "name": "maxReferralLifetime",
618
+ "type": "uint32"
619
+ },
620
+ {
621
+ "internalType": "bool",
622
+ "name": "allowSelfReferrals",
623
+ "type": "bool"
624
+ },
625
+ {
626
+ "internalType": "bool",
627
+ "name": "allowRenewals",
628
+ "type": "bool"
629
+ },
630
+ {
631
+ "internalType": "bytes",
632
+ "name": "data",
633
+ "type": "bytes"
634
+ }
635
+ ],
636
+ "internalType": "struct IDistribution.DistributorTypeInfo",
637
+ "name": "info",
638
+ "type": "tuple"
675
639
  }
676
640
  ],
677
- "stateMutability": "view",
641
+ "name": "createDistributorType",
642
+ "outputs": [],
643
+ "stateMutability": "nonpayable",
678
644
  "type": "function"
679
645
  },
680
646
  {
681
- "inputs": [],
682
- "name": "getNftId",
683
- "outputs": [
647
+ "inputs": [
684
648
  {
685
649
  "internalType": "NftId",
686
- "name": "nftId",
650
+ "name": "poolNftId",
687
651
  "type": "uint96"
688
- }
689
- ],
690
- "stateMutability": "view",
691
- "type": "function"
692
- },
693
- {
694
- "inputs": [],
695
- "name": "getOwner",
696
- "outputs": [
697
- {
698
- "internalType": "address",
699
- "name": "owner",
700
- "type": "address"
701
- }
702
- ],
703
- "stateMutability": "view",
704
- "type": "function"
705
- },
706
- {
707
- "inputs": [],
708
- "name": "getParentNftId",
709
- "outputs": [
652
+ },
710
653
  {
711
- "internalType": "NftId",
712
- "name": "nftId",
713
- "type": "uint96"
654
+ "components": [
655
+ {
656
+ "internalType": "string",
657
+ "name": "name",
658
+ "type": "string"
659
+ },
660
+ {
661
+ "internalType": "contract IERC20Metadata",
662
+ "name": "token",
663
+ "type": "address"
664
+ },
665
+ {
666
+ "internalType": "contract TokenHandler",
667
+ "name": "tokenHandler",
668
+ "type": "address"
669
+ },
670
+ {
671
+ "internalType": "address",
672
+ "name": "wallet",
673
+ "type": "address"
674
+ },
675
+ {
676
+ "internalType": "bytes",
677
+ "name": "data",
678
+ "type": "bytes"
679
+ }
680
+ ],
681
+ "internalType": "struct IComponents.ComponentInfo",
682
+ "name": "info",
683
+ "type": "tuple"
714
684
  }
715
685
  ],
716
- "stateMutability": "view",
686
+ "name": "createPoolSetup",
687
+ "outputs": [],
688
+ "stateMutability": "nonpayable",
717
689
  "type": "function"
718
690
  },
719
691
  {
720
692
  "inputs": [
721
693
  {
722
694
  "internalType": "NftId",
723
- "name": "nftId",
695
+ "name": "productNftId",
724
696
  "type": "uint96"
725
- }
726
- ],
727
- "name": "getPolicyInfo",
728
- "outputs": [
697
+ },
729
698
  {
730
699
  "components": [
731
700
  {
732
- "internalType": "NftId",
733
- "name": "nftId",
734
- "type": "uint96"
701
+ "internalType": "contract IERC20Metadata",
702
+ "name": "token",
703
+ "type": "address"
735
704
  },
736
705
  {
737
- "internalType": "NftId",
738
- "name": "productNftId",
739
- "type": "uint96"
706
+ "internalType": "contract TokenHandler",
707
+ "name": "tokenHandler",
708
+ "type": "address"
740
709
  },
741
710
  {
742
711
  "internalType": "NftId",
743
- "name": "bundleNftId",
712
+ "name": "distributionNftId",
744
713
  "type": "uint96"
745
714
  },
746
715
  {
747
- "internalType": "address",
748
- "name": "beneficiary",
749
- "type": "address"
716
+ "internalType": "NftId",
717
+ "name": "poolNftId",
718
+ "type": "uint96"
750
719
  },
751
720
  {
752
- "internalType": "StateId",
753
- "name": "state",
754
- "type": "uint8"
721
+ "components": [
722
+ {
723
+ "internalType": "UFixed",
724
+ "name": "fractionalFee",
725
+ "type": "uint256"
726
+ },
727
+ {
728
+ "internalType": "uint256",
729
+ "name": "fixedFee",
730
+ "type": "uint256"
731
+ }
732
+ ],
733
+ "internalType": "struct Fee",
734
+ "name": "productFee",
735
+ "type": "tuple"
755
736
  },
756
737
  {
757
- "internalType": "uint256",
758
- "name": "sumInsuredAmount",
759
- "type": "uint256"
738
+ "components": [
739
+ {
740
+ "internalType": "UFixed",
741
+ "name": "fractionalFee",
742
+ "type": "uint256"
743
+ },
744
+ {
745
+ "internalType": "uint256",
746
+ "name": "fixedFee",
747
+ "type": "uint256"
748
+ }
749
+ ],
750
+ "internalType": "struct Fee",
751
+ "name": "processingFee",
752
+ "type": "tuple"
760
753
  },
761
754
  {
762
- "internalType": "uint256",
763
- "name": "premiumAmount",
764
- "type": "uint256"
755
+ "internalType": "bool",
756
+ "name": "isIntercepting",
757
+ "type": "bool"
765
758
  },
766
759
  {
767
- "internalType": "uint256",
768
- "name": "premiumPaidAmount",
769
- "type": "uint256"
770
- },
760
+ "internalType": "address",
761
+ "name": "wallet",
762
+ "type": "address"
763
+ }
764
+ ],
765
+ "internalType": "struct ISetup.ProductSetupInfo",
766
+ "name": "setup",
767
+ "type": "tuple"
768
+ }
769
+ ],
770
+ "name": "createProductSetup",
771
+ "outputs": [],
772
+ "stateMutability": "nonpayable",
773
+ "type": "function"
774
+ },
775
+ {
776
+ "inputs": [
777
+ {
778
+ "internalType": "Key32",
779
+ "name": "referralKey",
780
+ "type": "bytes32"
781
+ },
782
+ {
783
+ "components": [
771
784
  {
772
- "internalType": "uint256",
773
- "name": "lifetime",
774
- "type": "uint256"
785
+ "internalType": "NftId",
786
+ "name": "distributorNftId",
787
+ "type": "uint96"
775
788
  },
776
789
  {
777
- "internalType": "bytes",
778
- "name": "data",
779
- "type": "bytes"
790
+ "internalType": "string",
791
+ "name": "referralCode",
792
+ "type": "string"
780
793
  },
781
794
  {
782
- "internalType": "Timestamp",
783
- "name": "createdAt",
784
- "type": "uint40"
795
+ "internalType": "UFixed",
796
+ "name": "discountPercentage",
797
+ "type": "uint256"
785
798
  },
786
799
  {
787
- "internalType": "Timestamp",
788
- "name": "activatedAt",
789
- "type": "uint40"
800
+ "internalType": "uint32",
801
+ "name": "maxReferrals",
802
+ "type": "uint32"
790
803
  },
791
804
  {
792
- "internalType": "Timestamp",
793
- "name": "expiredAt",
794
- "type": "uint40"
805
+ "internalType": "uint32",
806
+ "name": "usedReferrals",
807
+ "type": "uint32"
795
808
  },
796
809
  {
797
810
  "internalType": "Timestamp",
798
- "name": "closedAt",
811
+ "name": "expiryAt",
799
812
  "type": "uint40"
800
813
  },
801
814
  {
802
- "internalType": "Blocknumber",
803
- "name": "updatedIn",
804
- "type": "uint32"
815
+ "internalType": "bytes",
816
+ "name": "data",
817
+ "type": "bytes"
805
818
  }
806
819
  ],
807
- "internalType": "struct IPolicy.PolicyInfo",
808
- "name": "info",
820
+ "internalType": "struct IDistribution.ReferralInfo",
821
+ "name": "referralInfo",
809
822
  "type": "tuple"
810
823
  }
811
824
  ],
812
- "stateMutability": "view",
825
+ "name": "createReferral",
826
+ "outputs": [],
827
+ "stateMutability": "nonpayable",
813
828
  "type": "function"
814
829
  },
815
830
  {
816
831
  "inputs": [
817
832
  {
818
- "internalType": "NftId",
819
- "name": "nftId",
820
- "type": "uint96"
821
- }
822
- ],
823
- "name": "getPoolInfo",
824
- "outputs": [
833
+ "internalType": "RiskId",
834
+ "name": "riskId",
835
+ "type": "bytes8"
836
+ },
825
837
  {
826
838
  "components": [
827
839
  {
828
840
  "internalType": "NftId",
829
- "name": "nftId",
841
+ "name": "productNftId",
830
842
  "type": "uint96"
831
843
  },
832
844
  {
833
- "internalType": "bool",
834
- "name": "isVerifying",
835
- "type": "bool"
836
- },
837
- {
838
- "internalType": "UFixed",
839
- "name": "collateralizationLevel",
840
- "type": "uint256"
845
+ "internalType": "bytes",
846
+ "name": "data",
847
+ "type": "bytes"
841
848
  }
842
849
  ],
843
- "internalType": "struct IPool.PoolInfo",
844
- "name": "info",
850
+ "internalType": "struct IRisk.RiskInfo",
851
+ "name": "risk",
845
852
  "type": "tuple"
846
853
  }
847
854
  ],
848
- "stateMutability": "view",
855
+ "name": "createRisk",
856
+ "outputs": [],
857
+ "stateMutability": "nonpayable",
849
858
  "type": "function"
850
859
  },
851
860
  {
852
- "inputs": [],
853
- "name": "getPoolService",
861
+ "inputs": [
862
+ {
863
+ "internalType": "Key32",
864
+ "name": "key",
865
+ "type": "bytes32"
866
+ }
867
+ ],
868
+ "name": "exists",
854
869
  "outputs": [
855
870
  {
856
- "internalType": "contract IPoolService",
871
+ "internalType": "bool",
857
872
  "name": "",
858
- "type": "address"
873
+ "type": "bool"
859
874
  }
860
875
  ],
861
876
  "stateMutability": "view",
@@ -864,62 +879,55 @@
864
879
  {
865
880
  "inputs": [
866
881
  {
867
- "internalType": "NftId",
868
- "name": "poolNftId",
869
- "type": "uint96"
882
+ "internalType": "Key32",
883
+ "name": "key",
884
+ "type": "bytes32"
870
885
  }
871
886
  ],
872
- "name": "getPoolSetup",
887
+ "name": "get",
873
888
  "outputs": [
874
889
  {
875
890
  "components": [
876
- {
877
- "internalType": "NftId",
878
- "name": "poolNftId",
879
- "type": "uint96"
880
- },
881
- {
882
- "internalType": "address",
883
- "name": "wallet",
884
- "type": "address"
885
- },
886
891
  {
887
892
  "components": [
888
893
  {
889
- "internalType": "UFixed",
890
- "name": "fractionalFee",
891
- "type": "uint256"
894
+ "internalType": "ObjectType",
895
+ "name": "objectType",
896
+ "type": "uint8"
892
897
  },
893
898
  {
894
- "internalType": "uint256",
895
- "name": "fixedFee",
896
- "type": "uint256"
897
- }
898
- ],
899
- "internalType": "struct Fee",
900
- "name": "stakingFee",
901
- "type": "tuple"
902
- },
903
- {
904
- "components": [
899
+ "internalType": "StateId",
900
+ "name": "state",
901
+ "type": "uint8"
902
+ },
905
903
  {
906
- "internalType": "UFixed",
907
- "name": "fractionalFee",
908
- "type": "uint256"
904
+ "internalType": "address",
905
+ "name": "updatedBy",
906
+ "type": "address"
909
907
  },
910
908
  {
911
- "internalType": "uint256",
912
- "name": "fixedFee",
913
- "type": "uint256"
909
+ "internalType": "Blocknumber",
910
+ "name": "updatedIn",
911
+ "type": "uint32"
912
+ },
913
+ {
914
+ "internalType": "Blocknumber",
915
+ "name": "createdIn",
916
+ "type": "uint32"
914
917
  }
915
918
  ],
916
- "internalType": "struct Fee",
917
- "name": "performanceFee",
919
+ "internalType": "struct IKeyValueStore.Metadata",
920
+ "name": "metadata",
918
921
  "type": "tuple"
922
+ },
923
+ {
924
+ "internalType": "bytes",
925
+ "name": "data",
926
+ "type": "bytes"
919
927
  }
920
928
  ],
921
- "internalType": "struct ITreasury.PoolSetup",
922
- "name": "setup",
929
+ "internalType": "struct IKeyValueStore.Value",
930
+ "name": "value",
923
931
  "type": "tuple"
924
932
  }
925
933
  ],
@@ -928,10 +936,23 @@
928
936
  },
929
937
  {
930
938
  "inputs": [],
931
- "name": "getProductService",
939
+ "name": "getBundleManager",
932
940
  "outputs": [
933
941
  {
934
- "internalType": "contract IProductService",
942
+ "internalType": "contract BundleManager",
943
+ "name": "",
944
+ "type": "address"
945
+ }
946
+ ],
947
+ "stateMutability": "view",
948
+ "type": "function"
949
+ },
950
+ {
951
+ "inputs": [],
952
+ "name": "getBundleService",
953
+ "outputs": [
954
+ {
955
+ "internalType": "contract IBundleService",
935
956
  "name": "",
936
957
  "type": "address"
937
958
  }
@@ -942,77 +963,79 @@
942
963
  {
943
964
  "inputs": [
944
965
  {
945
- "internalType": "NftId",
946
- "name": "productNftId",
947
- "type": "uint96"
966
+ "internalType": "Key32",
967
+ "name": "key",
968
+ "type": "bytes32"
969
+ }
970
+ ],
971
+ "name": "getData",
972
+ "outputs": [
973
+ {
974
+ "internalType": "bytes",
975
+ "name": "data",
976
+ "type": "bytes"
977
+ }
978
+ ],
979
+ "stateMutability": "view",
980
+ "type": "function"
981
+ },
982
+ {
983
+ "inputs": [],
984
+ "name": "getDistributionService",
985
+ "outputs": [
986
+ {
987
+ "internalType": "contract IDistributionService",
988
+ "name": "",
989
+ "type": "address"
948
990
  }
949
991
  ],
950
- "name": "getProductSetup",
992
+ "stateMutability": "view",
993
+ "type": "function"
994
+ },
995
+ {
996
+ "inputs": [],
997
+ "name": "getInitialInfo",
951
998
  "outputs": [
952
999
  {
953
1000
  "components": [
954
1001
  {
955
1002
  "internalType": "NftId",
956
- "name": "productNftId",
1003
+ "name": "nftId",
957
1004
  "type": "uint96"
958
1005
  },
959
1006
  {
960
1007
  "internalType": "NftId",
961
- "name": "distributorNftId",
1008
+ "name": "parentNftId",
962
1009
  "type": "uint96"
963
1010
  },
964
1011
  {
965
- "internalType": "NftId",
966
- "name": "poolNftId",
967
- "type": "uint96"
1012
+ "internalType": "ObjectType",
1013
+ "name": "objectType",
1014
+ "type": "uint8"
968
1015
  },
969
1016
  {
970
- "internalType": "contract IERC20Metadata",
971
- "name": "token",
972
- "type": "address"
1017
+ "internalType": "bool",
1018
+ "name": "isInterceptor",
1019
+ "type": "bool"
973
1020
  },
974
1021
  {
975
1022
  "internalType": "address",
976
- "name": "wallet",
1023
+ "name": "objectAddress",
977
1024
  "type": "address"
978
1025
  },
979
1026
  {
980
- "components": [
981
- {
982
- "internalType": "UFixed",
983
- "name": "fractionalFee",
984
- "type": "uint256"
985
- },
986
- {
987
- "internalType": "uint256",
988
- "name": "fixedFee",
989
- "type": "uint256"
990
- }
991
- ],
992
- "internalType": "struct Fee",
993
- "name": "policyFee",
994
- "type": "tuple"
1027
+ "internalType": "address",
1028
+ "name": "initialOwner",
1029
+ "type": "address"
995
1030
  },
996
1031
  {
997
- "components": [
998
- {
999
- "internalType": "UFixed",
1000
- "name": "fractionalFee",
1001
- "type": "uint256"
1002
- },
1003
- {
1004
- "internalType": "uint256",
1005
- "name": "fixedFee",
1006
- "type": "uint256"
1007
- }
1008
- ],
1009
- "internalType": "struct Fee",
1010
- "name": "processingFee",
1011
- "type": "tuple"
1032
+ "internalType": "bytes",
1033
+ "name": "data",
1034
+ "type": "bytes"
1012
1035
  }
1013
1036
  ],
1014
- "internalType": "struct ITreasury.ProductSetup",
1015
- "name": "setup",
1037
+ "internalType": "struct IRegistry.ObjectInfo",
1038
+ "name": "",
1016
1039
  "type": "tuple"
1017
1040
  }
1018
1041
  ],
@@ -1020,32 +1043,32 @@
1020
1043
  "type": "function"
1021
1044
  },
1022
1045
  {
1023
- "inputs": [],
1024
- "name": "getRegistry",
1046
+ "inputs": [
1047
+ {
1048
+ "internalType": "ObjectType",
1049
+ "name": "objectType",
1050
+ "type": "uint8"
1051
+ }
1052
+ ],
1053
+ "name": "getInitialState",
1025
1054
  "outputs": [
1026
1055
  {
1027
- "internalType": "contract IRegistry",
1028
- "name": "registry",
1029
- "type": "address"
1056
+ "internalType": "StateId",
1057
+ "name": "",
1058
+ "type": "uint8"
1030
1059
  }
1031
1060
  ],
1032
1061
  "stateMutability": "view",
1033
1062
  "type": "function"
1034
1063
  },
1035
1064
  {
1036
- "inputs": [
1037
- {
1038
- "internalType": "uint256",
1039
- "name": "idx",
1040
- "type": "uint256"
1041
- }
1042
- ],
1043
- "name": "getRole",
1065
+ "inputs": [],
1066
+ "name": "getInstanceAccessManager",
1044
1067
  "outputs": [
1045
1068
  {
1046
- "internalType": "RoleId",
1047
- "name": "role",
1048
- "type": "bytes8"
1069
+ "internalType": "contract InstanceAccessManager",
1070
+ "name": "",
1071
+ "type": "address"
1049
1072
  }
1050
1073
  ],
1051
1074
  "stateMutability": "view",
@@ -1053,31 +1076,25 @@
1053
1076
  },
1054
1077
  {
1055
1078
  "inputs": [],
1056
- "name": "getRoleCount",
1079
+ "name": "getInstanceReader",
1057
1080
  "outputs": [
1058
1081
  {
1059
- "internalType": "uint256",
1060
- "name": "roles",
1061
- "type": "uint256"
1082
+ "internalType": "contract InstanceReader",
1083
+ "name": "",
1084
+ "type": "address"
1062
1085
  }
1063
1086
  ],
1064
1087
  "stateMutability": "view",
1065
1088
  "type": "function"
1066
1089
  },
1067
1090
  {
1068
- "inputs": [
1069
- {
1070
- "internalType": "string",
1071
- "name": "roleName",
1072
- "type": "string"
1073
- }
1074
- ],
1075
- "name": "getRoleId",
1091
+ "inputs": [],
1092
+ "name": "getMajorVersion",
1076
1093
  "outputs": [
1077
1094
  {
1078
- "internalType": "RoleId",
1079
- "name": "role",
1080
- "type": "bytes8"
1095
+ "internalType": "VersionPart",
1096
+ "name": "majorVersion",
1097
+ "type": "uint8"
1081
1098
  }
1082
1099
  ],
1083
1100
  "stateMutability": "pure",
@@ -1086,33 +1103,43 @@
1086
1103
  {
1087
1104
  "inputs": [
1088
1105
  {
1089
- "internalType": "RoleId",
1090
- "name": "role",
1091
- "type": "bytes8"
1106
+ "internalType": "Key32",
1107
+ "name": "key",
1108
+ "type": "bytes32"
1092
1109
  }
1093
1110
  ],
1094
- "name": "getRoleInfo",
1111
+ "name": "getMetadata",
1095
1112
  "outputs": [
1096
1113
  {
1097
1114
  "components": [
1098
1115
  {
1099
- "internalType": "RoleId",
1100
- "name": "id",
1101
- "type": "bytes8"
1116
+ "internalType": "ObjectType",
1117
+ "name": "objectType",
1118
+ "type": "uint8"
1102
1119
  },
1103
1120
  {
1104
- "internalType": "string",
1105
- "name": "name",
1106
- "type": "string"
1121
+ "internalType": "StateId",
1122
+ "name": "state",
1123
+ "type": "uint8"
1107
1124
  },
1108
1125
  {
1109
- "internalType": "bool",
1110
- "name": "isActive",
1111
- "type": "bool"
1126
+ "internalType": "address",
1127
+ "name": "updatedBy",
1128
+ "type": "address"
1129
+ },
1130
+ {
1131
+ "internalType": "Blocknumber",
1132
+ "name": "updatedIn",
1133
+ "type": "uint32"
1134
+ },
1135
+ {
1136
+ "internalType": "Blocknumber",
1137
+ "name": "createdIn",
1138
+ "type": "uint32"
1112
1139
  }
1113
1140
  ],
1114
- "internalType": "struct IAccess.RoleInfo",
1115
- "name": "info",
1141
+ "internalType": "struct IKeyValueStore.Metadata",
1142
+ "name": "metadata",
1116
1143
  "type": "tuple"
1117
1144
  }
1118
1145
  ],
@@ -1120,23 +1147,25 @@
1120
1147
  "type": "function"
1121
1148
  },
1122
1149
  {
1123
- "inputs": [
1124
- {
1125
- "internalType": "RoleId",
1126
- "name": "role",
1127
- "type": "bytes8"
1128
- },
1150
+ "inputs": [],
1151
+ "name": "getNftId",
1152
+ "outputs": [
1129
1153
  {
1130
- "internalType": "uint256",
1131
- "name": "idx",
1132
- "type": "uint256"
1154
+ "internalType": "NftId",
1155
+ "name": "",
1156
+ "type": "uint96"
1133
1157
  }
1134
1158
  ],
1135
- "name": "getRoleMember",
1159
+ "stateMutability": "view",
1160
+ "type": "function"
1161
+ },
1162
+ {
1163
+ "inputs": [],
1164
+ "name": "getOwner",
1136
1165
  "outputs": [
1137
1166
  {
1138
1167
  "internalType": "address",
1139
- "name": "roleMember",
1168
+ "name": "",
1140
1169
  "type": "address"
1141
1170
  }
1142
1171
  ],
@@ -1144,37 +1173,25 @@
1144
1173
  "type": "function"
1145
1174
  },
1146
1175
  {
1147
- "inputs": [
1148
- {
1149
- "internalType": "RoleId",
1150
- "name": "role",
1151
- "type": "bytes8"
1152
- }
1153
- ],
1154
- "name": "getRoleMemberCount",
1176
+ "inputs": [],
1177
+ "name": "getPolicyService",
1155
1178
  "outputs": [
1156
1179
  {
1157
- "internalType": "uint256",
1158
- "name": "roleMembers",
1159
- "type": "uint256"
1180
+ "internalType": "contract IPolicyService",
1181
+ "name": "",
1182
+ "type": "address"
1160
1183
  }
1161
1184
  ],
1162
1185
  "stateMutability": "view",
1163
1186
  "type": "function"
1164
1187
  },
1165
1188
  {
1166
- "inputs": [
1167
- {
1168
- "internalType": "NftId",
1169
- "name": "componentNftId",
1170
- "type": "uint96"
1171
- }
1172
- ],
1173
- "name": "getTokenHandler",
1189
+ "inputs": [],
1190
+ "name": "getPoolService",
1174
1191
  "outputs": [
1175
1192
  {
1176
- "internalType": "contract TokenHandler",
1177
- "name": "tokenHandler",
1193
+ "internalType": "contract IPoolService",
1194
+ "name": "",
1178
1195
  "type": "address"
1179
1196
  }
1180
1197
  ],
@@ -1183,87 +1200,76 @@
1183
1200
  },
1184
1201
  {
1185
1202
  "inputs": [],
1186
- "name": "getType",
1203
+ "name": "getProductService",
1187
1204
  "outputs": [
1188
1205
  {
1189
- "internalType": "ObjectType",
1190
- "name": "objectType",
1191
- "type": "uint8"
1206
+ "internalType": "contract IProductService",
1207
+ "name": "",
1208
+ "type": "address"
1192
1209
  }
1193
1210
  ],
1194
- "stateMutability": "pure",
1211
+ "stateMutability": "view",
1195
1212
  "type": "function"
1196
1213
  },
1197
1214
  {
1198
- "inputs": [
1199
- {
1200
- "internalType": "uint256",
1201
- "name": "a",
1202
- "type": "uint256"
1203
- },
1204
- {
1205
- "internalType": "int8",
1206
- "name": "exp",
1207
- "type": "int8"
1208
- }
1209
- ],
1210
- "name": "getUFixed",
1215
+ "inputs": [],
1216
+ "name": "getRegistry",
1211
1217
  "outputs": [
1212
1218
  {
1213
- "internalType": "UFixed",
1219
+ "internalType": "contract IRegistry",
1214
1220
  "name": "",
1215
- "type": "uint256"
1221
+ "type": "address"
1216
1222
  }
1217
1223
  ],
1218
- "stateMutability": "pure",
1224
+ "stateMutability": "view",
1219
1225
  "type": "function"
1220
1226
  },
1221
1227
  {
1222
- "inputs": [
1223
- {
1224
- "internalType": "uint256",
1225
- "name": "a",
1226
- "type": "uint256"
1227
- }
1228
- ],
1229
- "name": "getUFixed",
1228
+ "inputs": [],
1229
+ "name": "getRegistryAddress",
1230
1230
  "outputs": [
1231
1231
  {
1232
- "internalType": "UFixed",
1232
+ "internalType": "address",
1233
1233
  "name": "",
1234
- "type": "uint256"
1234
+ "type": "address"
1235
1235
  }
1236
1236
  ],
1237
- "stateMutability": "pure",
1237
+ "stateMutability": "view",
1238
1238
  "type": "function"
1239
1239
  },
1240
1240
  {
1241
- "inputs": [],
1242
- "name": "getVersion",
1241
+ "inputs": [
1242
+ {
1243
+ "internalType": "Key32",
1244
+ "name": "key",
1245
+ "type": "bytes32"
1246
+ }
1247
+ ],
1248
+ "name": "getState",
1243
1249
  "outputs": [
1244
1250
  {
1245
- "internalType": "Version",
1246
- "name": "",
1247
- "type": "uint24"
1251
+ "internalType": "StateId",
1252
+ "name": "state",
1253
+ "type": "uint8"
1248
1254
  }
1249
1255
  ],
1250
- "stateMutability": "pure",
1256
+ "stateMutability": "view",
1251
1257
  "type": "function"
1252
1258
  },
1253
1259
  {
1254
1260
  "inputs": [
1255
1261
  {
1256
- "internalType": "uint256",
1257
- "name": "index",
1258
- "type": "uint256"
1262
+ "internalType": "ObjectType",
1263
+ "name": "objectType",
1264
+ "type": "uint8"
1259
1265
  }
1260
1266
  ],
1261
- "name": "getVersion",
1267
+ "name": "hasLifecycle",
1262
1268
  "outputs": [
1263
1269
  {
1264
- "internalType": "Version",
1265
- "name": "version",
1266
- "type": "uint24"
1270
+ "internalType": "bool",
1271
+ "name": "",
1272
+ "type": "bool"
1267
1273
  }
1268
1274
  ],
1269
1275
  "stateMutability": "view",
@@ -1271,12 +1277,12 @@
1271
1277
  },
1272
1278
  {
1273
1279
  "inputs": [],
1274
- "name": "getVersionCount",
1280
+ "name": "isConsumingScheduledOp",
1275
1281
  "outputs": [
1276
1282
  {
1277
- "internalType": "uint256",
1278
- "name": "numberOfVersions",
1279
- "type": "uint256"
1283
+ "internalType": "bytes4",
1284
+ "name": "",
1285
+ "type": "bytes4"
1280
1286
  }
1281
1287
  ],
1282
1288
  "stateMutability": "view",
@@ -1285,44 +1291,27 @@
1285
1291
  {
1286
1292
  "inputs": [
1287
1293
  {
1288
- "internalType": "Version",
1289
- "name": "version",
1290
- "type": "uint24"
1294
+ "internalType": "ObjectType",
1295
+ "name": "objectType",
1296
+ "type": "uint8"
1297
+ },
1298
+ {
1299
+ "internalType": "StateId",
1300
+ "name": "fromId",
1301
+ "type": "uint8"
1302
+ },
1303
+ {
1304
+ "internalType": "StateId",
1305
+ "name": "toId",
1306
+ "type": "uint8"
1291
1307
  }
1292
1308
  ],
1293
- "name": "getVersionInfo",
1309
+ "name": "isValidTransition",
1294
1310
  "outputs": [
1295
1311
  {
1296
- "components": [
1297
- {
1298
- "internalType": "Version",
1299
- "name": "version",
1300
- "type": "uint24"
1301
- },
1302
- {
1303
- "internalType": "address",
1304
- "name": "implementation",
1305
- "type": "address"
1306
- },
1307
- {
1308
- "internalType": "address",
1309
- "name": "activatedBy",
1310
- "type": "address"
1311
- },
1312
- {
1313
- "internalType": "Timestamp",
1314
- "name": "activatedAt",
1315
- "type": "uint40"
1316
- },
1317
- {
1318
- "internalType": "Blocknumber",
1319
- "name": "activatedIn",
1320
- "type": "uint32"
1321
- }
1322
- ],
1323
- "internalType": "struct IVersionable.VersionInfo",
1324
- "name": "versionInfo",
1325
- "type": "tuple"
1312
+ "internalType": "bool",
1313
+ "name": "",
1314
+ "type": "bool"
1326
1315
  }
1327
1316
  ],
1328
1317
  "stateMutability": "view",
@@ -1330,80 +1319,87 @@
1330
1319
  },
1331
1320
  {
1332
1321
  "inputs": [],
1333
- "name": "getZeroFee",
1334
- "outputs": [
1322
+ "name": "linkToRegisteredNftId",
1323
+ "outputs": [],
1324
+ "stateMutability": "nonpayable",
1325
+ "type": "function"
1326
+ },
1327
+ {
1328
+ "inputs": [
1335
1329
  {
1336
- "components": [
1337
- {
1338
- "internalType": "UFixed",
1339
- "name": "fractionalFee",
1340
- "type": "uint256"
1341
- },
1342
- {
1343
- "internalType": "uint256",
1344
- "name": "fixedFee",
1345
- "type": "uint256"
1346
- }
1347
- ],
1348
- "internalType": "struct Fee",
1349
- "name": "fee",
1350
- "type": "tuple"
1330
+ "internalType": "address",
1331
+ "name": "to",
1332
+ "type": "address"
1333
+ },
1334
+ {
1335
+ "internalType": "uint256",
1336
+ "name": "tokenId",
1337
+ "type": "uint256"
1351
1338
  }
1352
1339
  ],
1353
- "stateMutability": "pure",
1340
+ "name": "nftMint",
1341
+ "outputs": [],
1342
+ "stateMutability": "nonpayable",
1354
1343
  "type": "function"
1355
1344
  },
1356
1345
  {
1357
1346
  "inputs": [
1358
1347
  {
1359
- "internalType": "RoleId",
1360
- "name": "role",
1361
- "type": "bytes8"
1348
+ "internalType": "address",
1349
+ "name": "from",
1350
+ "type": "address"
1362
1351
  },
1363
1352
  {
1364
1353
  "internalType": "address",
1365
- "name": "member",
1354
+ "name": "to",
1366
1355
  "type": "address"
1356
+ },
1357
+ {
1358
+ "internalType": "uint256",
1359
+ "name": "tokenId",
1360
+ "type": "uint256"
1367
1361
  }
1368
1362
  ],
1369
- "name": "grantRole",
1363
+ "name": "nftTransferFrom",
1370
1364
  "outputs": [],
1371
1365
  "stateMutability": "nonpayable",
1372
1366
  "type": "function"
1373
1367
  },
1374
1368
  {
1375
1369
  "inputs": [
1376
- {
1377
- "internalType": "RoleId",
1378
- "name": "role",
1379
- "type": "bytes8"
1380
- },
1381
1370
  {
1382
1371
  "internalType": "address",
1383
- "name": "member",
1372
+ "name": "",
1384
1373
  "type": "address"
1385
1374
  }
1386
1375
  ],
1387
- "name": "hasRole",
1388
- "outputs": [
1376
+ "name": "setAuthority",
1377
+ "outputs": [],
1378
+ "stateMutability": "nonpayable",
1379
+ "type": "function"
1380
+ },
1381
+ {
1382
+ "inputs": [
1389
1383
  {
1390
- "internalType": "bool",
1391
- "name": "hasRole",
1392
- "type": "bool"
1384
+ "internalType": "contract InstanceAccessManager",
1385
+ "name": "accessManager",
1386
+ "type": "address"
1393
1387
  }
1394
1388
  ],
1395
- "stateMutability": "view",
1389
+ "name": "setInstanceAccessManager",
1390
+ "outputs": [],
1391
+ "stateMutability": "nonpayable",
1396
1392
  "type": "function"
1397
1393
  },
1398
1394
  {
1399
1395
  "inputs": [
1400
1396
  {
1401
- "internalType": "Version",
1402
- "name": "version",
1403
- "type": "uint24"
1397
+ "internalType": "bytes4",
1398
+ "name": "interfaceId",
1399
+ "type": "bytes4"
1404
1400
  }
1405
1401
  ],
1406
- "name": "isActivated",
1402
+ "name": "supportsInterface",
1407
1403
  "outputs": [
1408
1404
  {
1409
1405
  "internalType": "bool",
@@ -1422,37 +1418,124 @@
1422
1418
  "type": "uint8"
1423
1419
  },
1424
1420
  {
1425
- "internalType": "StateId",
1426
- "name": "fromId",
1427
- "type": "uint8"
1428
- },
1429
- {
1430
- "internalType": "StateId",
1431
- "name": "toId",
1432
- "type": "uint8"
1421
+ "internalType": "KeyId",
1422
+ "name": "id",
1423
+ "type": "bytes31"
1433
1424
  }
1434
1425
  ],
1435
- "name": "isValidTransition",
1426
+ "name": "toKey32",
1436
1427
  "outputs": [
1437
1428
  {
1438
- "internalType": "bool",
1429
+ "internalType": "Key32",
1439
1430
  "name": "",
1440
- "type": "bool"
1431
+ "type": "bytes32"
1441
1432
  }
1442
1433
  ],
1443
- "stateMutability": "view",
1434
+ "stateMutability": "pure",
1444
1435
  "type": "function"
1445
1436
  },
1446
1437
  {
1447
- "inputs": [],
1448
- "name": "register",
1449
- "outputs": [
1438
+ "inputs": [
1450
1439
  {
1451
1440
  "internalType": "NftId",
1452
- "name": "nftId",
1441
+ "name": "applicationNftId",
1453
1442
  "type": "uint96"
1443
+ },
1444
+ {
1445
+ "components": [
1446
+ {
1447
+ "internalType": "NftId",
1448
+ "name": "productNftId",
1449
+ "type": "uint96"
1450
+ },
1451
+ {
1452
+ "internalType": "NftId",
1453
+ "name": "bundleNftId",
1454
+ "type": "uint96"
1455
+ },
1456
+ {
1457
+ "internalType": "ReferralId",
1458
+ "name": "referralId",
1459
+ "type": "bytes8"
1460
+ },
1461
+ {
1462
+ "internalType": "RiskId",
1463
+ "name": "riskId",
1464
+ "type": "bytes8"
1465
+ },
1466
+ {
1467
+ "internalType": "uint256",
1468
+ "name": "sumInsuredAmount",
1469
+ "type": "uint256"
1470
+ },
1471
+ {
1472
+ "internalType": "uint256",
1473
+ "name": "premiumAmount",
1474
+ "type": "uint256"
1475
+ },
1476
+ {
1477
+ "internalType": "uint256",
1478
+ "name": "premiumPaidAmount",
1479
+ "type": "uint256"
1480
+ },
1481
+ {
1482
+ "internalType": "Seconds",
1483
+ "name": "lifetime",
1484
+ "type": "uint40"
1485
+ },
1486
+ {
1487
+ "internalType": "bytes",
1488
+ "name": "applicationData",
1489
+ "type": "bytes"
1490
+ },
1491
+ {
1492
+ "internalType": "bytes",
1493
+ "name": "policyData",
1494
+ "type": "bytes"
1495
+ },
1496
+ {
1497
+ "internalType": "uint16",
1498
+ "name": "claimsCount",
1499
+ "type": "uint16"
1500
+ },
1501
+ {
1502
+ "internalType": "uint16",
1503
+ "name": "openClaimsCount",
1504
+ "type": "uint16"
1505
+ },
1506
+ {
1507
+ "internalType": "uint256",
1508
+ "name": "payoutAmount",
1509
+ "type": "uint256"
1510
+ },
1511
+ {
1512
+ "internalType": "Timestamp",
1513
+ "name": "activatedAt",
1514
+ "type": "uint40"
1515
+ },
1516
+ {
1517
+ "internalType": "Timestamp",
1518
+ "name": "expiredAt",
1519
+ "type": "uint40"
1520
+ },
1521
+ {
1522
+ "internalType": "Timestamp",
1523
+ "name": "closedAt",
1524
+ "type": "uint40"
1525
+ }
1526
+ ],
1527
+ "internalType": "struct IPolicy.PolicyInfo",
1528
+ "name": "policy",
1529
+ "type": "tuple"
1530
+ },
1531
+ {
1532
+ "internalType": "StateId",
1533
+ "name": "newState",
1534
+ "type": "uint8"
1454
1535
  }
1455
1536
  ],
1537
+ "name": "updateApplication",
1538
+ "outputs": [],
1456
1539
  "stateMutability": "nonpayable",
1457
1540
  "type": "function"
1458
1541
  },
@@ -1460,21 +1543,16 @@
1460
1543
  "inputs": [
1461
1544
  {
1462
1545
  "internalType": "NftId",
1463
- "name": "nftId",
1546
+ "name": "applicationNftId",
1464
1547
  "type": "uint96"
1465
1548
  },
1466
1549
  {
1467
- "internalType": "ObjectType",
1468
- "name": "objectType",
1550
+ "internalType": "StateId",
1551
+ "name": "newState",
1469
1552
  "type": "uint8"
1470
- },
1471
- {
1472
- "internalType": "contract IERC20Metadata",
1473
- "name": "token",
1474
- "type": "address"
1475
1553
  }
1476
1554
  ],
1477
- "name": "registerComponent",
1555
+ "name": "updateApplicationState",
1478
1556
  "outputs": [],
1479
1557
  "stateMutability": "nonpayable",
1480
1558
  "type": "function"
@@ -1483,50 +1561,80 @@
1483
1561
  "inputs": [
1484
1562
  {
1485
1563
  "internalType": "NftId",
1486
- "name": "poolNftId",
1564
+ "name": "bundleNftId",
1487
1565
  "type": "uint96"
1488
1566
  },
1489
- {
1490
- "internalType": "address",
1491
- "name": "wallet",
1492
- "type": "address"
1493
- },
1494
1567
  {
1495
1568
  "components": [
1496
1569
  {
1497
- "internalType": "UFixed",
1498
- "name": "fractionalFee",
1499
- "type": "uint256"
1570
+ "internalType": "NftId",
1571
+ "name": "poolNftId",
1572
+ "type": "uint96"
1573
+ },
1574
+ {
1575
+ "components": [
1576
+ {
1577
+ "internalType": "UFixed",
1578
+ "name": "fractionalFee",
1579
+ "type": "uint256"
1580
+ },
1581
+ {
1582
+ "internalType": "uint256",
1583
+ "name": "fixedFee",
1584
+ "type": "uint256"
1585
+ }
1586
+ ],
1587
+ "internalType": "struct Fee",
1588
+ "name": "fee",
1589
+ "type": "tuple"
1590
+ },
1591
+ {
1592
+ "internalType": "bytes",
1593
+ "name": "filter",
1594
+ "type": "bytes"
1500
1595
  },
1501
1596
  {
1502
1597
  "internalType": "uint256",
1503
- "name": "fixedFee",
1598
+ "name": "capitalAmount",
1504
1599
  "type": "uint256"
1505
- }
1506
- ],
1507
- "internalType": "struct Fee",
1508
- "name": "stakingFee",
1509
- "type": "tuple"
1510
- },
1511
- {
1512
- "components": [
1600
+ },
1513
1601
  {
1514
- "internalType": "UFixed",
1515
- "name": "fractionalFee",
1602
+ "internalType": "uint256",
1603
+ "name": "lockedAmount",
1516
1604
  "type": "uint256"
1517
1605
  },
1518
1606
  {
1519
1607
  "internalType": "uint256",
1520
- "name": "fixedFee",
1608
+ "name": "balanceAmount",
1521
1609
  "type": "uint256"
1610
+ },
1611
+ {
1612
+ "internalType": "Seconds",
1613
+ "name": "lifetime",
1614
+ "type": "uint40"
1615
+ },
1616
+ {
1617
+ "internalType": "Timestamp",
1618
+ "name": "expiredAt",
1619
+ "type": "uint40"
1620
+ },
1621
+ {
1622
+ "internalType": "Timestamp",
1623
+ "name": "closedAt",
1624
+ "type": "uint40"
1522
1625
  }
1523
1626
  ],
1524
- "internalType": "struct Fee",
1525
- "name": "performanceFee",
1627
+ "internalType": "struct IBundle.BundleInfo",
1628
+ "name": "bundle",
1526
1629
  "type": "tuple"
1630
+ },
1631
+ {
1632
+ "internalType": "StateId",
1633
+ "name": "newState",
1634
+ "type": "uint8"
1527
1635
  }
1528
1636
  ],
1529
- "name": "registerPool",
1637
+ "name": "updateBundle",
1530
1638
  "outputs": [],
1531
1639
  "stateMutability": "nonpayable",
1532
1640
  "type": "function"
@@ -1535,21 +1643,16 @@
1535
1643
  "inputs": [
1536
1644
  {
1537
1645
  "internalType": "NftId",
1538
- "name": "poolNftId",
1646
+ "name": "bundleNftId",
1539
1647
  "type": "uint96"
1540
1648
  },
1541
1649
  {
1542
- "internalType": "bool",
1543
- "name": "isVerifying",
1544
- "type": "bool"
1545
- },
1546
- {
1547
- "internalType": "UFixed",
1548
- "name": "collateralizationLevel",
1549
- "type": "uint256"
1650
+ "internalType": "StateId",
1651
+ "name": "newState",
1652
+ "type": "uint8"
1550
1653
  }
1551
1654
  ],
1552
- "name": "registerPool",
1655
+ "name": "updateBundleState",
1553
1656
  "outputs": [],
1554
1657
  "stateMutability": "nonpayable",
1555
1658
  "type": "function"
@@ -1558,65 +1661,77 @@
1558
1661
  "inputs": [
1559
1662
  {
1560
1663
  "internalType": "NftId",
1561
- "name": "productNftId",
1562
- "type": "uint96"
1563
- },
1564
- {
1565
- "internalType": "NftId",
1566
- "name": "distributorNftId",
1567
- "type": "uint96"
1568
- },
1569
- {
1570
- "internalType": "NftId",
1571
- "name": "poolNftId",
1664
+ "name": "distributionNftId",
1572
1665
  "type": "uint96"
1573
1666
  },
1574
- {
1575
- "internalType": "contract IERC20Metadata",
1576
- "name": "token",
1577
- "type": "address"
1578
- },
1579
- {
1580
- "internalType": "address",
1581
- "name": "wallet",
1582
- "type": "address"
1583
- },
1584
1667
  {
1585
1668
  "components": [
1586
1669
  {
1587
- "internalType": "UFixed",
1588
- "name": "fractionalFee",
1589
- "type": "uint256"
1670
+ "internalType": "NftId",
1671
+ "name": "productNftId",
1672
+ "type": "uint96"
1590
1673
  },
1591
1674
  {
1592
- "internalType": "uint256",
1593
- "name": "fixedFee",
1594
- "type": "uint256"
1595
- }
1596
- ],
1597
- "internalType": "struct Fee",
1598
- "name": "policyFee",
1599
- "type": "tuple"
1600
- },
1601
- {
1602
- "components": [
1675
+ "internalType": "contract TokenHandler",
1676
+ "name": "tokenHandler",
1677
+ "type": "address"
1678
+ },
1603
1679
  {
1604
- "internalType": "UFixed",
1605
- "name": "fractionalFee",
1606
- "type": "uint256"
1680
+ "components": [
1681
+ {
1682
+ "internalType": "UFixed",
1683
+ "name": "fractionalFee",
1684
+ "type": "uint256"
1685
+ },
1686
+ {
1687
+ "internalType": "uint256",
1688
+ "name": "fixedFee",
1689
+ "type": "uint256"
1690
+ }
1691
+ ],
1692
+ "internalType": "struct Fee",
1693
+ "name": "minDistributionOwnerFee",
1694
+ "type": "tuple"
1695
+ },
1696
+ {
1697
+ "components": [
1698
+ {
1699
+ "internalType": "UFixed",
1700
+ "name": "fractionalFee",
1701
+ "type": "uint256"
1702
+ },
1703
+ {
1704
+ "internalType": "uint256",
1705
+ "name": "fixedFee",
1706
+ "type": "uint256"
1707
+ }
1708
+ ],
1709
+ "internalType": "struct Fee",
1710
+ "name": "distributionFee",
1711
+ "type": "tuple"
1712
+ },
1713
+ {
1714
+ "internalType": "address",
1715
+ "name": "wallet",
1716
+ "type": "address"
1607
1717
  },
1608
1718
  {
1609
1719
  "internalType": "uint256",
1610
- "name": "fixedFee",
1720
+ "name": "sumDistributionOwnerFees",
1611
1721
  "type": "uint256"
1612
1722
  }
1613
1723
  ],
1614
- "internalType": "struct Fee",
1615
- "name": "processingFee",
1724
+ "internalType": "struct ISetup.DistributionSetupInfo",
1725
+ "name": "setup",
1616
1726
  "type": "tuple"
1727
+ },
1728
+ {
1729
+ "internalType": "StateId",
1730
+ "name": "newState",
1731
+ "type": "uint8"
1617
1732
  }
1618
1733
  ],
1619
- "name": "registerProduct",
1734
+ "name": "updateDistributionSetup",
1620
1735
  "outputs": [],
1621
1736
  "stateMutability": "nonpayable",
1622
1737
  "type": "function"
@@ -1625,40 +1740,66 @@
1625
1740
  "inputs": [
1626
1741
  {
1627
1742
  "internalType": "NftId",
1628
- "name": "bundleNftId",
1743
+ "name": "distributionNftId",
1629
1744
  "type": "uint96"
1630
1745
  },
1631
1746
  {
1632
- "internalType": "NftId",
1633
- "name": "policyNftId",
1634
- "type": "uint96"
1635
- }
1636
- ],
1637
- "name": "releasePolicy",
1638
- "outputs": [
1639
- {
1640
- "internalType": "uint256",
1641
- "name": "collateralAmount",
1642
- "type": "uint256"
1747
+ "internalType": "StateId",
1748
+ "name": "newState",
1749
+ "type": "uint8"
1643
1750
  }
1644
1751
  ],
1752
+ "name": "updateDistributionSetupState",
1753
+ "outputs": [],
1645
1754
  "stateMutability": "nonpayable",
1646
1755
  "type": "function"
1647
1756
  },
1648
1757
  {
1649
1758
  "inputs": [
1650
1759
  {
1651
- "internalType": "RoleId",
1652
- "name": "role",
1653
- "type": "bytes8"
1760
+ "internalType": "NftId",
1761
+ "name": "nftId",
1762
+ "type": "uint96"
1654
1763
  },
1655
1764
  {
1656
- "internalType": "address",
1657
- "name": "member",
1658
- "type": "address"
1765
+ "components": [
1766
+ {
1767
+ "internalType": "DistributorType",
1768
+ "name": "distributorType",
1769
+ "type": "bytes8"
1770
+ },
1771
+ {
1772
+ "internalType": "bool",
1773
+ "name": "active",
1774
+ "type": "bool"
1775
+ },
1776
+ {
1777
+ "internalType": "bytes",
1778
+ "name": "data",
1779
+ "type": "bytes"
1780
+ },
1781
+ {
1782
+ "internalType": "uint256",
1783
+ "name": "sumCommisions",
1784
+ "type": "uint256"
1785
+ },
1786
+ {
1787
+ "internalType": "uint256",
1788
+ "name": "numPoliciesSold",
1789
+ "type": "uint256"
1790
+ }
1791
+ ],
1792
+ "internalType": "struct IDistribution.DistributorInfo",
1793
+ "name": "info",
1794
+ "type": "tuple"
1795
+ },
1796
+ {
1797
+ "internalType": "StateId",
1798
+ "name": "newState",
1799
+ "type": "uint8"
1659
1800
  }
1660
1801
  ],
1661
- "name": "revokeRole",
1802
+ "name": "updateDistributor",
1662
1803
  "outputs": [],
1663
1804
  "stateMutability": "nonpayable",
1664
1805
  "type": "function"
@@ -1666,88 +1807,87 @@
1666
1807
  {
1667
1808
  "inputs": [
1668
1809
  {
1669
- "internalType": "RoleId",
1670
- "name": "role",
1671
- "type": "bytes8"
1672
- }
1673
- ],
1674
- "name": "roleExists",
1675
- "outputs": [
1810
+ "internalType": "NftId",
1811
+ "name": "nftId",
1812
+ "type": "uint96"
1813
+ },
1676
1814
  {
1677
- "internalType": "bool",
1678
- "name": "",
1679
- "type": "bool"
1815
+ "internalType": "StateId",
1816
+ "name": "newState",
1817
+ "type": "uint8"
1680
1818
  }
1681
1819
  ],
1682
- "stateMutability": "view",
1820
+ "name": "updateDistributorState",
1821
+ "outputs": [],
1822
+ "stateMutability": "nonpayable",
1683
1823
  "type": "function"
1684
1824
  },
1685
1825
  {
1686
1826
  "inputs": [
1827
+ {
1828
+ "internalType": "Key32",
1829
+ "name": "distributorKey",
1830
+ "type": "bytes32"
1831
+ },
1687
1832
  {
1688
1833
  "components": [
1689
1834
  {
1690
- "internalType": "NftId",
1691
- "name": "nftId",
1692
- "type": "uint96"
1693
- },
1694
- {
1695
- "internalType": "NftId",
1696
- "name": "poolNftId",
1697
- "type": "uint96"
1698
- },
1699
- {
1700
- "internalType": "StateId",
1701
- "name": "state",
1702
- "type": "uint8"
1835
+ "internalType": "string",
1836
+ "name": "name",
1837
+ "type": "string"
1703
1838
  },
1704
1839
  {
1705
- "internalType": "bytes",
1706
- "name": "filter",
1707
- "type": "bytes"
1840
+ "internalType": "UFixed",
1841
+ "name": "minDiscountPercentage",
1842
+ "type": "uint256"
1708
1843
  },
1709
1844
  {
1710
- "internalType": "uint256",
1711
- "name": "capitalAmount",
1845
+ "internalType": "UFixed",
1846
+ "name": "maxDiscountPercentage",
1712
1847
  "type": "uint256"
1713
1848
  },
1714
1849
  {
1715
- "internalType": "uint256",
1716
- "name": "lockedAmount",
1850
+ "internalType": "UFixed",
1851
+ "name": "commissionPercentage",
1717
1852
  "type": "uint256"
1718
1853
  },
1719
1854
  {
1720
- "internalType": "uint256",
1721
- "name": "balanceAmount",
1722
- "type": "uint256"
1855
+ "internalType": "uint32",
1856
+ "name": "maxReferralCount",
1857
+ "type": "uint32"
1723
1858
  },
1724
1859
  {
1725
- "internalType": "Timestamp",
1726
- "name": "createdAt",
1727
- "type": "uint40"
1860
+ "internalType": "uint32",
1861
+ "name": "maxReferralLifetime",
1862
+ "type": "uint32"
1728
1863
  },
1729
1864
  {
1730
- "internalType": "Timestamp",
1731
- "name": "expiredAt",
1732
- "type": "uint40"
1865
+ "internalType": "bool",
1866
+ "name": "allowSelfReferrals",
1867
+ "type": "bool"
1733
1868
  },
1734
1869
  {
1735
- "internalType": "Timestamp",
1736
- "name": "closedAt",
1737
- "type": "uint40"
1870
+ "internalType": "bool",
1871
+ "name": "allowRenewals",
1872
+ "type": "bool"
1738
1873
  },
1739
1874
  {
1740
- "internalType": "Blocknumber",
1741
- "name": "updatedIn",
1742
- "type": "uint32"
1875
+ "internalType": "bytes",
1876
+ "name": "data",
1877
+ "type": "bytes"
1743
1878
  }
1744
1879
  ],
1745
- "internalType": "struct IBundle.BundleInfo",
1746
- "name": "bundleInfo",
1880
+ "internalType": "struct IDistribution.DistributorTypeInfo",
1881
+ "name": "info",
1747
1882
  "type": "tuple"
1883
+ },
1884
+ {
1885
+ "internalType": "StateId",
1886
+ "name": "newState",
1887
+ "type": "uint8"
1748
1888
  }
1749
1889
  ],
1750
- "name": "setBundleInfo",
1890
+ "name": "updateDistributorType",
1751
1891
  "outputs": [],
1752
1892
  "stateMutability": "nonpayable",
1753
1893
  "type": "function"
@@ -1755,48 +1895,30 @@
1755
1895
  {
1756
1896
  "inputs": [
1757
1897
  {
1758
- "components": [
1759
- {
1760
- "internalType": "NftId",
1761
- "name": "nftId",
1762
- "type": "uint96"
1763
- },
1764
- {
1765
- "internalType": "StateId",
1766
- "name": "state",
1767
- "type": "uint8"
1768
- },
1769
- {
1770
- "internalType": "contract IERC20Metadata",
1771
- "name": "token",
1772
- "type": "address"
1773
- }
1774
- ],
1775
- "internalType": "struct IComponent.ComponentInfo",
1776
- "name": "info",
1777
- "type": "tuple"
1778
- }
1779
- ],
1780
- "name": "setComponentInfo",
1781
- "outputs": [
1898
+ "internalType": "Key32",
1899
+ "name": "distributorKey",
1900
+ "type": "bytes32"
1901
+ },
1782
1902
  {
1783
- "internalType": "NftId",
1784
- "name": "componentNftId",
1785
- "type": "uint96"
1903
+ "internalType": "StateId",
1904
+ "name": "newState",
1905
+ "type": "uint8"
1786
1906
  }
1787
1907
  ],
1908
+ "name": "updateDistributorTypeState",
1909
+ "outputs": [],
1788
1910
  "stateMutability": "nonpayable",
1789
1911
  "type": "function"
1790
1912
  },
1791
1913
  {
1792
1914
  "inputs": [
1915
+ {
1916
+ "internalType": "NftId",
1917
+ "name": "policyNftId",
1918
+ "type": "uint96"
1919
+ },
1793
1920
  {
1794
1921
  "components": [
1795
- {
1796
- "internalType": "NftId",
1797
- "name": "nftId",
1798
- "type": "uint96"
1799
- },
1800
1922
  {
1801
1923
  "internalType": "NftId",
1802
1924
  "name": "productNftId",
@@ -1808,14 +1930,14 @@
1808
1930
  "type": "uint96"
1809
1931
  },
1810
1932
  {
1811
- "internalType": "address",
1812
- "name": "beneficiary",
1813
- "type": "address"
1933
+ "internalType": "ReferralId",
1934
+ "name": "referralId",
1935
+ "type": "bytes8"
1814
1936
  },
1815
1937
  {
1816
- "internalType": "StateId",
1817
- "name": "state",
1818
- "type": "uint8"
1938
+ "internalType": "RiskId",
1939
+ "name": "riskId",
1940
+ "type": "bytes8"
1819
1941
  },
1820
1942
  {
1821
1943
  "internalType": "uint256",
@@ -1833,19 +1955,34 @@
1833
1955
  "type": "uint256"
1834
1956
  },
1835
1957
  {
1836
- "internalType": "uint256",
1958
+ "internalType": "Seconds",
1837
1959
  "name": "lifetime",
1838
- "type": "uint256"
1960
+ "type": "uint40"
1839
1961
  },
1840
1962
  {
1841
1963
  "internalType": "bytes",
1842
- "name": "data",
1964
+ "name": "applicationData",
1843
1965
  "type": "bytes"
1844
1966
  },
1845
1967
  {
1846
- "internalType": "Timestamp",
1847
- "name": "createdAt",
1848
- "type": "uint40"
1968
+ "internalType": "bytes",
1969
+ "name": "policyData",
1970
+ "type": "bytes"
1971
+ },
1972
+ {
1973
+ "internalType": "uint16",
1974
+ "name": "claimsCount",
1975
+ "type": "uint16"
1976
+ },
1977
+ {
1978
+ "internalType": "uint16",
1979
+ "name": "openClaimsCount",
1980
+ "type": "uint16"
1981
+ },
1982
+ {
1983
+ "internalType": "uint256",
1984
+ "name": "payoutAmount",
1985
+ "type": "uint256"
1849
1986
  },
1850
1987
  {
1851
1988
  "internalType": "Timestamp",
@@ -1861,19 +1998,37 @@
1861
1998
  "internalType": "Timestamp",
1862
1999
  "name": "closedAt",
1863
2000
  "type": "uint40"
1864
- },
1865
- {
1866
- "internalType": "Blocknumber",
1867
- "name": "updatedIn",
1868
- "type": "uint32"
1869
2001
  }
1870
2002
  ],
1871
2003
  "internalType": "struct IPolicy.PolicyInfo",
1872
- "name": "policyInfo",
2004
+ "name": "policy",
1873
2005
  "type": "tuple"
2006
+ },
2007
+ {
2008
+ "internalType": "StateId",
2009
+ "name": "newState",
2010
+ "type": "uint8"
2011
+ }
2012
+ ],
2013
+ "name": "updatePolicy",
2014
+ "outputs": [],
2015
+ "stateMutability": "nonpayable",
2016
+ "type": "function"
2017
+ },
2018
+ {
2019
+ "inputs": [
2020
+ {
2021
+ "internalType": "NftId",
2022
+ "name": "policyNftId",
2023
+ "type": "uint96"
2024
+ },
2025
+ {
2026
+ "internalType": "StateId",
2027
+ "name": "newState",
2028
+ "type": "uint8"
1874
2029
  }
1875
2030
  ],
1876
- "name": "setPolicyInfo",
2031
+ "name": "updatePolicyState",
1877
2032
  "outputs": [],
1878
2033
  "stateMutability": "nonpayable",
1879
2034
  "type": "function"
@@ -1888,39 +2043,60 @@
1888
2043
  {
1889
2044
  "components": [
1890
2045
  {
1891
- "internalType": "UFixed",
1892
- "name": "fractionalFee",
1893
- "type": "uint256"
2046
+ "internalType": "string",
2047
+ "name": "name",
2048
+ "type": "string"
1894
2049
  },
1895
2050
  {
1896
- "internalType": "uint256",
1897
- "name": "fixedFee",
1898
- "type": "uint256"
1899
- }
1900
- ],
1901
- "internalType": "struct Fee",
1902
- "name": "stakingFee",
1903
- "type": "tuple"
1904
- },
1905
- {
1906
- "components": [
2051
+ "internalType": "contract IERC20Metadata",
2052
+ "name": "token",
2053
+ "type": "address"
2054
+ },
1907
2055
  {
1908
- "internalType": "UFixed",
1909
- "name": "fractionalFee",
1910
- "type": "uint256"
2056
+ "internalType": "contract TokenHandler",
2057
+ "name": "tokenHandler",
2058
+ "type": "address"
1911
2059
  },
1912
2060
  {
1913
- "internalType": "uint256",
1914
- "name": "fixedFee",
1915
- "type": "uint256"
2061
+ "internalType": "address",
2062
+ "name": "wallet",
2063
+ "type": "address"
2064
+ },
2065
+ {
2066
+ "internalType": "bytes",
2067
+ "name": "data",
2068
+ "type": "bytes"
1916
2069
  }
1917
2070
  ],
1918
- "internalType": "struct Fee",
1919
- "name": "performanceFee",
2071
+ "internalType": "struct IComponents.ComponentInfo",
2072
+ "name": "info",
1920
2073
  "type": "tuple"
2074
+ },
2075
+ {
2076
+ "internalType": "StateId",
2077
+ "name": "newState",
2078
+ "type": "uint8"
2079
+ }
2080
+ ],
2081
+ "name": "updatePoolSetup",
2082
+ "outputs": [],
2083
+ "stateMutability": "nonpayable",
2084
+ "type": "function"
2085
+ },
2086
+ {
2087
+ "inputs": [
2088
+ {
2089
+ "internalType": "NftId",
2090
+ "name": "poolNftId",
2091
+ "type": "uint96"
2092
+ },
2093
+ {
2094
+ "internalType": "StateId",
2095
+ "name": "newState",
2096
+ "type": "uint8"
1921
2097
  }
1922
2098
  ],
1923
- "name": "setPoolFees",
2099
+ "name": "updatePoolSetupState",
1924
2100
  "outputs": [],
1925
2101
  "stateMutability": "nonpayable",
1926
2102
  "type": "function"
@@ -1935,39 +2111,159 @@
1935
2111
  {
1936
2112
  "components": [
1937
2113
  {
1938
- "internalType": "UFixed",
1939
- "name": "fractionalFee",
1940
- "type": "uint256"
2114
+ "internalType": "contract IERC20Metadata",
2115
+ "name": "token",
2116
+ "type": "address"
1941
2117
  },
1942
2118
  {
1943
- "internalType": "uint256",
1944
- "name": "fixedFee",
1945
- "type": "uint256"
2119
+ "internalType": "contract TokenHandler",
2120
+ "name": "tokenHandler",
2121
+ "type": "address"
2122
+ },
2123
+ {
2124
+ "internalType": "NftId",
2125
+ "name": "distributionNftId",
2126
+ "type": "uint96"
2127
+ },
2128
+ {
2129
+ "internalType": "NftId",
2130
+ "name": "poolNftId",
2131
+ "type": "uint96"
2132
+ },
2133
+ {
2134
+ "components": [
2135
+ {
2136
+ "internalType": "UFixed",
2137
+ "name": "fractionalFee",
2138
+ "type": "uint256"
2139
+ },
2140
+ {
2141
+ "internalType": "uint256",
2142
+ "name": "fixedFee",
2143
+ "type": "uint256"
2144
+ }
2145
+ ],
2146
+ "internalType": "struct Fee",
2147
+ "name": "productFee",
2148
+ "type": "tuple"
2149
+ },
2150
+ {
2151
+ "components": [
2152
+ {
2153
+ "internalType": "UFixed",
2154
+ "name": "fractionalFee",
2155
+ "type": "uint256"
2156
+ },
2157
+ {
2158
+ "internalType": "uint256",
2159
+ "name": "fixedFee",
2160
+ "type": "uint256"
2161
+ }
2162
+ ],
2163
+ "internalType": "struct Fee",
2164
+ "name": "processingFee",
2165
+ "type": "tuple"
2166
+ },
2167
+ {
2168
+ "internalType": "bool",
2169
+ "name": "isIntercepting",
2170
+ "type": "bool"
2171
+ },
2172
+ {
2173
+ "internalType": "address",
2174
+ "name": "wallet",
2175
+ "type": "address"
1946
2176
  }
1947
2177
  ],
1948
- "internalType": "struct Fee",
1949
- "name": "policyFee",
2178
+ "internalType": "struct ISetup.ProductSetupInfo",
2179
+ "name": "setup",
1950
2180
  "type": "tuple"
1951
2181
  },
2182
+ {
2183
+ "internalType": "StateId",
2184
+ "name": "newState",
2185
+ "type": "uint8"
2186
+ }
2187
+ ],
2188
+ "name": "updateProductSetup",
2189
+ "outputs": [],
2190
+ "stateMutability": "nonpayable",
2191
+ "type": "function"
2192
+ },
2193
+ {
2194
+ "inputs": [
2195
+ {
2196
+ "internalType": "NftId",
2197
+ "name": "productNftId",
2198
+ "type": "uint96"
2199
+ },
2200
+ {
2201
+ "internalType": "StateId",
2202
+ "name": "newState",
2203
+ "type": "uint8"
2204
+ }
2205
+ ],
2206
+ "name": "updateProductSetupState",
2207
+ "outputs": [],
2208
+ "stateMutability": "nonpayable",
2209
+ "type": "function"
2210
+ },
2211
+ {
2212
+ "inputs": [
2213
+ {
2214
+ "internalType": "Key32",
2215
+ "name": "referralKey",
2216
+ "type": "bytes32"
2217
+ },
1952
2218
  {
1953
2219
  "components": [
2220
+ {
2221
+ "internalType": "NftId",
2222
+ "name": "distributorNftId",
2223
+ "type": "uint96"
2224
+ },
2225
+ {
2226
+ "internalType": "string",
2227
+ "name": "referralCode",
2228
+ "type": "string"
2229
+ },
1954
2230
  {
1955
2231
  "internalType": "UFixed",
1956
- "name": "fractionalFee",
2232
+ "name": "discountPercentage",
1957
2233
  "type": "uint256"
1958
2234
  },
1959
2235
  {
1960
- "internalType": "uint256",
1961
- "name": "fixedFee",
1962
- "type": "uint256"
2236
+ "internalType": "uint32",
2237
+ "name": "maxReferrals",
2238
+ "type": "uint32"
2239
+ },
2240
+ {
2241
+ "internalType": "uint32",
2242
+ "name": "usedReferrals",
2243
+ "type": "uint32"
2244
+ },
2245
+ {
2246
+ "internalType": "Timestamp",
2247
+ "name": "expiryAt",
2248
+ "type": "uint40"
2249
+ },
2250
+ {
2251
+ "internalType": "bytes",
2252
+ "name": "data",
2253
+ "type": "bytes"
1963
2254
  }
1964
2255
  ],
1965
- "internalType": "struct Fee",
1966
- "name": "processingFee",
2256
+ "internalType": "struct IDistribution.ReferralInfo",
2257
+ "name": "referralInfo",
1967
2258
  "type": "tuple"
2259
+ },
2260
+ {
2261
+ "internalType": "StateId",
2262
+ "name": "newState",
2263
+ "type": "uint8"
1968
2264
  }
1969
2265
  ],
1970
- "name": "setProductFees",
2266
+ "name": "updateReferral",
1971
2267
  "outputs": [],
1972
2268
  "stateMutability": "nonpayable",
1973
2269
  "type": "function"
@@ -1975,17 +2271,17 @@
1975
2271
  {
1976
2272
  "inputs": [
1977
2273
  {
1978
- "internalType": "RoleId",
1979
- "name": "role",
1980
- "type": "bytes8"
2274
+ "internalType": "Key32",
2275
+ "name": "referralKey",
2276
+ "type": "bytes32"
1981
2277
  },
1982
2278
  {
1983
- "internalType": "bool",
1984
- "name": "active",
1985
- "type": "bool"
2279
+ "internalType": "StateId",
2280
+ "name": "newState",
2281
+ "type": "uint8"
1986
2282
  }
1987
2283
  ],
1988
- "name": "setRoleState",
2284
+ "name": "updateReferralState",
1989
2285
  "outputs": [],
1990
2286
  "stateMutability": "nonpayable",
1991
2287
  "type": "function"
@@ -1993,20 +2289,54 @@
1993
2289
  {
1994
2290
  "inputs": [
1995
2291
  {
1996
- "internalType": "bytes4",
1997
- "name": "interfaceId",
1998
- "type": "bytes4"
2292
+ "internalType": "RiskId",
2293
+ "name": "riskId",
2294
+ "type": "bytes8"
2295
+ },
2296
+ {
2297
+ "components": [
2298
+ {
2299
+ "internalType": "NftId",
2300
+ "name": "productNftId",
2301
+ "type": "uint96"
2302
+ },
2303
+ {
2304
+ "internalType": "bytes",
2305
+ "name": "data",
2306
+ "type": "bytes"
2307
+ }
2308
+ ],
2309
+ "internalType": "struct IRisk.RiskInfo",
2310
+ "name": "risk",
2311
+ "type": "tuple"
2312
+ },
2313
+ {
2314
+ "internalType": "StateId",
2315
+ "name": "newState",
2316
+ "type": "uint8"
1999
2317
  }
2000
2318
  ],
2001
- "name": "supportsInterface",
2002
- "outputs": [
2319
+ "name": "updateRisk",
2320
+ "outputs": [],
2321
+ "stateMutability": "nonpayable",
2322
+ "type": "function"
2323
+ },
2324
+ {
2325
+ "inputs": [
2003
2326
  {
2004
- "internalType": "bool",
2005
- "name": "",
2006
- "type": "bool"
2327
+ "internalType": "RiskId",
2328
+ "name": "riskId",
2329
+ "type": "bytes8"
2330
+ },
2331
+ {
2332
+ "internalType": "StateId",
2333
+ "name": "newState",
2334
+ "type": "uint8"
2007
2335
  }
2008
2336
  ],
2009
- "stateMutability": "view",
2337
+ "name": "updateRiskState",
2338
+ "outputs": [],
2339
+ "stateMutability": "nonpayable",
2010
2340
  "type": "function"
2011
2341
  }
2012
2342
  ],