@etherisc/gif-next 0.0.2-90f8ffc-398 → 0.0.2-9105e58-225

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (272) hide show
  1. package/README.md +73 -1
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
  3. package/artifacts/contracts/components/Component.sol/Component.json +242 -34
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +592 -41
  6. package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +1 -1
  7. package/artifacts/contracts/components/IComponent.sol/IComponent.json +85 -27
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +327 -32
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +187 -43
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +85 -27
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +443 -54
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +342 -34
  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 +1 -1
  40. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +2 -2
  41. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +1 -1
  42. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  43. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +673 -169
  44. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  45. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +96 -34
  46. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  47. package/artifacts/contracts/instance/Instance.sol/Instance.json +762 -422
  48. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
  49. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +39 -89
  50. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  51. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +58 -53
  52. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  53. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +289 -104
  54. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  55. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +163 -57
  56. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +1 -1
  57. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +2 -2
  58. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +1 -1
  59. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.json +151 -52
  60. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  61. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  62. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  63. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +2 -2
  64. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  65. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +2 -2
  66. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
  67. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +13 -13
  68. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
  69. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
  70. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
  71. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
  72. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +1 -1
  73. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +1 -1
  74. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.dbg.json +4 -0
  75. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.json +1047 -0
  76. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +4 -0
  77. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.json +543 -0
  78. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +1 -1
  79. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +282 -118
  80. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
  81. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +149 -51
  82. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.dbg.json +4 -0
  83. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.json +932 -0
  84. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +4 -0
  85. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.json +523 -0
  86. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
  87. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +426 -74
  88. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
  89. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +174 -48
  90. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +4 -0
  91. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.json +612 -0
  92. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +1 -1
  93. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +130 -73
  94. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.dbg.json +4 -0
  95. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.json +548 -0
  96. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  97. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +220 -31
  98. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +1 -1
  99. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +44 -88
  100. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  101. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +23 -31
  102. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  103. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +23 -31
  104. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +1 -1
  105. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +212 -149
  106. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
  107. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +162 -64
  108. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  109. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +173 -74
  110. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
  111. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +146 -48
  112. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  113. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +173 -74
  114. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
  115. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +146 -48
  116. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  117. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  118. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +15 -2
  119. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  120. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +82 -34
  121. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  122. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  123. package/artifacts/contracts/registry/Registry.sol/Registry.json +28 -15
  124. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +1 -1
  125. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +2 -2
  126. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  127. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +218 -63
  128. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  129. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +142 -50
  130. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +1 -1
  131. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +11 -11
  132. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
  133. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +141 -37
  134. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
  135. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  136. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +41 -3
  137. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  138. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +40 -29
  139. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +4 -0
  140. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +129 -0
  141. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  142. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +21 -29
  143. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
  144. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.json +48 -0
  145. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
  146. package/artifacts/contracts/shared/IService.sol/IService.json +23 -31
  147. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  148. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +2 -2
  149. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  150. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +113 -33
  151. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +4 -0
  152. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +248 -0
  153. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  154. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +143 -39
  155. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  156. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +126 -45
  157. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +4 -0
  158. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +84 -0
  159. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
  160. package/artifacts/contracts/shared/Service.sol/Service.json +143 -44
  161. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  162. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  163. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +2 -2
  164. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  165. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +2 -2
  166. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  167. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  168. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +126 -45
  169. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  170. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +2 -2
  171. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  172. package/artifacts/contracts/test/TestService.sol/TestService.json +161 -62
  173. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  174. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  175. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  176. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +8 -8
  177. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  178. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  179. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  180. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  181. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.dbg.json +4 -0
  182. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.json +100 -0
  183. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  184. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +2 -2
  185. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  186. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  187. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
  188. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  189. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
  190. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  191. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
  192. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +1 -1
  193. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  194. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  195. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.dbg.json +4 -0
  196. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.json +100 -0
  197. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +1 -1
  198. package/artifacts/contracts/types/Referral.sol/ReferralLib.json +2 -2
  199. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +1 -1
  200. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +2 -2
  201. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
  202. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +2 -2
  203. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  204. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  205. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
  206. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
  207. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  208. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  209. package/contracts/components/Component.sol +46 -20
  210. package/contracts/components/Distribution.sol +188 -33
  211. package/contracts/components/IComponent.sol +15 -3
  212. package/contracts/components/IDistributionComponent.sol +54 -1
  213. package/contracts/components/IPoolComponent.sol +48 -17
  214. package/contracts/components/Pool.sol +134 -95
  215. package/contracts/components/Product.sol +76 -57
  216. package/contracts/instance/IInstance.sol +21 -1
  217. package/contracts/instance/IInstanceService.sol +18 -0
  218. package/contracts/instance/Instance.sol +58 -36
  219. package/contracts/instance/InstanceAccessManager.sol +12 -13
  220. package/contracts/instance/InstanceService.sol +76 -35
  221. package/contracts/instance/InstanceServiceManager.sol +1 -1
  222. package/contracts/instance/base/ComponentService.sol +1 -1
  223. package/contracts/instance/module/IAccess.sol +3 -4
  224. package/contracts/instance/module/IPolicy.sol +4 -2
  225. package/contracts/instance/module/ISetup.sol +5 -4
  226. package/contracts/instance/service/ApplicationService.sol +268 -0
  227. package/contracts/instance/service/ApplicationServiceManager.sol +35 -0
  228. package/contracts/instance/service/BundleService.sol +11 -6
  229. package/contracts/instance/service/BundleServiceManager.sol +1 -1
  230. package/contracts/instance/service/ClaimService.sol +151 -0
  231. package/contracts/instance/service/ClaimServiceManager.sol +35 -0
  232. package/contracts/instance/service/DistributionService.sol +185 -14
  233. package/contracts/instance/service/DistributionServiceManager.sol +1 -1
  234. package/contracts/instance/service/IApplicationService.sol +82 -0
  235. package/contracts/instance/service/IBundleService.sol +11 -1
  236. package/contracts/instance/service/IClaimService.sol +61 -0
  237. package/contracts/instance/service/IDistributionService.sol +53 -0
  238. package/contracts/instance/service/IPolicyService.sol +41 -46
  239. package/contracts/instance/service/PolicyService.sol +94 -158
  240. package/contracts/instance/service/PolicyServiceManager.sol +1 -1
  241. package/contracts/instance/service/PoolService.sol +2 -3
  242. package/contracts/instance/service/PoolServiceManager.sol +1 -1
  243. package/contracts/instance/service/ProductService.sol +9 -9
  244. package/contracts/instance/service/ProductServiceManager.sol +1 -1
  245. package/contracts/registry/IRegistry.sol +3 -2
  246. package/contracts/registry/IRegistryService.sol +10 -8
  247. package/contracts/registry/Registry.sol +20 -8
  248. package/contracts/registry/RegistryService.sol +70 -49
  249. package/contracts/registry/RegistryServiceManager.sol +13 -13
  250. package/contracts/registry/ReleaseManager.sol +8 -9
  251. package/contracts/registry/TokenRegistry.sol +15 -6
  252. package/contracts/shared/ERC165.sol +14 -12
  253. package/contracts/shared/INftOwnable.sol +11 -10
  254. package/contracts/shared/IPolicyHolder.sol +26 -0
  255. package/contracts/shared/IRegisterable.sol +3 -3
  256. package/contracts/shared/IRegistryLinked.sol +12 -0
  257. package/contracts/shared/IVersionable.sol +2 -2
  258. package/contracts/shared/NftOwnable.sol +66 -85
  259. package/contracts/shared/PolicyHolder.sol +81 -0
  260. package/contracts/shared/ProxyManager.sol +13 -5
  261. package/contracts/shared/Registerable.sol +6 -14
  262. package/contracts/shared/RegistryLinked.sol +48 -0
  263. package/contracts/shared/Service.sol +5 -5
  264. package/contracts/shared/Versionable.sol +3 -2
  265. package/contracts/test/TestRegisterable.sol +1 -1
  266. package/contracts/test/TestService.sol +1 -1
  267. package/contracts/types/ClaimId.sol +52 -0
  268. package/contracts/types/DistributorType.sol +2 -2
  269. package/contracts/types/ObjectType.sol +9 -5
  270. package/contracts/types/PayoutId.sol +54 -0
  271. package/contracts/types/RoleId.sol +3 -3
  272. package/package.json +3 -3
@@ -67,16 +67,11 @@
67
67
  "inputs": [
68
68
  {
69
69
  "internalType": "address",
70
- "name": "registry",
70
+ "name": "caller",
71
71
  "type": "address"
72
- },
73
- {
74
- "internalType": "NftId",
75
- "name": "nftId",
76
- "type": "uint96"
77
72
  }
78
73
  ],
79
- "name": "ErrorAlreadyLinked",
74
+ "name": "ErrorComponentNotChainNft",
80
75
  "type": "error"
81
76
  },
82
77
  {
@@ -172,34 +167,39 @@
172
167
  {
173
168
  "inputs": [
174
169
  {
175
- "internalType": "address",
176
- "name": "contractAddress",
177
- "type": "address"
170
+ "internalType": "NftId",
171
+ "name": "nftId",
172
+ "type": "uint96"
178
173
  }
179
174
  ],
180
- "name": "ErrorContractNotRegistered",
175
+ "name": "ErrorNftOwnableAlreadyLinked",
181
176
  "type": "error"
182
177
  },
183
178
  {
184
179
  "inputs": [
185
180
  {
186
181
  "internalType": "address",
187
- "name": "account",
182
+ "name": "contractAddress",
188
183
  "type": "address"
189
184
  }
190
185
  ],
191
- "name": "ErrorNotOwner",
186
+ "name": "ErrorNftOwnableContractNotRegistered",
187
+ "type": "error"
188
+ },
189
+ {
190
+ "inputs": [],
191
+ "name": "ErrorNftOwnableInitialOwnerZero",
192
192
  "type": "error"
193
193
  },
194
194
  {
195
195
  "inputs": [
196
196
  {
197
197
  "internalType": "address",
198
- "name": "registryAddress",
198
+ "name": "account",
199
199
  "type": "address"
200
200
  }
201
201
  ],
202
- "name": "ErrorNotRegistry",
202
+ "name": "ErrorNftOwnableNotOwner",
203
203
  "type": "error"
204
204
  },
205
205
  {
@@ -210,28 +210,18 @@
210
210
  "type": "address"
211
211
  }
212
212
  ],
213
- "name": "ErrorRegisterableNotRegistry",
214
- "type": "error"
215
- },
216
- {
217
- "inputs": [],
218
- "name": "ErrorRegistryAddressZero",
213
+ "name": "ErrorNotRegistry",
219
214
  "type": "error"
220
215
  },
221
216
  {
222
217
  "inputs": [
223
218
  {
224
219
  "internalType": "address",
225
- "name": "registry",
220
+ "name": "registryAddress",
226
221
  "type": "address"
227
222
  }
228
223
  ],
229
- "name": "ErrorRegistryAlreadyInitialized",
230
- "type": "error"
231
- },
232
- {
233
- "inputs": [],
234
- "name": "ErrorRegistryNotInitialized",
224
+ "name": "ErrorRegisterableNotRegistry",
235
225
  "type": "error"
236
226
  },
237
227
  {
@@ -324,6 +314,25 @@
324
314
  "name": "LogComponentWalletTokensTransferred",
325
315
  "type": "event"
326
316
  },
317
+ {
318
+ "anonymous": false,
319
+ "inputs": [
320
+ {
321
+ "indexed": false,
322
+ "internalType": "address",
323
+ "name": "to",
324
+ "type": "address"
325
+ },
326
+ {
327
+ "indexed": false,
328
+ "internalType": "address",
329
+ "name": "caller",
330
+ "type": "address"
331
+ }
332
+ ],
333
+ "name": "LogDistributorUpdated",
334
+ "type": "event"
335
+ },
327
336
  {
328
337
  "inputs": [],
329
338
  "name": "CONTRACT_LOCATION_V1",
@@ -337,6 +346,32 @@
337
346
  "stateMutability": "view",
338
347
  "type": "function"
339
348
  },
349
+ {
350
+ "inputs": [],
351
+ "name": "DISTRIBUTION_STORAGE_LOCATION_V1",
352
+ "outputs": [
353
+ {
354
+ "internalType": "bytes32",
355
+ "name": "",
356
+ "type": "bytes32"
357
+ }
358
+ ],
359
+ "stateMutability": "view",
360
+ "type": "function"
361
+ },
362
+ {
363
+ "inputs": [],
364
+ "name": "NFT_OWNABLE_STORAGE_LOCATION_V1",
365
+ "outputs": [
366
+ {
367
+ "internalType": "bytes32",
368
+ "name": "",
369
+ "type": "bytes32"
370
+ }
371
+ ],
372
+ "stateMutability": "view",
373
+ "type": "function"
374
+ },
340
375
  {
341
376
  "inputs": [],
342
377
  "name": "REGISTERABLE_LOCATION_V1",
@@ -411,6 +446,206 @@
411
446
  "stateMutability": "view",
412
447
  "type": "function"
413
448
  },
449
+ {
450
+ "inputs": [
451
+ {
452
+ "internalType": "address",
453
+ "name": "distributor",
454
+ "type": "address"
455
+ },
456
+ {
457
+ "internalType": "DistributorType",
458
+ "name": "distributorType",
459
+ "type": "bytes8"
460
+ },
461
+ {
462
+ "internalType": "bytes",
463
+ "name": "data",
464
+ "type": "bytes"
465
+ }
466
+ ],
467
+ "name": "createDistributor",
468
+ "outputs": [
469
+ {
470
+ "internalType": "NftId",
471
+ "name": "distributorNftId",
472
+ "type": "uint96"
473
+ }
474
+ ],
475
+ "stateMutability": "nonpayable",
476
+ "type": "function"
477
+ },
478
+ {
479
+ "inputs": [
480
+ {
481
+ "internalType": "string",
482
+ "name": "name",
483
+ "type": "string"
484
+ },
485
+ {
486
+ "internalType": "UFixed",
487
+ "name": "minDiscountPercentage",
488
+ "type": "uint256"
489
+ },
490
+ {
491
+ "internalType": "UFixed",
492
+ "name": "maxDiscountPercentage",
493
+ "type": "uint256"
494
+ },
495
+ {
496
+ "internalType": "UFixed",
497
+ "name": "commissionPercentage",
498
+ "type": "uint256"
499
+ },
500
+ {
501
+ "internalType": "uint32",
502
+ "name": "maxReferralCount",
503
+ "type": "uint32"
504
+ },
505
+ {
506
+ "internalType": "uint32",
507
+ "name": "maxReferralLifetime",
508
+ "type": "uint32"
509
+ },
510
+ {
511
+ "internalType": "bool",
512
+ "name": "allowSelfReferrals",
513
+ "type": "bool"
514
+ },
515
+ {
516
+ "internalType": "bool",
517
+ "name": "allowRenewals",
518
+ "type": "bool"
519
+ },
520
+ {
521
+ "internalType": "bytes",
522
+ "name": "data",
523
+ "type": "bytes"
524
+ }
525
+ ],
526
+ "name": "createDistributorType",
527
+ "outputs": [
528
+ {
529
+ "internalType": "DistributorType",
530
+ "name": "distributorType",
531
+ "type": "bytes8"
532
+ }
533
+ ],
534
+ "stateMutability": "nonpayable",
535
+ "type": "function"
536
+ },
537
+ {
538
+ "inputs": [
539
+ {
540
+ "internalType": "NftId",
541
+ "name": "distributorNftId",
542
+ "type": "uint96"
543
+ },
544
+ {
545
+ "internalType": "string",
546
+ "name": "code",
547
+ "type": "string"
548
+ },
549
+ {
550
+ "internalType": "UFixed",
551
+ "name": "discountPercentage",
552
+ "type": "uint256"
553
+ },
554
+ {
555
+ "internalType": "uint32",
556
+ "name": "maxReferrals",
557
+ "type": "uint32"
558
+ },
559
+ {
560
+ "internalType": "Timestamp",
561
+ "name": "expiryAt",
562
+ "type": "uint40"
563
+ },
564
+ {
565
+ "internalType": "bytes",
566
+ "name": "data",
567
+ "type": "bytes"
568
+ }
569
+ ],
570
+ "name": "createReferral",
571
+ "outputs": [
572
+ {
573
+ "internalType": "ReferralId",
574
+ "name": "referralId",
575
+ "type": "bytes8"
576
+ }
577
+ ],
578
+ "stateMutability": "nonpayable",
579
+ "type": "function"
580
+ },
581
+ {
582
+ "inputs": [
583
+ {
584
+ "internalType": "string",
585
+ "name": "referralCode",
586
+ "type": "string"
587
+ }
588
+ ],
589
+ "name": "getDiscountPercentage",
590
+ "outputs": [
591
+ {
592
+ "internalType": "UFixed",
593
+ "name": "discountPercentage",
594
+ "type": "uint256"
595
+ },
596
+ {
597
+ "internalType": "ReferralStatus",
598
+ "name": "status",
599
+ "type": "uint8"
600
+ }
601
+ ],
602
+ "stateMutability": "view",
603
+ "type": "function"
604
+ },
605
+ {
606
+ "inputs": [],
607
+ "name": "getDistributionFee",
608
+ "outputs": [
609
+ {
610
+ "components": [
611
+ {
612
+ "internalType": "UFixed",
613
+ "name": "fractionalFee",
614
+ "type": "uint256"
615
+ },
616
+ {
617
+ "internalType": "uint256",
618
+ "name": "fixedFee",
619
+ "type": "uint256"
620
+ }
621
+ ],
622
+ "internalType": "struct Fee",
623
+ "name": "distributionFee",
624
+ "type": "tuple"
625
+ }
626
+ ],
627
+ "stateMutability": "view",
628
+ "type": "function"
629
+ },
630
+ {
631
+ "inputs": [
632
+ {
633
+ "internalType": "address",
634
+ "name": "distributor",
635
+ "type": "address"
636
+ }
637
+ ],
638
+ "name": "getDistributorNftId",
639
+ "outputs": [
640
+ {
641
+ "internalType": "NftId",
642
+ "name": "distributorNftId",
643
+ "type": "uint96"
644
+ }
645
+ ],
646
+ "stateMutability": "view",
647
+ "type": "function"
648
+ },
414
649
  {
415
650
  "inputs": [],
416
651
  "name": "getInitialInfo",
@@ -463,11 +698,11 @@
463
698
  },
464
699
  {
465
700
  "inputs": [],
466
- "name": "getInitialOwner",
701
+ "name": "getInstance",
467
702
  "outputs": [
468
703
  {
469
- "internalType": "address",
470
- "name": "",
704
+ "internalType": "contract IInstance",
705
+ "name": "instance",
471
706
  "type": "address"
472
707
  }
473
708
  ],
@@ -476,11 +711,11 @@
476
711
  },
477
712
  {
478
713
  "inputs": [],
479
- "name": "getInstance",
714
+ "name": "getInstanceReader",
480
715
  "outputs": [
481
716
  {
482
- "internalType": "contract IInstance",
483
- "name": "instance",
717
+ "internalType": "contract InstanceReader",
718
+ "name": "reader",
484
719
  "type": "address"
485
720
  }
486
721
  ],
@@ -565,6 +800,25 @@
565
800
  "stateMutability": "view",
566
801
  "type": "function"
567
802
  },
803
+ {
804
+ "inputs": [
805
+ {
806
+ "internalType": "string",
807
+ "name": "referralCode",
808
+ "type": "string"
809
+ }
810
+ ],
811
+ "name": "getReferralId",
812
+ "outputs": [
813
+ {
814
+ "internalType": "ReferralId",
815
+ "name": "referralId",
816
+ "type": "bytes8"
817
+ }
818
+ ],
819
+ "stateMutability": "view",
820
+ "type": "function"
821
+ },
568
822
  {
569
823
  "inputs": [],
570
824
  "name": "getRegistry",
@@ -580,7 +834,39 @@
580
834
  },
581
835
  {
582
836
  "inputs": [],
583
- "name": "getSetupInfo",
837
+ "name": "getRegistryAddress",
838
+ "outputs": [
839
+ {
840
+ "internalType": "address",
841
+ "name": "",
842
+ "type": "address"
843
+ }
844
+ ],
845
+ "stateMutability": "view",
846
+ "type": "function"
847
+ },
848
+ {
849
+ "inputs": [
850
+ {
851
+ "internalType": "ObjectType",
852
+ "name": "domain",
853
+ "type": "uint8"
854
+ }
855
+ ],
856
+ "name": "getServiceAddress",
857
+ "outputs": [
858
+ {
859
+ "internalType": "address",
860
+ "name": "service",
861
+ "type": "address"
862
+ }
863
+ ],
864
+ "stateMutability": "view",
865
+ "type": "function"
866
+ },
867
+ {
868
+ "inputs": [],
869
+ "name": "getSetupInfo",
584
870
  "outputs": [
585
871
  {
586
872
  "components": [
@@ -611,11 +897,6 @@
611
897
  "name": "distributionFee",
612
898
  "type": "tuple"
613
899
  },
614
- {
615
- "internalType": "bool",
616
- "name": "isIntercepting",
617
- "type": "bool"
618
- },
619
900
  {
620
901
  "internalType": "address",
621
902
  "name": "wallet",
@@ -656,6 +937,185 @@
656
937
  "stateMutability": "view",
657
938
  "type": "function"
658
939
  },
940
+ {
941
+ "inputs": [
942
+ {
943
+ "internalType": "address",
944
+ "name": "registry",
945
+ "type": "address"
946
+ },
947
+ {
948
+ "internalType": "NftId",
949
+ "name": "instanceNftId",
950
+ "type": "uint96"
951
+ },
952
+ {
953
+ "internalType": "string",
954
+ "name": "name",
955
+ "type": "string"
956
+ },
957
+ {
958
+ "internalType": "address",
959
+ "name": "token",
960
+ "type": "address"
961
+ },
962
+ {
963
+ "internalType": "ObjectType",
964
+ "name": "componentType",
965
+ "type": "uint8"
966
+ },
967
+ {
968
+ "internalType": "bool",
969
+ "name": "isInterceptor",
970
+ "type": "bool"
971
+ },
972
+ {
973
+ "internalType": "address",
974
+ "name": "initialOwner",
975
+ "type": "address"
976
+ },
977
+ {
978
+ "internalType": "bytes",
979
+ "name": "data",
980
+ "type": "bytes"
981
+ }
982
+ ],
983
+ "name": "initializeComponent",
984
+ "outputs": [],
985
+ "stateMutability": "nonpayable",
986
+ "type": "function"
987
+ },
988
+ {
989
+ "inputs": [
990
+ {
991
+ "internalType": "address",
992
+ "name": "registry",
993
+ "type": "address"
994
+ },
995
+ {
996
+ "internalType": "NftId",
997
+ "name": "instanceNftId",
998
+ "type": "uint96"
999
+ },
1000
+ {
1001
+ "internalType": "string",
1002
+ "name": "name",
1003
+ "type": "string"
1004
+ },
1005
+ {
1006
+ "internalType": "address",
1007
+ "name": "token",
1008
+ "type": "address"
1009
+ },
1010
+ {
1011
+ "components": [
1012
+ {
1013
+ "internalType": "UFixed",
1014
+ "name": "fractionalFee",
1015
+ "type": "uint256"
1016
+ },
1017
+ {
1018
+ "internalType": "uint256",
1019
+ "name": "fixedFee",
1020
+ "type": "uint256"
1021
+ }
1022
+ ],
1023
+ "internalType": "struct Fee",
1024
+ "name": "distributionFee",
1025
+ "type": "tuple"
1026
+ },
1027
+ {
1028
+ "internalType": "address",
1029
+ "name": "initialOwner",
1030
+ "type": "address"
1031
+ },
1032
+ {
1033
+ "internalType": "bytes",
1034
+ "name": "data",
1035
+ "type": "bytes"
1036
+ }
1037
+ ],
1038
+ "name": "initializeDistribution",
1039
+ "outputs": [],
1040
+ "stateMutability": "nonpayable",
1041
+ "type": "function"
1042
+ },
1043
+ {
1044
+ "inputs": [],
1045
+ "name": "initializeERC165",
1046
+ "outputs": [],
1047
+ "stateMutability": "nonpayable",
1048
+ "type": "function"
1049
+ },
1050
+ {
1051
+ "inputs": [
1052
+ {
1053
+ "internalType": "address",
1054
+ "name": "initialOwner",
1055
+ "type": "address"
1056
+ },
1057
+ {
1058
+ "internalType": "address",
1059
+ "name": "registryAddress",
1060
+ "type": "address"
1061
+ }
1062
+ ],
1063
+ "name": "initializeNftOwnable",
1064
+ "outputs": [],
1065
+ "stateMutability": "nonpayable",
1066
+ "type": "function"
1067
+ },
1068
+ {
1069
+ "inputs": [
1070
+ {
1071
+ "internalType": "address",
1072
+ "name": "registryAddress",
1073
+ "type": "address"
1074
+ },
1075
+ {
1076
+ "internalType": "NftId",
1077
+ "name": "parentNftId",
1078
+ "type": "uint96"
1079
+ },
1080
+ {
1081
+ "internalType": "ObjectType",
1082
+ "name": "objectType",
1083
+ "type": "uint8"
1084
+ },
1085
+ {
1086
+ "internalType": "bool",
1087
+ "name": "isInterceptor",
1088
+ "type": "bool"
1089
+ },
1090
+ {
1091
+ "internalType": "address",
1092
+ "name": "initialOwner",
1093
+ "type": "address"
1094
+ },
1095
+ {
1096
+ "internalType": "bytes",
1097
+ "name": "data",
1098
+ "type": "bytes"
1099
+ }
1100
+ ],
1101
+ "name": "initializeRegisterable",
1102
+ "outputs": [],
1103
+ "stateMutability": "nonpayable",
1104
+ "type": "function"
1105
+ },
1106
+ {
1107
+ "inputs": [
1108
+ {
1109
+ "internalType": "address",
1110
+ "name": "registryAddress",
1111
+ "type": "address"
1112
+ }
1113
+ ],
1114
+ "name": "initializeRegistryLinked",
1115
+ "outputs": [],
1116
+ "stateMutability": "nonpayable",
1117
+ "type": "function"
1118
+ },
659
1119
  {
660
1120
  "inputs": [],
661
1121
  "name": "isConsumingScheduledOp",
@@ -669,6 +1129,38 @@
669
1129
  "stateMutability": "view",
670
1130
  "type": "function"
671
1131
  },
1132
+ {
1133
+ "inputs": [
1134
+ {
1135
+ "internalType": "address",
1136
+ "name": "candidate",
1137
+ "type": "address"
1138
+ }
1139
+ ],
1140
+ "name": "isDistributor",
1141
+ "outputs": [
1142
+ {
1143
+ "internalType": "bool",
1144
+ "name": "",
1145
+ "type": "bool"
1146
+ }
1147
+ ],
1148
+ "stateMutability": "view",
1149
+ "type": "function"
1150
+ },
1151
+ {
1152
+ "inputs": [],
1153
+ "name": "isNftInterceptor",
1154
+ "outputs": [
1155
+ {
1156
+ "internalType": "bool",
1157
+ "name": "isInterceptor",
1158
+ "type": "bool"
1159
+ }
1160
+ ],
1161
+ "stateMutability": "view",
1162
+ "type": "function"
1163
+ },
672
1164
  {
673
1165
  "inputs": [],
674
1166
  "name": "isVerifying",
@@ -696,6 +1188,29 @@
696
1188
  "stateMutability": "nonpayable",
697
1189
  "type": "function"
698
1190
  },
1191
+ {
1192
+ "inputs": [
1193
+ {
1194
+ "internalType": "address",
1195
+ "name": "from",
1196
+ "type": "address"
1197
+ },
1198
+ {
1199
+ "internalType": "address",
1200
+ "name": "to",
1201
+ "type": "address"
1202
+ },
1203
+ {
1204
+ "internalType": "uint256",
1205
+ "name": "tokenId",
1206
+ "type": "uint256"
1207
+ }
1208
+ ],
1209
+ "name": "nftTransferFrom",
1210
+ "outputs": [],
1211
+ "stateMutability": "nonpayable",
1212
+ "type": "function"
1213
+ },
699
1214
  {
700
1215
  "inputs": [
701
1216
  {
@@ -723,7 +1238,7 @@
723
1238
  },
724
1239
  {
725
1240
  "internalType": "uint256",
726
- "name": "feeAmount",
1241
+ "name": "premiumAmount",
727
1242
  "type": "uint256"
728
1243
  }
729
1244
  ],
@@ -751,6 +1266,19 @@
751
1266
  "stateMutability": "view",
752
1267
  "type": "function"
753
1268
  },
1269
+ {
1270
+ "inputs": [
1271
+ {
1272
+ "internalType": "bytes4",
1273
+ "name": "interfaceId",
1274
+ "type": "bytes4"
1275
+ }
1276
+ ],
1277
+ "name": "registerInterface",
1278
+ "outputs": [],
1279
+ "stateMutability": "nonpayable",
1280
+ "type": "function"
1281
+ },
754
1282
  {
755
1283
  "inputs": [
756
1284
  {
@@ -840,6 +1368,29 @@
840
1368
  "outputs": [],
841
1369
  "stateMutability": "nonpayable",
842
1370
  "type": "function"
1371
+ },
1372
+ {
1373
+ "inputs": [
1374
+ {
1375
+ "internalType": "NftId",
1376
+ "name": "distributorNftId",
1377
+ "type": "uint96"
1378
+ },
1379
+ {
1380
+ "internalType": "DistributorType",
1381
+ "name": "distributorType",
1382
+ "type": "bytes8"
1383
+ },
1384
+ {
1385
+ "internalType": "bytes",
1386
+ "name": "data",
1387
+ "type": "bytes"
1388
+ }
1389
+ ],
1390
+ "name": "updateDistributorType",
1391
+ "outputs": [],
1392
+ "stateMutability": "nonpayable",
1393
+ "type": "function"
843
1394
  }
844
1395
  ],
845
1396
  "bytecode": "0x",