@etherisc/gif-next 0.0.2-be8b468-276 → 0.0.2-bfb44e0-483

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