@etherisc/gif-next 0.0.2-bf75dbb-287 → 0.0.2-bfb44e0-483

Sign up to get free protection for your applications and to get access to all the features.
Files changed (291) hide show
  1. package/README.md +73 -1
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +4 -0
  3. package/artifacts/contracts/components/Component.sol/Component.json +897 -0
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +907 -218
  6. package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +4 -0
  7. package/artifacts/contracts/components/{BaseComponent.sol/BaseComponent.json → IComponent.sol/IComponent.json} +151 -84
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +798 -0
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +662 -43
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +661 -5
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +620 -193
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +550 -115
  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 +38 -62
  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 +725 -36
  44. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  45. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +198 -20
  46. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  47. package/artifacts/contracts/instance/Instance.sol/Instance.json +490 -710
  48. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
  49. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +188 -144
  50. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  51. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +61 -97
  52. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  53. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +501 -264
  54. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  55. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +178 -100
  56. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +1 -1
  57. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +8 -32
  58. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +4 -0
  59. package/artifacts/contracts/{shared/RegisterableUpgradable.sol/RegisterableUpgradable.json → instance/base/ComponentService.sol/ComponentService.json} +321 -9
  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 +59 -16
  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 +1117 -0
  76. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +4 -0
  77. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +1318 -0
  78. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +4 -0
  79. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +586 -0
  80. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
  81. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +544 -84
  82. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
  83. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +191 -33
  84. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +4 -0
  85. package/artifacts/contracts/instance/{base/ComponentServiceBase.sol/ComponentServiceBase.json → service/IApplicationService.sol/IApplicationService.json} +207 -109
  86. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +4 -0
  87. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +798 -0
  88. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  89. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +229 -19
  90. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +4 -0
  91. package/artifacts/contracts/instance/service/{IComponentOwnerService.sol/IComponentOwnerService.json → IPolicyService.sol/IPolicyService.json} +369 -51
  92. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  93. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +28 -244
  94. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  95. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +33 -244
  96. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +4 -0
  97. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +1378 -0
  98. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +4 -0
  99. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +642 -0
  100. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  101. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +259 -351
  102. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
  103. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +166 -56
  104. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  105. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +270 -410
  106. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
  107. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +166 -80
  108. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  109. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +2 -2
  110. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  111. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +225 -133
  112. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  113. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +146 -94
  114. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  115. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  116. package/artifacts/contracts/registry/Registry.sol/Registry.json +238 -235
  117. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +4 -0
  118. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +285 -0
  119. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  120. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +214 -156
  121. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  122. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +181 -97
  123. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +4 -0
  124. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +547 -0
  125. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
  126. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +150 -29
  127. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
  128. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  129. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +41 -3
  130. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  131. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +37 -0
  132. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +4 -0
  133. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +129 -0
  134. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  135. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +18 -5
  136. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
  137. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.json +69 -0
  138. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
  139. package/artifacts/contracts/shared/IService.sol/IService.json +32 -19
  140. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  141. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +2 -2
  142. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  143. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +156 -11
  144. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +4 -0
  145. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +269 -0
  146. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  147. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +156 -6
  148. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  149. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +152 -11
  150. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +4 -0
  151. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +105 -0
  152. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
  153. package/artifacts/contracts/shared/Service.sol/Service.json +178 -19
  154. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  155. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  156. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +2 -2
  157. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  158. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +2 -2
  159. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  160. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  161. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +152 -11
  162. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  163. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +2 -2
  164. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  165. package/artifacts/contracts/test/TestService.sol/TestService.json +196 -37
  166. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  167. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  168. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  169. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +8 -8
  170. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  171. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  172. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  173. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  174. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  175. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +2 -2
  176. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  177. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  178. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
  179. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  180. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
  181. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  182. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
  183. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +1 -1
  184. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  185. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  186. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +1 -1
  187. package/artifacts/contracts/types/Referral.sol/ReferralLib.json +2 -2
  188. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +1 -1
  189. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +2 -2
  190. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
  191. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +2 -2
  192. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  193. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  194. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
  195. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
  196. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  197. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  198. package/contracts/components/Component.sol +236 -0
  199. package/contracts/components/Distribution.sol +199 -64
  200. package/contracts/components/IComponent.sol +50 -0
  201. package/contracts/components/IDistributionComponent.sol +59 -3
  202. package/contracts/components/IPoolComponent.sol +50 -29
  203. package/contracts/components/IProductComponent.sol +7 -3
  204. package/contracts/components/Pool.sol +136 -149
  205. package/contracts/components/Product.sol +104 -115
  206. package/contracts/instance/BundleManager.sol +7 -11
  207. package/contracts/instance/IInstance.sol +39 -9
  208. package/contracts/instance/IInstanceService.sol +29 -4
  209. package/contracts/instance/Instance.sol +78 -251
  210. package/contracts/instance/InstanceAccessManager.sol +87 -78
  211. package/contracts/instance/InstanceReader.sol +3 -25
  212. package/contracts/instance/InstanceService.sol +306 -137
  213. package/contracts/instance/InstanceServiceManager.sol +5 -8
  214. package/contracts/instance/ObjectManager.sol +7 -24
  215. package/contracts/instance/base/ComponentService.sol +134 -0
  216. package/contracts/instance/module/IAccess.sol +27 -18
  217. package/contracts/instance/module/ISetup.sol +5 -4
  218. package/contracts/instance/service/ApplicationService.sol +268 -0
  219. package/contracts/instance/service/BundleService.sol +298 -0
  220. package/contracts/instance/service/BundleServiceManager.sol +51 -0
  221. package/contracts/instance/service/DistributionService.sol +212 -26
  222. package/contracts/instance/service/DistributionServiceManager.sol +6 -9
  223. package/contracts/instance/service/IApplicationService.sol +82 -0
  224. package/contracts/instance/service/IBundleService.sol +54 -0
  225. package/contracts/instance/service/IDistributionService.sol +53 -0
  226. package/contracts/instance/service/IPolicyService.sol +88 -0
  227. package/contracts/instance/service/IPoolService.sol +2 -33
  228. package/contracts/instance/service/IProductService.sol +2 -72
  229. package/contracts/instance/service/PolicyService.sol +524 -0
  230. package/contracts/instance/service/PolicyServiceManager.sol +54 -0
  231. package/contracts/instance/service/PoolService.sol +34 -212
  232. package/contracts/instance/service/PoolServiceManager.sol +5 -8
  233. package/contracts/instance/service/ProductService.sol +123 -460
  234. package/contracts/registry/ChainNft.sol +1 -1
  235. package/contracts/registry/IRegistry.sol +37 -19
  236. package/contracts/registry/IRegistryService.sol +28 -13
  237. package/contracts/registry/Registry.sol +231 -217
  238. package/contracts/registry/RegistryAccessManager.sol +216 -0
  239. package/contracts/registry/RegistryService.sol +65 -162
  240. package/contracts/registry/RegistryServiceManager.sol +18 -36
  241. package/contracts/registry/ReleaseManager.sol +332 -0
  242. package/contracts/registry/TokenRegistry.sol +11 -9
  243. package/contracts/shared/ERC165.sol +12 -11
  244. package/contracts/shared/INftOwnable.sol +12 -6
  245. package/contracts/shared/IPolicyHolder.sol +26 -0
  246. package/contracts/shared/IRegisterable.sol +4 -6
  247. package/contracts/shared/IRegistryLinked.sol +15 -0
  248. package/contracts/shared/IService.sol +2 -1
  249. package/contracts/shared/IVersionable.sol +2 -2
  250. package/contracts/shared/NftOwnable.sol +113 -57
  251. package/contracts/shared/PolicyHolder.sol +81 -0
  252. package/contracts/shared/ProxyManager.sol +6 -5
  253. package/contracts/shared/Registerable.sol +15 -24
  254. package/contracts/shared/RegistryLinked.sol +64 -0
  255. package/contracts/shared/Service.sol +18 -13
  256. package/contracts/shared/Versionable.sol +3 -2
  257. package/contracts/test/TestRegisterable.sol +1 -1
  258. package/contracts/test/TestService.sol +4 -3
  259. package/contracts/types/DistributorType.sol +2 -2
  260. package/contracts/types/ObjectType.sol +6 -2
  261. package/contracts/types/RoleId.sol +10 -10
  262. package/package.json +3 -3
  263. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +0 -4
  264. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +0 -4
  265. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +0 -368
  266. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +0 -4
  267. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.json +0 -1206
  268. package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.dbg.json +0 -4
  269. package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.json +0 -1082
  270. package/artifacts/contracts/instance/IInstanceBase.sol/IInstanceBase.dbg.json +0 -4
  271. package/artifacts/contracts/instance/IInstanceBase.sol/IInstanceBase.json +0 -448
  272. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +0 -4
  273. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.json +0 -763
  274. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
  275. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +0 -4
  276. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +0 -113
  277. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +0 -4
  278. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +0 -827
  279. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +0 -4
  280. package/artifacts/contracts/shared/RegisterableUpgradable.sol/RegisterableUpgradable.dbg.json +0 -4
  281. package/contracts/components/BaseComponent.sol +0 -132
  282. package/contracts/components/IBaseComponent.sol +0 -31
  283. package/contracts/instance/AccessManagerUpgradeableInitializeable.sol +0 -23
  284. package/contracts/instance/IAccessManagerSimple.sol +0 -391
  285. package/contracts/instance/IInstanceBase.sol +0 -26
  286. package/contracts/instance/InstanceBase.sol +0 -41
  287. package/contracts/instance/base/ComponentServiceBase.sol +0 -134
  288. package/contracts/instance/base/IInstanceBase.sol +0 -23
  289. package/contracts/instance/service/ComponentOwnerService.sol +0 -317
  290. package/contracts/instance/service/IComponentOwnerService.sol +0 -20
  291. package/contracts/shared/RegisterableUpgradable.sol +0 -16
@@ -3,6 +3,239 @@
3
3
  "contractName": "IDistributionComponent",
4
4
  "sourceName": "contracts/components/IDistributionComponent.sol",
5
5
  "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "address",
10
+ "name": "registry",
11
+ "type": "address"
12
+ },
13
+ {
14
+ "internalType": "NftId",
15
+ "name": "nftId",
16
+ "type": "uint96"
17
+ }
18
+ ],
19
+ "name": "ErrorAlreadyLinked",
20
+ "type": "error"
21
+ },
22
+ {
23
+ "inputs": [
24
+ {
25
+ "internalType": "address",
26
+ "name": "caller",
27
+ "type": "address"
28
+ }
29
+ ],
30
+ "name": "ErrorComponentNotChainNft",
31
+ "type": "error"
32
+ },
33
+ {
34
+ "inputs": [
35
+ {
36
+ "internalType": "NftId",
37
+ "name": "instanceNftId",
38
+ "type": "uint96"
39
+ },
40
+ {
41
+ "internalType": "address",
42
+ "name": "instance",
43
+ "type": "address"
44
+ }
45
+ ],
46
+ "name": "ErrorComponentNotInstance",
47
+ "type": "error"
48
+ },
49
+ {
50
+ "inputs": [
51
+ {
52
+ "internalType": "address",
53
+ "name": "caller",
54
+ "type": "address"
55
+ }
56
+ ],
57
+ "name": "ErrorComponentNotProductService",
58
+ "type": "error"
59
+ },
60
+ {
61
+ "inputs": [],
62
+ "name": "ErrorComponentProductNftAlreadySet",
63
+ "type": "error"
64
+ },
65
+ {
66
+ "inputs": [
67
+ {
68
+ "internalType": "address",
69
+ "name": "caller",
70
+ "type": "address"
71
+ },
72
+ {
73
+ "internalType": "uint64",
74
+ "name": "requiredRoleIdNum",
75
+ "type": "uint64"
76
+ }
77
+ ],
78
+ "name": "ErrorComponentUnauthorized",
79
+ "type": "error"
80
+ },
81
+ {
82
+ "inputs": [
83
+ {
84
+ "internalType": "address",
85
+ "name": "newWallet",
86
+ "type": "address"
87
+ }
88
+ ],
89
+ "name": "ErrorComponentWalletAddressIsSameAsCurrent",
90
+ "type": "error"
91
+ },
92
+ {
93
+ "inputs": [],
94
+ "name": "ErrorComponentWalletAddressZero",
95
+ "type": "error"
96
+ },
97
+ {
98
+ "inputs": [
99
+ {
100
+ "internalType": "address",
101
+ "name": "oldWallet",
102
+ "type": "address"
103
+ },
104
+ {
105
+ "internalType": "address",
106
+ "name": "newWallet",
107
+ "type": "address"
108
+ },
109
+ {
110
+ "internalType": "uint256",
111
+ "name": "allowance",
112
+ "type": "uint256"
113
+ },
114
+ {
115
+ "internalType": "uint256",
116
+ "name": "balance",
117
+ "type": "uint256"
118
+ }
119
+ ],
120
+ "name": "ErrorComponentWalletAllowanceTooSmall",
121
+ "type": "error"
122
+ },
123
+ {
124
+ "inputs": [
125
+ {
126
+ "internalType": "address",
127
+ "name": "contractAddress",
128
+ "type": "address"
129
+ }
130
+ ],
131
+ "name": "ErrorContractNotRegistered",
132
+ "type": "error"
133
+ },
134
+ {
135
+ "inputs": [],
136
+ "name": "ErrorInitialOwnerZero",
137
+ "type": "error"
138
+ },
139
+ {
140
+ "inputs": [
141
+ {
142
+ "internalType": "address",
143
+ "name": "account",
144
+ "type": "address"
145
+ }
146
+ ],
147
+ "name": "ErrorNotOwner",
148
+ "type": "error"
149
+ },
150
+ {
151
+ "inputs": [
152
+ {
153
+ "internalType": "address",
154
+ "name": "registryAddress",
155
+ "type": "address"
156
+ }
157
+ ],
158
+ "name": "ErrorNotRegistry",
159
+ "type": "error"
160
+ },
161
+ {
162
+ "inputs": [],
163
+ "name": "ErrorRegistryAddressZero",
164
+ "type": "error"
165
+ },
166
+ {
167
+ "inputs": [
168
+ {
169
+ "internalType": "address",
170
+ "name": "registry",
171
+ "type": "address"
172
+ }
173
+ ],
174
+ "name": "ErrorRegistryAlreadyInitialized",
175
+ "type": "error"
176
+ },
177
+ {
178
+ "inputs": [],
179
+ "name": "ErrorRegistryNotInitialized",
180
+ "type": "error"
181
+ },
182
+ {
183
+ "anonymous": false,
184
+ "inputs": [
185
+ {
186
+ "indexed": false,
187
+ "internalType": "address",
188
+ "name": "newWallet",
189
+ "type": "address"
190
+ }
191
+ ],
192
+ "name": "LogComponentWalletAddressChanged",
193
+ "type": "event"
194
+ },
195
+ {
196
+ "anonymous": false,
197
+ "inputs": [
198
+ {
199
+ "indexed": false,
200
+ "internalType": "address",
201
+ "name": "from",
202
+ "type": "address"
203
+ },
204
+ {
205
+ "indexed": false,
206
+ "internalType": "address",
207
+ "name": "to",
208
+ "type": "address"
209
+ },
210
+ {
211
+ "indexed": false,
212
+ "internalType": "uint256",
213
+ "name": "amount",
214
+ "type": "uint256"
215
+ }
216
+ ],
217
+ "name": "LogComponentWalletTokensTransferred",
218
+ "type": "event"
219
+ },
220
+ {
221
+ "anonymous": false,
222
+ "inputs": [
223
+ {
224
+ "indexed": false,
225
+ "internalType": "address",
226
+ "name": "to",
227
+ "type": "address"
228
+ },
229
+ {
230
+ "indexed": false,
231
+ "internalType": "address",
232
+ "name": "caller",
233
+ "type": "address"
234
+ }
235
+ ],
236
+ "name": "LogDistributorUpdated",
237
+ "type": "event"
238
+ },
6
239
  {
7
240
  "inputs": [
8
241
  {
@@ -51,6 +284,459 @@
51
284
  "stateMutability": "view",
52
285
  "type": "function"
53
286
  },
287
+ {
288
+ "inputs": [
289
+ {
290
+ "internalType": "address",
291
+ "name": "distributor",
292
+ "type": "address"
293
+ },
294
+ {
295
+ "internalType": "DistributorType",
296
+ "name": "distributorType",
297
+ "type": "bytes8"
298
+ },
299
+ {
300
+ "internalType": "bytes",
301
+ "name": "data",
302
+ "type": "bytes"
303
+ }
304
+ ],
305
+ "name": "createDistributor",
306
+ "outputs": [
307
+ {
308
+ "internalType": "NftId",
309
+ "name": "distributorNftId",
310
+ "type": "uint96"
311
+ }
312
+ ],
313
+ "stateMutability": "nonpayable",
314
+ "type": "function"
315
+ },
316
+ {
317
+ "inputs": [
318
+ {
319
+ "internalType": "string",
320
+ "name": "name",
321
+ "type": "string"
322
+ },
323
+ {
324
+ "internalType": "UFixed",
325
+ "name": "minDiscountPercentage",
326
+ "type": "uint256"
327
+ },
328
+ {
329
+ "internalType": "UFixed",
330
+ "name": "maxDiscountPercentage",
331
+ "type": "uint256"
332
+ },
333
+ {
334
+ "internalType": "UFixed",
335
+ "name": "commissionPercentage",
336
+ "type": "uint256"
337
+ },
338
+ {
339
+ "internalType": "uint32",
340
+ "name": "maxReferralCount",
341
+ "type": "uint32"
342
+ },
343
+ {
344
+ "internalType": "uint32",
345
+ "name": "maxReferralLifetime",
346
+ "type": "uint32"
347
+ },
348
+ {
349
+ "internalType": "bool",
350
+ "name": "allowSelfReferrals",
351
+ "type": "bool"
352
+ },
353
+ {
354
+ "internalType": "bool",
355
+ "name": "allowRenewals",
356
+ "type": "bool"
357
+ },
358
+ {
359
+ "internalType": "bytes",
360
+ "name": "data",
361
+ "type": "bytes"
362
+ }
363
+ ],
364
+ "name": "createDistributorType",
365
+ "outputs": [
366
+ {
367
+ "internalType": "DistributorType",
368
+ "name": "distributorType",
369
+ "type": "bytes8"
370
+ }
371
+ ],
372
+ "stateMutability": "nonpayable",
373
+ "type": "function"
374
+ },
375
+ {
376
+ "inputs": [
377
+ {
378
+ "internalType": "NftId",
379
+ "name": "distributorNftId",
380
+ "type": "uint96"
381
+ },
382
+ {
383
+ "internalType": "string",
384
+ "name": "code",
385
+ "type": "string"
386
+ },
387
+ {
388
+ "internalType": "UFixed",
389
+ "name": "discountPercentage",
390
+ "type": "uint256"
391
+ },
392
+ {
393
+ "internalType": "uint32",
394
+ "name": "maxReferrals",
395
+ "type": "uint32"
396
+ },
397
+ {
398
+ "internalType": "Timestamp",
399
+ "name": "expiryAt",
400
+ "type": "uint40"
401
+ },
402
+ {
403
+ "internalType": "bytes",
404
+ "name": "data",
405
+ "type": "bytes"
406
+ }
407
+ ],
408
+ "name": "createReferral",
409
+ "outputs": [
410
+ {
411
+ "internalType": "ReferralId",
412
+ "name": "referralId",
413
+ "type": "bytes8"
414
+ }
415
+ ],
416
+ "stateMutability": "nonpayable",
417
+ "type": "function"
418
+ },
419
+ {
420
+ "inputs": [
421
+ {
422
+ "internalType": "string",
423
+ "name": "referralCode",
424
+ "type": "string"
425
+ }
426
+ ],
427
+ "name": "getDiscountPercentage",
428
+ "outputs": [
429
+ {
430
+ "internalType": "UFixed",
431
+ "name": "discountPercentage",
432
+ "type": "uint256"
433
+ },
434
+ {
435
+ "internalType": "ReferralStatus",
436
+ "name": "status",
437
+ "type": "uint8"
438
+ }
439
+ ],
440
+ "stateMutability": "view",
441
+ "type": "function"
442
+ },
443
+ {
444
+ "inputs": [],
445
+ "name": "getDistributionFee",
446
+ "outputs": [
447
+ {
448
+ "components": [
449
+ {
450
+ "internalType": "UFixed",
451
+ "name": "fractionalFee",
452
+ "type": "uint256"
453
+ },
454
+ {
455
+ "internalType": "uint256",
456
+ "name": "fixedFee",
457
+ "type": "uint256"
458
+ }
459
+ ],
460
+ "internalType": "struct Fee",
461
+ "name": "distibutionFee",
462
+ "type": "tuple"
463
+ }
464
+ ],
465
+ "stateMutability": "view",
466
+ "type": "function"
467
+ },
468
+ {
469
+ "inputs": [],
470
+ "name": "getInitialInfo",
471
+ "outputs": [
472
+ {
473
+ "components": [
474
+ {
475
+ "internalType": "NftId",
476
+ "name": "nftId",
477
+ "type": "uint96"
478
+ },
479
+ {
480
+ "internalType": "NftId",
481
+ "name": "parentNftId",
482
+ "type": "uint96"
483
+ },
484
+ {
485
+ "internalType": "ObjectType",
486
+ "name": "objectType",
487
+ "type": "uint8"
488
+ },
489
+ {
490
+ "internalType": "bool",
491
+ "name": "isInterceptor",
492
+ "type": "bool"
493
+ },
494
+ {
495
+ "internalType": "address",
496
+ "name": "objectAddress",
497
+ "type": "address"
498
+ },
499
+ {
500
+ "internalType": "address",
501
+ "name": "initialOwner",
502
+ "type": "address"
503
+ },
504
+ {
505
+ "internalType": "bytes",
506
+ "name": "data",
507
+ "type": "bytes"
508
+ }
509
+ ],
510
+ "internalType": "struct IRegistry.ObjectInfo",
511
+ "name": "",
512
+ "type": "tuple"
513
+ }
514
+ ],
515
+ "stateMutability": "view",
516
+ "type": "function"
517
+ },
518
+ {
519
+ "inputs": [],
520
+ "name": "getInstance",
521
+ "outputs": [
522
+ {
523
+ "internalType": "contract IInstance",
524
+ "name": "instance",
525
+ "type": "address"
526
+ }
527
+ ],
528
+ "stateMutability": "view",
529
+ "type": "function"
530
+ },
531
+ {
532
+ "inputs": [],
533
+ "name": "getInstanceService",
534
+ "outputs": [
535
+ {
536
+ "internalType": "contract IInstanceService",
537
+ "name": "",
538
+ "type": "address"
539
+ }
540
+ ],
541
+ "stateMutability": "view",
542
+ "type": "function"
543
+ },
544
+ {
545
+ "inputs": [],
546
+ "name": "getName",
547
+ "outputs": [
548
+ {
549
+ "internalType": "string",
550
+ "name": "name",
551
+ "type": "string"
552
+ }
553
+ ],
554
+ "stateMutability": "view",
555
+ "type": "function"
556
+ },
557
+ {
558
+ "inputs": [],
559
+ "name": "getNftId",
560
+ "outputs": [
561
+ {
562
+ "internalType": "NftId",
563
+ "name": "",
564
+ "type": "uint96"
565
+ }
566
+ ],
567
+ "stateMutability": "view",
568
+ "type": "function"
569
+ },
570
+ {
571
+ "inputs": [],
572
+ "name": "getOwner",
573
+ "outputs": [
574
+ {
575
+ "internalType": "address",
576
+ "name": "",
577
+ "type": "address"
578
+ }
579
+ ],
580
+ "stateMutability": "view",
581
+ "type": "function"
582
+ },
583
+ {
584
+ "inputs": [],
585
+ "name": "getProductNftId",
586
+ "outputs": [
587
+ {
588
+ "internalType": "NftId",
589
+ "name": "productNftId",
590
+ "type": "uint96"
591
+ }
592
+ ],
593
+ "stateMutability": "view",
594
+ "type": "function"
595
+ },
596
+ {
597
+ "inputs": [],
598
+ "name": "getProductService",
599
+ "outputs": [
600
+ {
601
+ "internalType": "contract IProductService",
602
+ "name": "",
603
+ "type": "address"
604
+ }
605
+ ],
606
+ "stateMutability": "view",
607
+ "type": "function"
608
+ },
609
+ {
610
+ "inputs": [
611
+ {
612
+ "internalType": "string",
613
+ "name": "referralCode",
614
+ "type": "string"
615
+ }
616
+ ],
617
+ "name": "getReferralId",
618
+ "outputs": [
619
+ {
620
+ "internalType": "ReferralId",
621
+ "name": "referralId",
622
+ "type": "bytes8"
623
+ }
624
+ ],
625
+ "stateMutability": "nonpayable",
626
+ "type": "function"
627
+ },
628
+ {
629
+ "inputs": [],
630
+ "name": "getRegistry",
631
+ "outputs": [
632
+ {
633
+ "internalType": "contract IRegistry",
634
+ "name": "",
635
+ "type": "address"
636
+ }
637
+ ],
638
+ "stateMutability": "view",
639
+ "type": "function"
640
+ },
641
+ {
642
+ "inputs": [],
643
+ "name": "getRegistryAddress",
644
+ "outputs": [
645
+ {
646
+ "internalType": "address",
647
+ "name": "",
648
+ "type": "address"
649
+ }
650
+ ],
651
+ "stateMutability": "view",
652
+ "type": "function"
653
+ },
654
+ {
655
+ "inputs": [],
656
+ "name": "getSetupInfo",
657
+ "outputs": [
658
+ {
659
+ "components": [
660
+ {
661
+ "internalType": "NftId",
662
+ "name": "productNftId",
663
+ "type": "uint96"
664
+ },
665
+ {
666
+ "internalType": "contract TokenHandler",
667
+ "name": "tokenHandler",
668
+ "type": "address"
669
+ },
670
+ {
671
+ "components": [
672
+ {
673
+ "internalType": "UFixed",
674
+ "name": "fractionalFee",
675
+ "type": "uint256"
676
+ },
677
+ {
678
+ "internalType": "uint256",
679
+ "name": "fixedFee",
680
+ "type": "uint256"
681
+ }
682
+ ],
683
+ "internalType": "struct Fee",
684
+ "name": "distributionFee",
685
+ "type": "tuple"
686
+ },
687
+ {
688
+ "internalType": "address",
689
+ "name": "wallet",
690
+ "type": "address"
691
+ }
692
+ ],
693
+ "internalType": "struct ISetup.DistributionSetupInfo",
694
+ "name": "setupInfo",
695
+ "type": "tuple"
696
+ }
697
+ ],
698
+ "stateMutability": "view",
699
+ "type": "function"
700
+ },
701
+ {
702
+ "inputs": [],
703
+ "name": "getToken",
704
+ "outputs": [
705
+ {
706
+ "internalType": "contract IERC20Metadata",
707
+ "name": "token",
708
+ "type": "address"
709
+ }
710
+ ],
711
+ "stateMutability": "view",
712
+ "type": "function"
713
+ },
714
+ {
715
+ "inputs": [],
716
+ "name": "getWallet",
717
+ "outputs": [
718
+ {
719
+ "internalType": "address",
720
+ "name": "walletAddress",
721
+ "type": "address"
722
+ }
723
+ ],
724
+ "stateMutability": "view",
725
+ "type": "function"
726
+ },
727
+ {
728
+ "inputs": [],
729
+ "name": "isNftInterceptor",
730
+ "outputs": [
731
+ {
732
+ "internalType": "bool",
733
+ "name": "isInterceptor",
734
+ "type": "bool"
735
+ }
736
+ ],
737
+ "stateMutability": "view",
738
+ "type": "function"
739
+ },
54
740
  {
55
741
  "inputs": [],
56
742
  "name": "isVerifying",
@@ -64,6 +750,43 @@
64
750
  "stateMutability": "view",
65
751
  "type": "function"
66
752
  },
753
+ {
754
+ "inputs": [],
755
+ "name": "linkToRegisteredNftId",
756
+ "outputs": [],
757
+ "stateMutability": "nonpayable",
758
+ "type": "function"
759
+ },
760
+ {
761
+ "inputs": [],
762
+ "name": "lock",
763
+ "outputs": [],
764
+ "stateMutability": "nonpayable",
765
+ "type": "function"
766
+ },
767
+ {
768
+ "inputs": [
769
+ {
770
+ "internalType": "address",
771
+ "name": "from",
772
+ "type": "address"
773
+ },
774
+ {
775
+ "internalType": "address",
776
+ "name": "to",
777
+ "type": "address"
778
+ },
779
+ {
780
+ "internalType": "uint256",
781
+ "name": "tokenId",
782
+ "type": "uint256"
783
+ }
784
+ ],
785
+ "name": "nftTransferFrom",
786
+ "outputs": [],
787
+ "stateMutability": "nonpayable",
788
+ "type": "function"
789
+ },
67
790
  {
68
791
  "inputs": [
69
792
  {
@@ -143,6 +866,81 @@
143
866
  "outputs": [],
144
867
  "stateMutability": "nonpayable",
145
868
  "type": "function"
869
+ },
870
+ {
871
+ "inputs": [
872
+ {
873
+ "internalType": "NftId",
874
+ "name": "productNftId",
875
+ "type": "uint96"
876
+ }
877
+ ],
878
+ "name": "setProductNftId",
879
+ "outputs": [],
880
+ "stateMutability": "nonpayable",
881
+ "type": "function"
882
+ },
883
+ {
884
+ "inputs": [
885
+ {
886
+ "internalType": "address",
887
+ "name": "walletAddress",
888
+ "type": "address"
889
+ }
890
+ ],
891
+ "name": "setWallet",
892
+ "outputs": [],
893
+ "stateMutability": "nonpayable",
894
+ "type": "function"
895
+ },
896
+ {
897
+ "inputs": [
898
+ {
899
+ "internalType": "bytes4",
900
+ "name": "interfaceId",
901
+ "type": "bytes4"
902
+ }
903
+ ],
904
+ "name": "supportsInterface",
905
+ "outputs": [
906
+ {
907
+ "internalType": "bool",
908
+ "name": "",
909
+ "type": "bool"
910
+ }
911
+ ],
912
+ "stateMutability": "view",
913
+ "type": "function"
914
+ },
915
+ {
916
+ "inputs": [],
917
+ "name": "unlock",
918
+ "outputs": [],
919
+ "stateMutability": "nonpayable",
920
+ "type": "function"
921
+ },
922
+ {
923
+ "inputs": [
924
+ {
925
+ "internalType": "NftId",
926
+ "name": "distributorNftId",
927
+ "type": "uint96"
928
+ },
929
+ {
930
+ "internalType": "DistributorType",
931
+ "name": "distributorType",
932
+ "type": "bytes8"
933
+ },
934
+ {
935
+ "internalType": "bytes",
936
+ "name": "data",
937
+ "type": "bytes"
938
+ }
939
+ ],
940
+ "name": "updateDistributorType",
941
+ "outputs": [],
942
+ "stateMutability": "nonpayable",
943
+ "type": "function"
146
944
  }
147
945
  ],
148
946
  "bytecode": "0x",