@etherisc/gif-next 0.0.2-de220d6-949 → 0.0.2-e0ff180-567

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