@etherisc/gif-next 0.0.2-ce87da3-250 → 0.0.2-ceb30b2-601

Sign up to get free protection for your applications and to get access to all the features.
Files changed (278) hide show
  1. package/README.md +6 -83
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
  3. package/artifacts/contracts/components/Component.sol/Component.json +78 -102
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +139 -153
  6. package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +1 -1
  7. package/artifacts/contracts/components/IComponent.sol/IComponent.json +155 -76
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +181 -125
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +342 -178
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +162 -151
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +286 -245
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +83 -175
  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 +1 -1
  21. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +64 -50
  22. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +1 -1
  23. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.json +5 -0
  24. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  25. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +707 -463
  26. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  27. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +167 -76
  28. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  29. package/artifacts/contracts/instance/Instance.sol/Instance.json +630 -625
  30. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
  31. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +472 -126
  32. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  33. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +258 -236
  34. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  35. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +291 -238
  36. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  37. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +79 -48
  38. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +1 -1
  39. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +8 -13
  40. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +1 -1
  41. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.json +114 -35
  42. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  43. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  44. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  45. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +40 -10
  46. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  47. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +36 -11
  48. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
  49. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +56 -73
  50. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
  51. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +4 -0
  52. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.json +10 -0
  53. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
  54. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
  55. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
  56. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +1 -1
  57. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +1 -1
  58. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.dbg.json +1 -1
  59. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.json +322 -99
  60. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
  61. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.json +59 -44
  62. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +1 -1
  63. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +459 -242
  64. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
  65. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +90 -39
  66. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.dbg.json +1 -1
  67. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.json +646 -84
  68. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
  69. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.json +119 -32
  70. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
  71. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +673 -129
  72. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
  73. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +96 -69
  74. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +1 -1
  75. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.json +205 -59
  76. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +1 -1
  77. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +253 -185
  78. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.dbg.json +1 -1
  79. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.json +373 -51
  80. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  81. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +480 -37
  82. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +1 -1
  83. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +170 -102
  84. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  85. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +776 -46
  86. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  87. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +85 -27
  88. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +1 -1
  89. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +255 -222
  90. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
  91. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +37 -78
  92. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  93. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +929 -58
  94. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
  95. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +84 -37
  96. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  97. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +145 -58
  98. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
  99. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +28 -37
  100. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  101. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +15 -2
  102. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  103. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +19 -0
  104. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  105. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +5 -37
  106. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  107. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.json +18 -0
  108. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  109. package/artifacts/contracts/registry/Registry.sol/Registry.json +31 -12
  110. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +1 -1
  111. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +2 -2
  112. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  113. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +23 -50
  114. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  115. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +21 -34
  116. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +1 -1
  117. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +23 -11
  118. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
  119. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +10 -23
  120. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
  121. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  122. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  123. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +0 -13
  124. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
  125. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +45 -9
  126. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  127. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +0 -13
  128. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
  129. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.json +0 -13
  130. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
  131. package/artifacts/contracts/shared/IService.sol/IService.json +85 -27
  132. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  133. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  134. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +6 -19
  135. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
  136. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +47 -24
  137. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  138. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +14 -27
  139. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  140. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +7 -20
  141. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
  142. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +2 -15
  143. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
  144. package/artifacts/contracts/shared/Service.sol/Service.json +92 -29
  145. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  146. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.json +2 -2
  147. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  148. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +2 -2
  149. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  150. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  151. package/artifacts/contracts/test/TestFee.sol/TestFee.json +2 -2
  152. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  153. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +7 -20
  154. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  155. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +6 -6
  156. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  157. package/artifacts/contracts/test/TestService.sol/TestService.json +107 -40
  158. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  159. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  160. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +2 -2
  161. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  162. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +2 -2
  163. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  164. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  165. package/artifacts/contracts/types/Amount.sol/AmountLib.dbg.json +4 -0
  166. package/artifacts/contracts/types/Amount.sol/AmountLib.json +209 -0
  167. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  168. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +2 -2
  169. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  170. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
  171. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.json +83 -4
  172. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  173. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +2 -2
  174. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  175. package/artifacts/contracts/types/Fee.sol/FeeLib.json +40 -9
  176. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  177. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
  178. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  179. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +17 -4
  180. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  181. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
  182. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +1 -1
  183. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  184. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  185. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
  186. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.json +116 -7
  187. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +1 -1
  188. package/artifacts/contracts/types/Referral.sol/ReferralLib.json +23 -4
  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/Seconds.sol/SecondsLib.dbg.json +4 -0
  194. package/artifacts/contracts/types/Seconds.sol/SecondsLib.json +124 -0
  195. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  196. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  197. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  198. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +38 -7
  199. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
  200. package/artifacts/contracts/types/UFixed.sol/MathLib.json +2 -2
  201. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
  202. package/artifacts/contracts/types/UFixed.sol/UFixedLib.json +2 -2
  203. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  204. package/artifacts/contracts/types/Version.sol/VersionLib.json +2 -2
  205. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  206. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
  207. package/contracts/components/Component.sol +99 -87
  208. package/contracts/components/Distribution.sol +18 -21
  209. package/contracts/components/IComponent.sol +40 -18
  210. package/contracts/components/IDistributionComponent.sol +1 -22
  211. package/contracts/components/IPoolComponent.sol +73 -47
  212. package/contracts/components/IProductComponent.sol +3 -2
  213. package/contracts/components/Pool.sol +178 -130
  214. package/contracts/components/Product.sol +157 -71
  215. package/contracts/instance/AccessManagerUpgradeableInitializeable.sol +13 -0
  216. package/contracts/instance/BundleManager.sol +10 -9
  217. package/contracts/instance/Cloneable.sol +7 -2
  218. package/contracts/instance/IInstance.sol +39 -27
  219. package/contracts/instance/IInstanceService.sol +16 -12
  220. package/contracts/instance/Instance.sol +125 -98
  221. package/contracts/instance/InstanceAccessManager.sol +388 -158
  222. package/contracts/instance/InstanceReader.sol +36 -12
  223. package/contracts/instance/InstanceService.sol +220 -212
  224. package/contracts/instance/ObjectManager.sol +6 -8
  225. package/contracts/instance/base/ComponentService.sol +28 -32
  226. package/contracts/instance/base/KeyValueStore.sol +13 -36
  227. package/contracts/instance/base/Lifecycle.sol +23 -6
  228. package/contracts/instance/module/IAccess.sol +21 -14
  229. package/contracts/instance/module/IBundle.sol +8 -5
  230. package/contracts/instance/module/IComponents.sol +41 -0
  231. package/contracts/instance/module/IDistribution.sol +2 -1
  232. package/contracts/instance/module/IPolicy.sol +38 -7
  233. package/contracts/instance/module/ISetup.sol +7 -22
  234. package/contracts/instance/service/ApplicationService.sol +138 -50
  235. package/contracts/instance/service/BundleService.sol +228 -83
  236. package/contracts/instance/service/ClaimService.sol +240 -30
  237. package/contracts/instance/service/DistributionService.sol +179 -114
  238. package/contracts/instance/service/IApplicationService.sol +9 -13
  239. package/contracts/instance/service/IBundleService.sol +74 -26
  240. package/contracts/instance/service/IClaimService.sol +52 -23
  241. package/contracts/instance/service/IDistributionService.sol +21 -3
  242. package/contracts/instance/service/IPolicyService.sol +20 -29
  243. package/contracts/instance/service/IPoolService.sol +127 -3
  244. package/contracts/instance/service/PolicyService.sol +133 -251
  245. package/contracts/instance/service/PoolService.sol +258 -18
  246. package/contracts/instance/service/ProductService.sol +31 -54
  247. package/contracts/registry/ChainNft.sol +8 -0
  248. package/contracts/registry/IRegistry.sol +2 -0
  249. package/contracts/registry/IRegistryService.sol +2 -3
  250. package/contracts/registry/ITransferInterceptor.sol +1 -0
  251. package/contracts/registry/Registry.sol +23 -20
  252. package/contracts/registry/RegistryService.sol +15 -16
  253. package/contracts/registry/ReleaseManager.sol +20 -18
  254. package/contracts/shared/IPolicyHolder.sol +20 -8
  255. package/contracts/shared/IRegistryLinked.sol +0 -1
  256. package/contracts/shared/IService.sol +6 -6
  257. package/contracts/shared/NftOwnable.sol +0 -2
  258. package/contracts/shared/PolicyHolder.sol +14 -8
  259. package/contracts/shared/Registerable.sol +12 -11
  260. package/contracts/shared/RegistryLinked.sol +0 -5
  261. package/contracts/shared/Service.sol +21 -7
  262. package/contracts/shared/TokenHandler.sol +11 -5
  263. package/contracts/test/TestService.sol +1 -1
  264. package/contracts/types/Amount.sol +70 -0
  265. package/contracts/types/Blocknumber.sol +1 -0
  266. package/contracts/types/ClaimId.sol +25 -2
  267. package/contracts/types/Fee.sol +13 -5
  268. package/contracts/types/NftId.sol +8 -0
  269. package/contracts/types/ObjectType.sol +6 -5
  270. package/contracts/types/PayoutId.sol +33 -5
  271. package/contracts/types/Referral.sol +4 -0
  272. package/contracts/types/RoleId.sol +13 -6
  273. package/contracts/types/Seconds.sol +54 -0
  274. package/contracts/types/StateId.sol +7 -2
  275. package/contracts/types/Timestamp.sol +18 -13
  276. package/contracts/types/UFixed.sol +1 -0
  277. package/contracts/types/Version.sol +1 -0
  278. package/package.json +1 -1
@@ -41,6 +41,77 @@
41
41
  "name": "AccessManagedUnauthorized",
42
42
  "type": "error"
43
43
  },
44
+ {
45
+ "inputs": [
46
+ {
47
+ "internalType": "address",
48
+ "name": "instanceBundleManager",
49
+ "type": "address"
50
+ }
51
+ ],
52
+ "name": "ErrorInstanceBundleManagerAlreadySet",
53
+ "type": "error"
54
+ },
55
+ {
56
+ "inputs": [
57
+ {
58
+ "internalType": "address",
59
+ "name": "instanceAuthority",
60
+ "type": "address"
61
+ }
62
+ ],
63
+ "name": "ErrorInstanceBundleManagerAuthorityMismatch",
64
+ "type": "error"
65
+ },
66
+ {
67
+ "inputs": [
68
+ {
69
+ "internalType": "address",
70
+ "name": "instance",
71
+ "type": "address"
72
+ }
73
+ ],
74
+ "name": "ErrorInstanceBundleManagerInstanceMismatch",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "inputs": [
79
+ {
80
+ "internalType": "address",
81
+ "name": "instanceAccessManager",
82
+ "type": "address"
83
+ }
84
+ ],
85
+ "name": "ErrorInstanceInstanceAccessManagerAlreadySet",
86
+ "type": "error"
87
+ },
88
+ {
89
+ "inputs": [
90
+ {
91
+ "internalType": "address",
92
+ "name": "instanceAuthority",
93
+ "type": "address"
94
+ }
95
+ ],
96
+ "name": "ErrorInstanceInstanceAccessManagerAuthorityMismatch",
97
+ "type": "error"
98
+ },
99
+ {
100
+ "inputs": [],
101
+ "name": "ErrorInstanceInstanceAccessManagerZero",
102
+ "type": "error"
103
+ },
104
+ {
105
+ "inputs": [
106
+ {
107
+ "internalType": "address",
108
+ "name": "instanceAuthority",
109
+ "type": "address"
110
+ }
111
+ ],
112
+ "name": "ErrorInstanceInstanceReaderInstanceMismatch",
113
+ "type": "error"
114
+ },
44
115
  {
45
116
  "inputs": [
46
117
  {
@@ -327,9 +398,9 @@
327
398
  "type": "uint256"
328
399
  },
329
400
  {
330
- "internalType": "uint256",
401
+ "internalType": "Seconds",
331
402
  "name": "lifetime",
332
- "type": "uint256"
403
+ "type": "uint40"
333
404
  },
334
405
  {
335
406
  "internalType": "bytes",
@@ -352,9 +423,14 @@
352
423
  "type": "uint16"
353
424
  },
354
425
  {
355
- "internalType": "uint256",
426
+ "internalType": "Amount",
427
+ "name": "claimAmount",
428
+ "type": "uint96"
429
+ },
430
+ {
431
+ "internalType": "Amount",
356
432
  "name": "payoutAmount",
357
- "type": "uint256"
433
+ "type": "uint96"
358
434
  },
359
435
  {
360
436
  "internalType": "Timestamp",
@@ -419,24 +495,24 @@
419
495
  "type": "bytes"
420
496
  },
421
497
  {
422
- "internalType": "uint256",
498
+ "internalType": "Amount",
423
499
  "name": "capitalAmount",
424
- "type": "uint256"
500
+ "type": "uint96"
425
501
  },
426
502
  {
427
- "internalType": "uint256",
503
+ "internalType": "Amount",
428
504
  "name": "lockedAmount",
429
- "type": "uint256"
505
+ "type": "uint96"
430
506
  },
431
507
  {
432
- "internalType": "uint256",
433
- "name": "balanceAmount",
434
- "type": "uint256"
508
+ "internalType": "Amount",
509
+ "name": "feeAmount",
510
+ "type": "uint96"
435
511
  },
436
512
  {
437
- "internalType": "uint256",
513
+ "internalType": "Seconds",
438
514
  "name": "lifetime",
439
- "type": "uint256"
515
+ "type": "uint40"
440
516
  },
441
517
  {
442
518
  "internalType": "Timestamp",
@@ -459,6 +535,61 @@
459
535
  "stateMutability": "nonpayable",
460
536
  "type": "function"
461
537
  },
538
+ {
539
+ "inputs": [
540
+ {
541
+ "internalType": "NftId",
542
+ "name": "policyNftId",
543
+ "type": "uint96"
544
+ },
545
+ {
546
+ "internalType": "ClaimId",
547
+ "name": "claimId",
548
+ "type": "uint16"
549
+ },
550
+ {
551
+ "components": [
552
+ {
553
+ "internalType": "Amount",
554
+ "name": "claimAmount",
555
+ "type": "uint96"
556
+ },
557
+ {
558
+ "internalType": "Amount",
559
+ "name": "paidAmount",
560
+ "type": "uint96"
561
+ },
562
+ {
563
+ "internalType": "uint8",
564
+ "name": "payoutsCount",
565
+ "type": "uint8"
566
+ },
567
+ {
568
+ "internalType": "uint8",
569
+ "name": "openPayoutsCount",
570
+ "type": "uint8"
571
+ },
572
+ {
573
+ "internalType": "bytes",
574
+ "name": "data",
575
+ "type": "bytes"
576
+ },
577
+ {
578
+ "internalType": "Timestamp",
579
+ "name": "closedAt",
580
+ "type": "uint40"
581
+ }
582
+ ],
583
+ "internalType": "struct IPolicy.ClaimInfo",
584
+ "name": "claim",
585
+ "type": "tuple"
586
+ }
587
+ ],
588
+ "name": "createClaim",
589
+ "outputs": [],
590
+ "stateMutability": "nonpayable",
591
+ "type": "function"
592
+ },
462
593
  {
463
594
  "inputs": [
464
595
  {
@@ -478,6 +609,23 @@
478
609
  "name": "tokenHandler",
479
610
  "type": "address"
480
611
  },
612
+ {
613
+ "components": [
614
+ {
615
+ "internalType": "UFixed",
616
+ "name": "fractionalFee",
617
+ "type": "uint256"
618
+ },
619
+ {
620
+ "internalType": "uint256",
621
+ "name": "fixedFee",
622
+ "type": "uint256"
623
+ }
624
+ ],
625
+ "internalType": "struct Fee",
626
+ "name": "minDistributionOwnerFee",
627
+ "type": "tuple"
628
+ },
481
629
  {
482
630
  "components": [
483
631
  {
@@ -499,6 +647,11 @@
499
647
  "internalType": "address",
500
648
  "name": "wallet",
501
649
  "type": "address"
650
+ },
651
+ {
652
+ "internalType": "uint256",
653
+ "name": "sumDistributionOwnerFees",
654
+ "type": "uint256"
502
655
  }
503
656
  ],
504
657
  "internalType": "struct ISetup.DistributionSetupInfo",
@@ -534,6 +687,16 @@
534
687
  "internalType": "bytes",
535
688
  "name": "data",
536
689
  "type": "bytes"
690
+ },
691
+ {
692
+ "internalType": "uint256",
693
+ "name": "sumCommisions",
694
+ "type": "uint256"
695
+ },
696
+ {
697
+ "internalType": "uint256",
698
+ "name": "numPoliciesSold",
699
+ "type": "uint256"
537
700
  }
538
701
  ],
539
702
  "internalType": "struct IDistribution.DistributorInfo",
@@ -549,9 +712,9 @@
549
712
  {
550
713
  "inputs": [
551
714
  {
552
- "internalType": "Key32",
553
- "name": "distributorKey",
554
- "type": "bytes32"
715
+ "internalType": "DistributorType",
716
+ "name": "distributorType",
717
+ "type": "bytes8"
555
718
  },
556
719
  {
557
720
  "components": [
@@ -615,45 +778,130 @@
615
778
  "inputs": [
616
779
  {
617
780
  "internalType": "NftId",
618
- "name": "poolNftId",
781
+ "name": "policyNftId",
619
782
  "type": "uint96"
620
783
  },
784
+ {
785
+ "internalType": "PayoutId",
786
+ "name": "payoutId",
787
+ "type": "uint24"
788
+ },
621
789
  {
622
790
  "components": [
623
791
  {
624
- "internalType": "NftId",
625
- "name": "productNftId",
792
+ "internalType": "ClaimId",
793
+ "name": "claimId",
794
+ "type": "uint16"
795
+ },
796
+ {
797
+ "internalType": "Amount",
798
+ "name": "amount",
626
799
  "type": "uint96"
627
800
  },
801
+ {
802
+ "internalType": "bytes",
803
+ "name": "data",
804
+ "type": "bytes"
805
+ },
806
+ {
807
+ "internalType": "Timestamp",
808
+ "name": "paidAt",
809
+ "type": "uint40"
810
+ }
811
+ ],
812
+ "internalType": "struct IPolicy.PayoutInfo",
813
+ "name": "claim",
814
+ "type": "tuple"
815
+ }
816
+ ],
817
+ "name": "createPayout",
818
+ "outputs": [],
819
+ "stateMutability": "nonpayable",
820
+ "type": "function"
821
+ },
822
+ {
823
+ "inputs": [
824
+ {
825
+ "internalType": "NftId",
826
+ "name": "poolNftId",
827
+ "type": "uint96"
828
+ },
829
+ {
830
+ "components": [
831
+ {
832
+ "internalType": "string",
833
+ "name": "name",
834
+ "type": "string"
835
+ },
836
+ {
837
+ "internalType": "contract IERC20Metadata",
838
+ "name": "token",
839
+ "type": "address"
840
+ },
628
841
  {
629
842
  "internalType": "contract TokenHandler",
630
843
  "name": "tokenHandler",
631
844
  "type": "address"
632
845
  },
633
846
  {
634
- "internalType": "bool",
635
- "name": "isInterceptingBundleTransfers",
636
- "type": "bool"
847
+ "internalType": "address",
848
+ "name": "wallet",
849
+ "type": "address"
637
850
  },
638
851
  {
639
- "internalType": "bool",
640
- "name": "isExternallyManaged",
641
- "type": "bool"
852
+ "internalType": "Amount",
853
+ "name": "balanceAmount",
854
+ "type": "uint96"
642
855
  },
643
856
  {
644
- "internalType": "bool",
645
- "name": "isVerifyingApplications",
646
- "type": "bool"
857
+ "internalType": "Amount",
858
+ "name": "feeAmount",
859
+ "type": "uint96"
647
860
  },
648
861
  {
649
- "internalType": "UFixed",
650
- "name": "collateralizationLevel",
651
- "type": "uint256"
862
+ "internalType": "bytes",
863
+ "name": "data",
864
+ "type": "bytes"
865
+ }
866
+ ],
867
+ "internalType": "struct IComponents.ComponentInfo",
868
+ "name": "info",
869
+ "type": "tuple"
870
+ }
871
+ ],
872
+ "name": "createPoolSetup",
873
+ "outputs": [],
874
+ "stateMutability": "nonpayable",
875
+ "type": "function"
876
+ },
877
+ {
878
+ "inputs": [
879
+ {
880
+ "internalType": "NftId",
881
+ "name": "productNftId",
882
+ "type": "uint96"
883
+ },
884
+ {
885
+ "components": [
886
+ {
887
+ "internalType": "contract IERC20Metadata",
888
+ "name": "token",
889
+ "type": "address"
652
890
  },
653
891
  {
654
- "internalType": "UFixed",
655
- "name": "retentionLevel",
656
- "type": "uint256"
892
+ "internalType": "contract TokenHandler",
893
+ "name": "tokenHandler",
894
+ "type": "address"
895
+ },
896
+ {
897
+ "internalType": "NftId",
898
+ "name": "distributionNftId",
899
+ "type": "uint96"
900
+ },
901
+ {
902
+ "internalType": "NftId",
903
+ "name": "poolNftId",
904
+ "type": "uint96"
657
905
  },
658
906
  {
659
907
  "components": [
@@ -669,7 +917,7 @@
669
917
  }
670
918
  ],
671
919
  "internalType": "struct Fee",
672
- "name": "poolFee",
920
+ "name": "productFee",
673
921
  "type": "tuple"
674
922
  },
675
923
  {
@@ -686,171 +934,7 @@
686
934
  }
687
935
  ],
688
936
  "internalType": "struct Fee",
689
- "name": "stakingFee",
690
- "type": "tuple"
691
- },
692
- {
693
- "components": [
694
- {
695
- "internalType": "UFixed",
696
- "name": "fractionalFee",
697
- "type": "uint256"
698
- },
699
- {
700
- "internalType": "uint256",
701
- "name": "fixedFee",
702
- "type": "uint256"
703
- }
704
- ],
705
- "internalType": "struct Fee",
706
- "name": "performanceFee",
707
- "type": "tuple"
708
- },
709
- {
710
- "internalType": "address",
711
- "name": "wallet",
712
- "type": "address"
713
- }
714
- ],
715
- "internalType": "struct ISetup.PoolSetupInfo",
716
- "name": "setup",
717
- "type": "tuple"
718
- }
719
- ],
720
- "name": "createPoolSetup",
721
- "outputs": [],
722
- "stateMutability": "nonpayable",
723
- "type": "function"
724
- },
725
- {
726
- "inputs": [
727
- {
728
- "internalType": "NftId",
729
- "name": "productNftId",
730
- "type": "uint96"
731
- },
732
- {
733
- "components": [
734
- {
735
- "internalType": "contract IERC20Metadata",
736
- "name": "token",
737
- "type": "address"
738
- },
739
- {
740
- "internalType": "contract TokenHandler",
741
- "name": "tokenHandler",
742
- "type": "address"
743
- },
744
- {
745
- "internalType": "NftId",
746
- "name": "distributionNftId",
747
- "type": "uint96"
748
- },
749
- {
750
- "internalType": "NftId",
751
- "name": "poolNftId",
752
- "type": "uint96"
753
- },
754
- {
755
- "components": [
756
- {
757
- "internalType": "UFixed",
758
- "name": "fractionalFee",
759
- "type": "uint256"
760
- },
761
- {
762
- "internalType": "uint256",
763
- "name": "fixedFee",
764
- "type": "uint256"
765
- }
766
- ],
767
- "internalType": "struct Fee",
768
- "name": "distributionFee",
769
- "type": "tuple"
770
- },
771
- {
772
- "components": [
773
- {
774
- "internalType": "UFixed",
775
- "name": "fractionalFee",
776
- "type": "uint256"
777
- },
778
- {
779
- "internalType": "uint256",
780
- "name": "fixedFee",
781
- "type": "uint256"
782
- }
783
- ],
784
- "internalType": "struct Fee",
785
- "name": "productFee",
786
- "type": "tuple"
787
- },
788
- {
789
- "components": [
790
- {
791
- "internalType": "UFixed",
792
- "name": "fractionalFee",
793
- "type": "uint256"
794
- },
795
- {
796
- "internalType": "uint256",
797
- "name": "fixedFee",
798
- "type": "uint256"
799
- }
800
- ],
801
- "internalType": "struct Fee",
802
- "name": "processingFee",
803
- "type": "tuple"
804
- },
805
- {
806
- "components": [
807
- {
808
- "internalType": "UFixed",
809
- "name": "fractionalFee",
810
- "type": "uint256"
811
- },
812
- {
813
- "internalType": "uint256",
814
- "name": "fixedFee",
815
- "type": "uint256"
816
- }
817
- ],
818
- "internalType": "struct Fee",
819
- "name": "poolFee",
820
- "type": "tuple"
821
- },
822
- {
823
- "components": [
824
- {
825
- "internalType": "UFixed",
826
- "name": "fractionalFee",
827
- "type": "uint256"
828
- },
829
- {
830
- "internalType": "uint256",
831
- "name": "fixedFee",
832
- "type": "uint256"
833
- }
834
- ],
835
- "internalType": "struct Fee",
836
- "name": "stakingFee",
837
- "type": "tuple"
838
- },
839
- {
840
- "components": [
841
- {
842
- "internalType": "UFixed",
843
- "name": "fractionalFee",
844
- "type": "uint256"
845
- },
846
- {
847
- "internalType": "uint256",
848
- "name": "fixedFee",
849
- "type": "uint256"
850
- }
851
- ],
852
- "internalType": "struct Fee",
853
- "name": "performanceFee",
937
+ "name": "processingFee",
854
938
  "type": "tuple"
855
939
  },
856
940
  {
@@ -877,9 +961,9 @@
877
961
  {
878
962
  "inputs": [
879
963
  {
880
- "internalType": "Key32",
881
- "name": "referralKey",
882
- "type": "bytes32"
964
+ "internalType": "ReferralId",
965
+ "name": "referralId",
966
+ "type": "bytes8"
883
967
  },
884
968
  {
885
969
  "components": [
@@ -1049,19 +1133,6 @@
1049
1133
  "stateMutability": "view",
1050
1134
  "type": "function"
1051
1135
  },
1052
- {
1053
- "inputs": [],
1054
- "name": "getBundleService",
1055
- "outputs": [
1056
- {
1057
- "internalType": "contract IBundleService",
1058
- "name": "",
1059
- "type": "address"
1060
- }
1061
- ],
1062
- "stateMutability": "view",
1063
- "type": "function"
1064
- },
1065
1136
  {
1066
1137
  "inputs": [
1067
1138
  {
@@ -1081,19 +1152,6 @@
1081
1152
  "stateMutability": "view",
1082
1153
  "type": "function"
1083
1154
  },
1084
- {
1085
- "inputs": [],
1086
- "name": "getDistributionService",
1087
- "outputs": [
1088
- {
1089
- "internalType": "contract IDistributionService",
1090
- "name": "",
1091
- "type": "address"
1092
- }
1093
- ],
1094
- "stateMutability": "view",
1095
- "type": "function"
1096
- },
1097
1155
  {
1098
1156
  "inputs": [],
1099
1157
  "name": "getInitialInfo",
@@ -1163,6 +1221,19 @@
1163
1221
  "stateMutability": "view",
1164
1222
  "type": "function"
1165
1223
  },
1224
+ {
1225
+ "inputs": [],
1226
+ "name": "getInstanceAccessManager",
1227
+ "outputs": [
1228
+ {
1229
+ "internalType": "contract InstanceAccessManager",
1230
+ "name": "",
1231
+ "type": "address"
1232
+ }
1233
+ ],
1234
+ "stateMutability": "view",
1235
+ "type": "function"
1236
+ },
1166
1237
  {
1167
1238
  "inputs": [],
1168
1239
  "name": "getInstanceReader",
@@ -1261,45 +1332,6 @@
1261
1332
  "stateMutability": "view",
1262
1333
  "type": "function"
1263
1334
  },
1264
- {
1265
- "inputs": [],
1266
- "name": "getPolicyService",
1267
- "outputs": [
1268
- {
1269
- "internalType": "contract IPolicyService",
1270
- "name": "",
1271
- "type": "address"
1272
- }
1273
- ],
1274
- "stateMutability": "view",
1275
- "type": "function"
1276
- },
1277
- {
1278
- "inputs": [],
1279
- "name": "getPoolService",
1280
- "outputs": [
1281
- {
1282
- "internalType": "contract IPoolService",
1283
- "name": "",
1284
- "type": "address"
1285
- }
1286
- ],
1287
- "stateMutability": "view",
1288
- "type": "function"
1289
- },
1290
- {
1291
- "inputs": [],
1292
- "name": "getProductService",
1293
- "outputs": [
1294
- {
1295
- "internalType": "contract IProductService",
1296
- "name": "",
1297
- "type": "address"
1298
- }
1299
- ],
1300
- "stateMutability": "view",
1301
- "type": "function"
1302
- },
1303
1335
  {
1304
1336
  "inputs": [],
1305
1337
  "name": "getRegistry",
@@ -1313,19 +1345,6 @@
1313
1345
  "stateMutability": "view",
1314
1346
  "type": "function"
1315
1347
  },
1316
- {
1317
- "inputs": [],
1318
- "name": "getRegistryAddress",
1319
- "outputs": [
1320
- {
1321
- "internalType": "address",
1322
- "name": "",
1323
- "type": "address"
1324
- }
1325
- ],
1326
- "stateMutability": "view",
1327
- "type": "function"
1328
- },
1329
1348
  {
1330
1349
  "inputs": [
1331
1350
  {
@@ -1417,11 +1436,16 @@
1417
1436
  "inputs": [
1418
1437
  {
1419
1438
  "internalType": "address",
1420
- "name": "",
1439
+ "name": "to",
1421
1440
  "type": "address"
1441
+ },
1442
+ {
1443
+ "internalType": "uint256",
1444
+ "name": "tokenId",
1445
+ "type": "uint256"
1422
1446
  }
1423
1447
  ],
1424
- "name": "setAuthority",
1448
+ "name": "nftMint",
1425
1449
  "outputs": [],
1426
1450
  "stateMutability": "nonpayable",
1427
1451
  "type": "function"
@@ -1429,13 +1453,49 @@
1429
1453
  {
1430
1454
  "inputs": [
1431
1455
  {
1432
- "internalType": "bytes4",
1433
- "name": "interfaceId",
1434
- "type": "bytes4"
1456
+ "internalType": "address",
1457
+ "name": "from",
1458
+ "type": "address"
1459
+ },
1460
+ {
1461
+ "internalType": "address",
1462
+ "name": "to",
1463
+ "type": "address"
1464
+ },
1465
+ {
1466
+ "internalType": "uint256",
1467
+ "name": "tokenId",
1468
+ "type": "uint256"
1435
1469
  }
1436
1470
  ],
1437
- "name": "supportsInterface",
1438
- "outputs": [
1471
+ "name": "nftTransferFrom",
1472
+ "outputs": [],
1473
+ "stateMutability": "nonpayable",
1474
+ "type": "function"
1475
+ },
1476
+ {
1477
+ "inputs": [
1478
+ {
1479
+ "internalType": "address",
1480
+ "name": "",
1481
+ "type": "address"
1482
+ }
1483
+ ],
1484
+ "name": "setAuthority",
1485
+ "outputs": [],
1486
+ "stateMutability": "nonpayable",
1487
+ "type": "function"
1488
+ },
1489
+ {
1490
+ "inputs": [
1491
+ {
1492
+ "internalType": "bytes4",
1493
+ "name": "interfaceId",
1494
+ "type": "bytes4"
1495
+ }
1496
+ ],
1497
+ "name": "supportsInterface",
1498
+ "outputs": [
1439
1499
  {
1440
1500
  "internalType": "bool",
1441
1501
  "name": "",
@@ -1514,9 +1574,9 @@
1514
1574
  "type": "uint256"
1515
1575
  },
1516
1576
  {
1517
- "internalType": "uint256",
1577
+ "internalType": "Seconds",
1518
1578
  "name": "lifetime",
1519
- "type": "uint256"
1579
+ "type": "uint40"
1520
1580
  },
1521
1581
  {
1522
1582
  "internalType": "bytes",
@@ -1539,9 +1599,14 @@
1539
1599
  "type": "uint16"
1540
1600
  },
1541
1601
  {
1542
- "internalType": "uint256",
1602
+ "internalType": "Amount",
1603
+ "name": "claimAmount",
1604
+ "type": "uint96"
1605
+ },
1606
+ {
1607
+ "internalType": "Amount",
1543
1608
  "name": "payoutAmount",
1544
- "type": "uint256"
1609
+ "type": "uint96"
1545
1610
  },
1546
1611
  {
1547
1612
  "internalType": "Timestamp",
@@ -1629,24 +1694,24 @@
1629
1694
  "type": "bytes"
1630
1695
  },
1631
1696
  {
1632
- "internalType": "uint256",
1697
+ "internalType": "Amount",
1633
1698
  "name": "capitalAmount",
1634
- "type": "uint256"
1699
+ "type": "uint96"
1635
1700
  },
1636
1701
  {
1637
- "internalType": "uint256",
1702
+ "internalType": "Amount",
1638
1703
  "name": "lockedAmount",
1639
- "type": "uint256"
1704
+ "type": "uint96"
1640
1705
  },
1641
1706
  {
1642
- "internalType": "uint256",
1643
- "name": "balanceAmount",
1644
- "type": "uint256"
1707
+ "internalType": "Amount",
1708
+ "name": "feeAmount",
1709
+ "type": "uint96"
1645
1710
  },
1646
1711
  {
1647
- "internalType": "uint256",
1712
+ "internalType": "Seconds",
1648
1713
  "name": "lifetime",
1649
- "type": "uint256"
1714
+ "type": "uint40"
1650
1715
  },
1651
1716
  {
1652
1717
  "internalType": "Timestamp",
@@ -1692,6 +1757,89 @@
1692
1757
  "stateMutability": "nonpayable",
1693
1758
  "type": "function"
1694
1759
  },
1760
+ {
1761
+ "inputs": [
1762
+ {
1763
+ "internalType": "NftId",
1764
+ "name": "policyNftId",
1765
+ "type": "uint96"
1766
+ },
1767
+ {
1768
+ "internalType": "ClaimId",
1769
+ "name": "claimId",
1770
+ "type": "uint16"
1771
+ },
1772
+ {
1773
+ "components": [
1774
+ {
1775
+ "internalType": "Amount",
1776
+ "name": "claimAmount",
1777
+ "type": "uint96"
1778
+ },
1779
+ {
1780
+ "internalType": "Amount",
1781
+ "name": "paidAmount",
1782
+ "type": "uint96"
1783
+ },
1784
+ {
1785
+ "internalType": "uint8",
1786
+ "name": "payoutsCount",
1787
+ "type": "uint8"
1788
+ },
1789
+ {
1790
+ "internalType": "uint8",
1791
+ "name": "openPayoutsCount",
1792
+ "type": "uint8"
1793
+ },
1794
+ {
1795
+ "internalType": "bytes",
1796
+ "name": "data",
1797
+ "type": "bytes"
1798
+ },
1799
+ {
1800
+ "internalType": "Timestamp",
1801
+ "name": "closedAt",
1802
+ "type": "uint40"
1803
+ }
1804
+ ],
1805
+ "internalType": "struct IPolicy.ClaimInfo",
1806
+ "name": "claim",
1807
+ "type": "tuple"
1808
+ },
1809
+ {
1810
+ "internalType": "StateId",
1811
+ "name": "newState",
1812
+ "type": "uint8"
1813
+ }
1814
+ ],
1815
+ "name": "updateClaim",
1816
+ "outputs": [],
1817
+ "stateMutability": "nonpayable",
1818
+ "type": "function"
1819
+ },
1820
+ {
1821
+ "inputs": [
1822
+ {
1823
+ "internalType": "NftId",
1824
+ "name": "policyNftId",
1825
+ "type": "uint96"
1826
+ },
1827
+ {
1828
+ "internalType": "ClaimId",
1829
+ "name": "claimId",
1830
+ "type": "uint16"
1831
+ },
1832
+ {
1833
+ "internalType": "StateId",
1834
+ "name": "newState",
1835
+ "type": "uint8"
1836
+ }
1837
+ ],
1838
+ "name": "updateClaimState",
1839
+ "outputs": [],
1840
+ "stateMutability": "nonpayable",
1841
+ "type": "function"
1842
+ },
1695
1843
  {
1696
1844
  "inputs": [
1697
1845
  {
@@ -1711,6 +1859,23 @@
1711
1859
  "name": "tokenHandler",
1712
1860
  "type": "address"
1713
1861
  },
1862
+ {
1863
+ "components": [
1864
+ {
1865
+ "internalType": "UFixed",
1866
+ "name": "fractionalFee",
1867
+ "type": "uint256"
1868
+ },
1869
+ {
1870
+ "internalType": "uint256",
1871
+ "name": "fixedFee",
1872
+ "type": "uint256"
1873
+ }
1874
+ ],
1875
+ "internalType": "struct Fee",
1876
+ "name": "minDistributionOwnerFee",
1877
+ "type": "tuple"
1878
+ },
1714
1879
  {
1715
1880
  "components": [
1716
1881
  {
@@ -1732,6 +1897,11 @@
1732
1897
  "internalType": "address",
1733
1898
  "name": "wallet",
1734
1899
  "type": "address"
1900
+ },
1901
+ {
1902
+ "internalType": "uint256",
1903
+ "name": "sumDistributionOwnerFees",
1904
+ "type": "uint256"
1735
1905
  }
1736
1906
  ],
1737
1907
  "internalType": "struct ISetup.DistributionSetupInfo",
@@ -1790,6 +1960,16 @@
1790
1960
  "internalType": "bytes",
1791
1961
  "name": "data",
1792
1962
  "type": "bytes"
1963
+ },
1964
+ {
1965
+ "internalType": "uint256",
1966
+ "name": "sumCommisions",
1967
+ "type": "uint256"
1968
+ },
1969
+ {
1970
+ "internalType": "uint256",
1971
+ "name": "numPoliciesSold",
1972
+ "type": "uint256"
1793
1973
  }
1794
1974
  ],
1795
1975
  "internalType": "struct IDistribution.DistributorInfo",
@@ -1828,9 +2008,9 @@
1828
2008
  {
1829
2009
  "inputs": [
1830
2010
  {
1831
- "internalType": "Key32",
1832
- "name": "distributorKey",
1833
- "type": "bytes32"
2011
+ "internalType": "DistributorType",
2012
+ "name": "distributorType",
2013
+ "type": "bytes8"
1834
2014
  },
1835
2015
  {
1836
2016
  "components": [
@@ -1898,9 +2078,9 @@
1898
2078
  {
1899
2079
  "inputs": [
1900
2080
  {
1901
- "internalType": "Key32",
1902
- "name": "distributorKey",
1903
- "type": "bytes32"
2081
+ "internalType": "DistributorType",
2082
+ "name": "distributorType",
2083
+ "type": "bytes8"
1904
2084
  },
1905
2085
  {
1906
2086
  "internalType": "StateId",
@@ -1913,6 +2093,79 @@
1913
2093
  "stateMutability": "nonpayable",
1914
2094
  "type": "function"
1915
2095
  },
2096
+ {
2097
+ "inputs": [
2098
+ {
2099
+ "internalType": "NftId",
2100
+ "name": "policyNftId",
2101
+ "type": "uint96"
2102
+ },
2103
+ {
2104
+ "internalType": "PayoutId",
2105
+ "name": "payoutId",
2106
+ "type": "uint24"
2107
+ },
2108
+ {
2109
+ "components": [
2110
+ {
2111
+ "internalType": "ClaimId",
2112
+ "name": "claimId",
2113
+ "type": "uint16"
2114
+ },
2115
+ {
2116
+ "internalType": "Amount",
2117
+ "name": "amount",
2118
+ "type": "uint96"
2119
+ },
2120
+ {
2121
+ "internalType": "bytes",
2122
+ "name": "data",
2123
+ "type": "bytes"
2124
+ },
2125
+ {
2126
+ "internalType": "Timestamp",
2127
+ "name": "paidAt",
2128
+ "type": "uint40"
2129
+ }
2130
+ ],
2131
+ "internalType": "struct IPolicy.PayoutInfo",
2132
+ "name": "claim",
2133
+ "type": "tuple"
2134
+ },
2135
+ {
2136
+ "internalType": "StateId",
2137
+ "name": "newState",
2138
+ "type": "uint8"
2139
+ }
2140
+ ],
2141
+ "name": "updatePayout",
2142
+ "outputs": [],
2143
+ "stateMutability": "nonpayable",
2144
+ "type": "function"
2145
+ },
2146
+ {
2147
+ "inputs": [
2148
+ {
2149
+ "internalType": "NftId",
2150
+ "name": "policyNftId",
2151
+ "type": "uint96"
2152
+ },
2153
+ {
2154
+ "internalType": "PayoutId",
2155
+ "name": "payoutId",
2156
+ "type": "uint24"
2157
+ },
2158
+ {
2159
+ "internalType": "StateId",
2160
+ "name": "newState",
2161
+ "type": "uint8"
2162
+ }
2163
+ ],
2164
+ "name": "updatePayoutState",
2165
+ "outputs": [],
2166
+ "stateMutability": "nonpayable",
2167
+ "type": "function"
2168
+ },
1916
2169
  {
1917
2170
  "inputs": [
1918
2171
  {
@@ -1958,9 +2211,9 @@
1958
2211
  "type": "uint256"
1959
2212
  },
1960
2213
  {
1961
- "internalType": "uint256",
2214
+ "internalType": "Seconds",
1962
2215
  "name": "lifetime",
1963
- "type": "uint256"
2216
+ "type": "uint40"
1964
2217
  },
1965
2218
  {
1966
2219
  "internalType": "bytes",
@@ -1983,9 +2236,14 @@
1983
2236
  "type": "uint16"
1984
2237
  },
1985
2238
  {
1986
- "internalType": "uint256",
2239
+ "internalType": "Amount",
2240
+ "name": "claimAmount",
2241
+ "type": "uint96"
2242
+ },
2243
+ {
2244
+ "internalType": "Amount",
1987
2245
  "name": "payoutAmount",
1988
- "type": "uint256"
2246
+ "type": "uint96"
1989
2247
  },
1990
2248
  {
1991
2249
  "internalType": "Timestamp",
@@ -2018,6 +2276,116 @@
2018
2276
  "stateMutability": "nonpayable",
2019
2277
  "type": "function"
2020
2278
  },
2279
+ {
2280
+ "inputs": [
2281
+ {
2282
+ "internalType": "NftId",
2283
+ "name": "policyNftId",
2284
+ "type": "uint96"
2285
+ },
2286
+ {
2287
+ "components": [
2288
+ {
2289
+ "internalType": "NftId",
2290
+ "name": "productNftId",
2291
+ "type": "uint96"
2292
+ },
2293
+ {
2294
+ "internalType": "NftId",
2295
+ "name": "bundleNftId",
2296
+ "type": "uint96"
2297
+ },
2298
+ {
2299
+ "internalType": "ReferralId",
2300
+ "name": "referralId",
2301
+ "type": "bytes8"
2302
+ },
2303
+ {
2304
+ "internalType": "RiskId",
2305
+ "name": "riskId",
2306
+ "type": "bytes8"
2307
+ },
2308
+ {
2309
+ "internalType": "uint256",
2310
+ "name": "sumInsuredAmount",
2311
+ "type": "uint256"
2312
+ },
2313
+ {
2314
+ "internalType": "uint256",
2315
+ "name": "premiumAmount",
2316
+ "type": "uint256"
2317
+ },
2318
+ {
2319
+ "internalType": "uint256",
2320
+ "name": "premiumPaidAmount",
2321
+ "type": "uint256"
2322
+ },
2323
+ {
2324
+ "internalType": "Seconds",
2325
+ "name": "lifetime",
2326
+ "type": "uint40"
2327
+ },
2328
+ {
2329
+ "internalType": "bytes",
2330
+ "name": "applicationData",
2331
+ "type": "bytes"
2332
+ },
2333
+ {
2334
+ "internalType": "bytes",
2335
+ "name": "policyData",
2336
+ "type": "bytes"
2337
+ },
2338
+ {
2339
+ "internalType": "uint16",
2340
+ "name": "claimsCount",
2341
+ "type": "uint16"
2342
+ },
2343
+ {
2344
+ "internalType": "uint16",
2345
+ "name": "openClaimsCount",
2346
+ "type": "uint16"
2347
+ },
2348
+ {
2349
+ "internalType": "Amount",
2350
+ "name": "claimAmount",
2351
+ "type": "uint96"
2352
+ },
2353
+ {
2354
+ "internalType": "Amount",
2355
+ "name": "payoutAmount",
2356
+ "type": "uint96"
2357
+ },
2358
+ {
2359
+ "internalType": "Timestamp",
2360
+ "name": "activatedAt",
2361
+ "type": "uint40"
2362
+ },
2363
+ {
2364
+ "internalType": "Timestamp",
2365
+ "name": "expiredAt",
2366
+ "type": "uint40"
2367
+ },
2368
+ {
2369
+ "internalType": "Timestamp",
2370
+ "name": "closedAt",
2371
+ "type": "uint40"
2372
+ }
2373
+ ],
2374
+ "internalType": "struct IPolicy.PolicyInfo",
2375
+ "name": "policy",
2376
+ "type": "tuple"
2377
+ },
2378
+ {
2379
+ "internalType": "StateId",
2380
+ "name": "newState",
2381
+ "type": "uint8"
2382
+ }
2383
+ ],
2384
+ "name": "updatePolicyClaims",
2385
+ "outputs": [],
2386
+ "stateMutability": "nonpayable",
2387
+ "type": "function"
2388
+ },
2021
2389
  {
2022
2390
  "inputs": [
2023
2391
  {
@@ -2046,99 +2414,43 @@
2046
2414
  {
2047
2415
  "components": [
2048
2416
  {
2049
- "internalType": "NftId",
2050
- "name": "productNftId",
2051
- "type": "uint96"
2417
+ "internalType": "string",
2418
+ "name": "name",
2419
+ "type": "string"
2052
2420
  },
2053
2421
  {
2054
- "internalType": "contract TokenHandler",
2055
- "name": "tokenHandler",
2422
+ "internalType": "contract IERC20Metadata",
2423
+ "name": "token",
2056
2424
  "type": "address"
2057
2425
  },
2058
2426
  {
2059
- "internalType": "bool",
2060
- "name": "isInterceptingBundleTransfers",
2061
- "type": "bool"
2062
- },
2063
- {
2064
- "internalType": "bool",
2065
- "name": "isExternallyManaged",
2066
- "type": "bool"
2067
- },
2068
- {
2069
- "internalType": "bool",
2070
- "name": "isVerifyingApplications",
2071
- "type": "bool"
2072
- },
2073
- {
2074
- "internalType": "UFixed",
2075
- "name": "collateralizationLevel",
2076
- "type": "uint256"
2077
- },
2078
- {
2079
- "internalType": "UFixed",
2080
- "name": "retentionLevel",
2081
- "type": "uint256"
2427
+ "internalType": "contract TokenHandler",
2428
+ "name": "tokenHandler",
2429
+ "type": "address"
2082
2430
  },
2083
2431
  {
2084
- "components": [
2085
- {
2086
- "internalType": "UFixed",
2087
- "name": "fractionalFee",
2088
- "type": "uint256"
2089
- },
2090
- {
2091
- "internalType": "uint256",
2092
- "name": "fixedFee",
2093
- "type": "uint256"
2094
- }
2095
- ],
2096
- "internalType": "struct Fee",
2097
- "name": "poolFee",
2098
- "type": "tuple"
2432
+ "internalType": "address",
2433
+ "name": "wallet",
2434
+ "type": "address"
2099
2435
  },
2100
2436
  {
2101
- "components": [
2102
- {
2103
- "internalType": "UFixed",
2104
- "name": "fractionalFee",
2105
- "type": "uint256"
2106
- },
2107
- {
2108
- "internalType": "uint256",
2109
- "name": "fixedFee",
2110
- "type": "uint256"
2111
- }
2112
- ],
2113
- "internalType": "struct Fee",
2114
- "name": "stakingFee",
2115
- "type": "tuple"
2437
+ "internalType": "Amount",
2438
+ "name": "balanceAmount",
2439
+ "type": "uint96"
2116
2440
  },
2117
2441
  {
2118
- "components": [
2119
- {
2120
- "internalType": "UFixed",
2121
- "name": "fractionalFee",
2122
- "type": "uint256"
2123
- },
2124
- {
2125
- "internalType": "uint256",
2126
- "name": "fixedFee",
2127
- "type": "uint256"
2128
- }
2129
- ],
2130
- "internalType": "struct Fee",
2131
- "name": "performanceFee",
2132
- "type": "tuple"
2442
+ "internalType": "Amount",
2443
+ "name": "feeAmount",
2444
+ "type": "uint96"
2133
2445
  },
2134
2446
  {
2135
- "internalType": "address",
2136
- "name": "wallet",
2137
- "type": "address"
2447
+ "internalType": "bytes",
2448
+ "name": "data",
2449
+ "type": "bytes"
2138
2450
  }
2139
2451
  ],
2140
- "internalType": "struct ISetup.PoolSetupInfo",
2141
- "name": "setup",
2452
+ "internalType": "struct IComponents.ComponentInfo",
2453
+ "name": "info",
2142
2454
  "type": "tuple"
2143
2455
  },
2144
2456
  {
@@ -2199,23 +2511,6 @@
2199
2511
  "name": "poolNftId",
2200
2512
  "type": "uint96"
2201
2513
  },
2202
- {
2203
- "components": [
2204
- {
2205
- "internalType": "UFixed",
2206
- "name": "fractionalFee",
2207
- "type": "uint256"
2208
- },
2209
- {
2210
- "internalType": "uint256",
2211
- "name": "fixedFee",
2212
- "type": "uint256"
2213
- }
2214
- ],
2215
- "internalType": "struct Fee",
2216
- "name": "distributionFee",
2217
- "type": "tuple"
2218
- },
2219
2514
  {
2220
2515
  "components": [
2221
2516
  {
@@ -2250,57 +2545,6 @@
2250
2545
  "name": "processingFee",
2251
2546
  "type": "tuple"
2252
2547
  },
2253
- {
2254
- "components": [
2255
- {
2256
- "internalType": "UFixed",
2257
- "name": "fractionalFee",
2258
- "type": "uint256"
2259
- },
2260
- {
2261
- "internalType": "uint256",
2262
- "name": "fixedFee",
2263
- "type": "uint256"
2264
- }
2265
- ],
2266
- "internalType": "struct Fee",
2267
- "name": "poolFee",
2268
- "type": "tuple"
2269
- },
2270
- {
2271
- "components": [
2272
- {
2273
- "internalType": "UFixed",
2274
- "name": "fractionalFee",
2275
- "type": "uint256"
2276
- },
2277
- {
2278
- "internalType": "uint256",
2279
- "name": "fixedFee",
2280
- "type": "uint256"
2281
- }
2282
- ],
2283
- "internalType": "struct Fee",
2284
- "name": "stakingFee",
2285
- "type": "tuple"
2286
- },
2287
- {
2288
- "components": [
2289
- {
2290
- "internalType": "UFixed",
2291
- "name": "fractionalFee",
2292
- "type": "uint256"
2293
- },
2294
- {
2295
- "internalType": "uint256",
2296
- "name": "fixedFee",
2297
- "type": "uint256"
2298
- }
2299
- ],
2300
- "internalType": "struct Fee",
2301
- "name": "performanceFee",
2302
- "type": "tuple"
2303
- },
2304
2548
  {
2305
2549
  "internalType": "bool",
2306
2550
  "name": "isIntercepting",
@@ -2348,9 +2592,9 @@
2348
2592
  {
2349
2593
  "inputs": [
2350
2594
  {
2351
- "internalType": "Key32",
2352
- "name": "referralKey",
2353
- "type": "bytes32"
2595
+ "internalType": "ReferralId",
2596
+ "name": "referralId",
2597
+ "type": "bytes8"
2354
2598
  },
2355
2599
  {
2356
2600
  "components": [
@@ -2408,9 +2652,9 @@
2408
2652
  {
2409
2653
  "inputs": [
2410
2654
  {
2411
- "internalType": "Key32",
2412
- "name": "referralKey",
2413
- "type": "bytes32"
2655
+ "internalType": "ReferralId",
2656
+ "name": "referralId",
2657
+ "type": "bytes8"
2414
2658
  },
2415
2659
  {
2416
2660
  "internalType": "StateId",