@etherisc/gif-next 0.0.2-da77c50-824 → 0.0.2-db1e1e4-828

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