@etherisc/gif-next 0.0.2-b9e9dc3-713 → 0.0.2-bb7b80e-316

Sign up to get free protection for your applications and to get access to all the features.
Files changed (271) hide show
  1. package/README.md +67 -1
  2. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +1 -1
  3. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.json +179 -0
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +166 -90
  6. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +1 -1
  7. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.json +141 -0
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +28 -2
  11. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +5 -5
  13. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  14. package/artifacts/contracts/components/Pool.sol/Pool.json +198 -119
  15. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  16. package/artifacts/contracts/components/Product.sol/Product.json +178 -146
  17. package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.dbg.json +1 -1
  18. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.dbg.json +1 -1
  19. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.dbg.json +1 -1
  20. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
  21. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  22. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  23. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  24. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  26. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  28. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  29. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  30. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
  31. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
  32. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
  33. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
  34. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
  35. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +2 -2
  36. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
  37. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +2 -2
  38. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  39. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  40. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +4 -0
  41. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.json +1206 -0
  42. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +4 -0
  43. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +788 -0
  44. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +4 -0
  45. package/artifacts/contracts/instance/{AccessManagedSimple.sol/AccessManagedSimple.json → Cloneable.sol/Cloneable.json} +86 -2
  46. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  47. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +1478 -28
  48. package/artifacts/contracts/instance/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
  49. package/artifacts/contracts/instance/IInstanceBase.sol/IInstanceBase.json +448 -0
  50. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  51. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +162 -13
  52. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  53. package/artifacts/contracts/instance/Instance.sol/Instance.json +175 -625
  54. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
  55. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +244 -114
  56. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +4 -0
  57. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.json +763 -0
  58. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  59. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +202 -37
  60. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  61. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +308 -48
  62. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  63. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +57 -21
  64. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +4 -0
  65. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +285 -0
  66. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +1 -1
  67. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.json +60 -9
  68. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +1 -1
  69. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +0 -13
  70. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  71. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  72. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  73. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +2 -2
  74. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  75. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +2 -2
  76. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
  77. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +59 -16
  78. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
  79. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
  80. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
  81. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
  82. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +1 -1
  83. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +1 -1
  84. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +4 -0
  85. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +1031 -0
  86. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +4 -0
  87. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +436 -0
  88. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  89. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +693 -0
  90. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +4 -0
  91. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +420 -0
  92. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +4 -0
  93. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +720 -0
  94. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  95. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +13 -13
  96. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +4 -0
  97. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +771 -0
  98. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  99. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +15 -77
  100. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  101. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +25 -240
  102. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +4 -0
  103. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +1156 -0
  104. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +4 -0
  105. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +492 -0
  106. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +4 -0
  107. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +727 -0
  108. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +4 -0
  109. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +420 -0
  110. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +4 -0
  111. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +777 -0
  112. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +4 -0
  113. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +420 -0
  114. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  115. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +2 -2
  116. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  117. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +263 -63
  118. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  119. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +187 -83
  120. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  121. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  122. package/artifacts/contracts/registry/Registry.sol/Registry.json +233 -192
  123. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +4 -0
  124. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +285 -0
  125. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  126. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +31 -97
  127. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  128. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +38 -91
  129. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +4 -0
  130. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +530 -0
  131. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +4 -0
  132. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +397 -0
  133. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
  134. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  135. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +2 -2
  136. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  137. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  138. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +4 -0
  139. package/artifacts/contracts/{instance/base → shared}/IService.sol/IService.json +14 -14
  140. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  141. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  142. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +2 -2
  143. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  144. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +2 -2
  145. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  146. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +4 -4
  147. package/artifacts/contracts/shared/RegisterableUpgradable.sol/RegisterableUpgradable.dbg.json +4 -0
  148. package/artifacts/contracts/{instance/service/IComponentOwnerService.sol/IComponentOwnerService.json → shared/RegisterableUpgradable.sol/RegisterableUpgradable.json} +57 -81
  149. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +4 -0
  150. package/artifacts/contracts/{instance/base/ServiceBase.sol/ServiceBase.json → shared/Service.sol/Service.json} +15 -15
  151. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  152. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  153. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +2 -2
  154. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  155. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  156. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  157. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +4 -4
  158. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  159. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +2 -2
  160. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  161. package/artifacts/contracts/test/TestService.sol/TestService.json +31 -31
  162. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  163. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  164. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +2 -2
  165. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  166. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +2 -2
  167. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  168. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  169. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  170. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  171. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  172. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  173. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  174. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  175. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  176. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +26 -3
  177. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +1 -1
  178. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  179. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +1 -1
  180. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +1 -1
  181. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
  182. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +2 -2
  183. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  184. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  185. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  186. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
  187. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
  188. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  189. package/artifacts/contracts/types/Version.sol/VersionLib.json +2 -2
  190. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  191. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +22 -3
  192. package/contracts/components/BaseComponent.sol +99 -17
  193. package/contracts/components/Distribution.sol +15 -27
  194. package/contracts/components/IBaseComponent.sol +12 -1
  195. package/contracts/components/IDistributionComponent.sol +1 -0
  196. package/contracts/components/IPoolComponent.sol +5 -1
  197. package/contracts/components/IProductComponent.sol +2 -2
  198. package/contracts/components/Pool.sol +45 -46
  199. package/contracts/components/Product.sol +56 -58
  200. package/contracts/instance/AccessManagerUpgradeableInitializeable.sol +23 -0
  201. package/contracts/instance/BundleManager.sol +129 -0
  202. package/contracts/instance/Cloneable.sol +46 -0
  203. package/contracts/instance/IInstance.sol +41 -9
  204. package/contracts/instance/IInstanceBase.sol +25 -0
  205. package/contracts/instance/IInstanceService.sol +30 -7
  206. package/contracts/instance/Instance.sol +62 -236
  207. package/contracts/instance/InstanceAccessManager.sol +93 -78
  208. package/contracts/instance/InstanceBase.sol +39 -0
  209. package/contracts/instance/InstanceReader.sol +36 -1
  210. package/contracts/instance/InstanceService.sol +295 -52
  211. package/contracts/instance/InstanceServiceManager.sol +10 -12
  212. package/contracts/instance/ObjectManager.sol +101 -0
  213. package/contracts/instance/base/ComponentServiceBase.sol +49 -22
  214. package/contracts/instance/base/IInstanceBase.sol +0 -2
  215. package/contracts/instance/module/IAccess.sol +27 -17
  216. package/contracts/instance/module/IBundle.sol +1 -0
  217. package/contracts/instance/module/ISetup.sol +3 -0
  218. package/contracts/instance/service/BundleService.sol +294 -0
  219. package/contracts/instance/service/BundleServiceManager.sol +51 -0
  220. package/contracts/instance/service/DistributionService.sol +120 -0
  221. package/contracts/instance/service/DistributionServiceManager.sol +51 -0
  222. package/contracts/instance/service/IBundleService.sol +44 -0
  223. package/contracts/instance/service/IDistributionService.sol +1 -1
  224. package/contracts/instance/service/IPolicyService.sol +94 -0
  225. package/contracts/instance/service/IPoolService.sol +7 -24
  226. package/contracts/instance/service/IProductService.sol +7 -74
  227. package/contracts/instance/service/PolicyService.sol +539 -0
  228. package/contracts/instance/service/PolicyServiceManager.sol +54 -0
  229. package/contracts/instance/service/PoolService.sol +145 -0
  230. package/contracts/instance/service/PoolServiceManager.sol +51 -0
  231. package/contracts/instance/service/ProductService.sol +213 -0
  232. package/contracts/instance/service/ProductServiceManager.sol +54 -0
  233. package/contracts/registry/ChainNft.sol +1 -1
  234. package/contracts/registry/IRegistry.sol +40 -6
  235. package/contracts/registry/IRegistryService.sol +53 -30
  236. package/contracts/registry/Registry.sol +172 -199
  237. package/contracts/registry/RegistryAccessManager.sol +210 -0
  238. package/contracts/registry/RegistryService.sol +88 -208
  239. package/contracts/registry/RegistryServiceManager.sol +20 -22
  240. package/contracts/registry/ReleaseManager.sol +342 -0
  241. package/contracts/registry/TokenRegistry.sol +110 -0
  242. package/contracts/shared/ERC165.sol +6 -2
  243. package/contracts/shared/IService.sol +16 -0
  244. package/contracts/shared/NftOwnable.sol +2 -4
  245. package/contracts/shared/ProxyManager.sol +1 -1
  246. package/contracts/shared/Registerable.sol +1 -0
  247. package/contracts/shared/RegisterableUpgradable.sol +16 -0
  248. package/contracts/shared/Service.sol +58 -0
  249. package/contracts/test/TestService.sol +6 -7
  250. package/contracts/types/NftIdSet.sol +26 -24
  251. package/contracts/types/RoleId.sol +14 -6
  252. package/contracts/types/StateId.sol +4 -0
  253. package/contracts/types/Version.sol +4 -1
  254. package/package.json +1 -1
  255. package/artifacts/contracts/instance/AccessManagedSimple.sol/AccessManagedSimple.dbg.json +0 -4
  256. package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.dbg.json +0 -4
  257. package/artifacts/contracts/instance/AccessManagerSimple.sol/AccessManagerSimple.json +0 -1119
  258. package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.dbg.json +0 -4
  259. package/artifacts/contracts/instance/IAccessManagerSimple.sol/IAccessManagerSimple.json +0 -1082
  260. package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +0 -4
  261. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +0 -4
  262. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +0 -4
  263. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +0 -827
  264. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +0 -4
  265. package/contracts/instance/AccessManagedSimple.sol +0 -114
  266. package/contracts/instance/AccessManagerSimple.sol +0 -682
  267. package/contracts/instance/IAccessManagerSimple.sol +0 -391
  268. package/contracts/instance/base/IService.sol +0 -15
  269. package/contracts/instance/base/ServiceBase.sol +0 -44
  270. package/contracts/instance/service/ComponentOwnerService.sol +0 -317
  271. package/contracts/instance/service/IComponentOwnerService.sol +0 -20
package/README.md CHANGED
@@ -51,7 +51,7 @@ hh docgen
51
51
  The resulting markdown files are written to `docs`
52
52
 
53
53
 
54
- ### Deployment
54
+ ### Full protocol deployment
55
55
 
56
56
  Install the dependencies before running the script below for the first time.
57
57
 
@@ -81,6 +81,25 @@ Environment variables:
81
81
  - `WALLET_MNEMONIC` the mnemonic of the wallet to use for deployment (required for mumbai and mainnet)
82
82
  - `ETHERSCAN_API_KEY` `POLYGONSCAN_API_KEY` the api key for etherscan/polygonscan (required for mumbai and mainnet)
83
83
 
84
+ ### Create a new instance
85
+
86
+ Requires previous step to be completed.
87
+
88
+ ```bash
89
+ # set appropriate values vor env variables (see below)
90
+
91
+ hh run --network <networkname> scripts/new_instance.ts
92
+ ```
93
+
94
+ Currently an HD wallet is expected to be used for the deployment. The mnemonic of the wallet needs to be provided via the `WALLET_MNEMONIC` environment variable.
95
+ The instance owner will be the 11th address of the wallet.
96
+
97
+ Environment variables:
98
+
99
+ - `WEB3_INFURA_PROJECT_ID` set to infura project id (required for mumbai and mainnet)
100
+ - `WALLET_MNEMONIC` the mnemonic of the wallet to use for deployment (required for mumbai and mainnet)
101
+ - `REGISTRY_ADDRESS` the address of the registry that is already deployed and configured and has a valid master instance
102
+
84
103
 
85
104
  ### Console
86
105
 
@@ -119,7 +138,11 @@ forge test -vvvv --mt test_decimals
119
138
  # provide gas report for a single test
120
139
  forge test --mt test_decimals --gas-report
121
140
 
141
+ # provide code coverage report
122
142
  forge coverage
143
+ forge coverage --report lcov
144
+
145
+
123
146
  ```
124
147
 
125
148
  Chisel session
@@ -415,3 +438,46 @@ Distribution Service
415
438
  - registered via registry service by registry owner
416
439
  - registers distribution components for registered products via registry service by distribution owner (distribution owner role is permissend by the product's instance)
417
440
  - registers distributors for registered distribution components via registry service
441
+
442
+ ## Contract Organisation
443
+
444
+ now
445
+
446
+ contracts
447
+ components
448
+ instance
449
+ registry
450
+ shared
451
+ types
452
+
453
+
454
+ contracts
455
+ component
456
+ pool
457
+ Pool.sol
458
+ PoolService.sol
459
+ oracle
460
+ distribution
461
+ product
462
+ Product.sol
463
+ ProductService.sol
464
+ Component.sol
465
+ ComponentService.sol
466
+ instance
467
+ Instance.sol
468
+ InstanceAccessManager.sol
469
+ InstanceReader.sol
470
+ InstanceService.sol
471
+ InstanceServiceManager.sol
472
+ registry
473
+ ChainNft.sol
474
+ Registry.sol
475
+ RegistryService.sol
476
+ RegistryServiceManager.sol
477
+ shared
478
+ Registerable.sol
479
+ RegisterableUpgradable.sol
480
+ type
481
+ NftId.sol
482
+ ObjectType.sol
483
+
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/a8e0e3f537ba4656e5a360abc248c3a6.json"
3
+ "buildInfo": "../../../build-info/2ed28d37f387338e4c50355843a72c1f.json"
4
4
  }
@@ -3,6 +3,28 @@
3
3
  "contractName": "BaseComponent",
4
4
  "sourceName": "contracts/components/BaseComponent.sol",
5
5
  "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "address",
10
+ "name": "target",
11
+ "type": "address"
12
+ }
13
+ ],
14
+ "name": "AddressEmptyCode",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "inputs": [
19
+ {
20
+ "internalType": "address",
21
+ "name": "account",
22
+ "type": "address"
23
+ }
24
+ ],
25
+ "name": "AddressInsufficientBalance",
26
+ "type": "error"
27
+ },
6
28
  {
7
29
  "inputs": [
8
30
  {
@@ -19,6 +41,70 @@
19
41
  "name": "ErrorAlreadyLinked",
20
42
  "type": "error"
21
43
  },
44
+ {
45
+ "inputs": [
46
+ {
47
+ "internalType": "address",
48
+ "name": "caller",
49
+ "type": "address"
50
+ }
51
+ ],
52
+ "name": "ErrorBaseComponentNotProductService",
53
+ "type": "error"
54
+ },
55
+ {
56
+ "inputs": [
57
+ {
58
+ "internalType": "address",
59
+ "name": "caller",
60
+ "type": "address"
61
+ },
62
+ {
63
+ "internalType": "uint64",
64
+ "name": "requiredRoleIdNum",
65
+ "type": "uint64"
66
+ }
67
+ ],
68
+ "name": "ErrorBaseComponentUnauthorized",
69
+ "type": "error"
70
+ },
71
+ {
72
+ "inputs": [
73
+ {
74
+ "internalType": "address",
75
+ "name": "newWallet",
76
+ "type": "address"
77
+ }
78
+ ],
79
+ "name": "ErrorBaseComponentWalletAddressIsSameAsCurrent",
80
+ "type": "error"
81
+ },
82
+ {
83
+ "inputs": [
84
+ {
85
+ "internalType": "address",
86
+ "name": "oldWallet",
87
+ "type": "address"
88
+ },
89
+ {
90
+ "internalType": "address",
91
+ "name": "newWallet",
92
+ "type": "address"
93
+ },
94
+ {
95
+ "internalType": "uint256",
96
+ "name": "allowance",
97
+ "type": "uint256"
98
+ },
99
+ {
100
+ "internalType": "uint256",
101
+ "name": "balance",
102
+ "type": "uint256"
103
+ }
104
+ ],
105
+ "name": "ErrorBaseComponentWalletAllowanceTooSmall",
106
+ "type": "error"
107
+ },
22
108
  {
23
109
  "inputs": [
24
110
  {
@@ -84,6 +170,11 @@
84
170
  "name": "ErrorRegistryNotInitialized",
85
171
  "type": "error"
86
172
  },
173
+ {
174
+ "inputs": [],
175
+ "name": "FailedInnerCall",
176
+ "type": "error"
177
+ },
87
178
  {
88
179
  "inputs": [],
89
180
  "name": "InvalidInitialization",
@@ -94,6 +185,17 @@
94
185
  "name": "NotInitializing",
95
186
  "type": "error"
96
187
  },
188
+ {
189
+ "inputs": [
190
+ {
191
+ "internalType": "address",
192
+ "name": "token",
193
+ "type": "address"
194
+ }
195
+ ],
196
+ "name": "SafeERC20FailedOperation",
197
+ "type": "error"
198
+ },
97
199
  {
98
200
  "anonymous": false,
99
201
  "inputs": [
@@ -107,6 +209,44 @@
107
209
  "name": "Initialized",
108
210
  "type": "event"
109
211
  },
212
+ {
213
+ "anonymous": false,
214
+ "inputs": [
215
+ {
216
+ "indexed": false,
217
+ "internalType": "address",
218
+ "name": "newWallet",
219
+ "type": "address"
220
+ }
221
+ ],
222
+ "name": "LogBaseComponentWalletAddressChanged",
223
+ "type": "event"
224
+ },
225
+ {
226
+ "anonymous": false,
227
+ "inputs": [
228
+ {
229
+ "indexed": false,
230
+ "internalType": "address",
231
+ "name": "from",
232
+ "type": "address"
233
+ },
234
+ {
235
+ "indexed": false,
236
+ "internalType": "address",
237
+ "name": "to",
238
+ "type": "address"
239
+ },
240
+ {
241
+ "indexed": false,
242
+ "internalType": "uint256",
243
+ "name": "amount",
244
+ "type": "uint256"
245
+ }
246
+ ],
247
+ "name": "LogBaseComponentWalletTokensTransferred",
248
+ "type": "event"
249
+ },
110
250
  {
111
251
  "inputs": [],
112
252
  "name": "REGISTERABLE_LOCATION_V1",
@@ -188,6 +328,19 @@
188
328
  "stateMutability": "view",
189
329
  "type": "function"
190
330
  },
331
+ {
332
+ "inputs": [],
333
+ "name": "getName",
334
+ "outputs": [
335
+ {
336
+ "internalType": "string",
337
+ "name": "name",
338
+ "type": "string"
339
+ }
340
+ ],
341
+ "stateMutability": "pure",
342
+ "type": "function"
343
+ },
191
344
  {
192
345
  "inputs": [],
193
346
  "name": "getNftId",
@@ -280,6 +433,32 @@
280
433
  "stateMutability": "nonpayable",
281
434
  "type": "function"
282
435
  },
436
+ {
437
+ "inputs": [
438
+ {
439
+ "internalType": "NftId",
440
+ "name": "productNftId",
441
+ "type": "uint96"
442
+ }
443
+ ],
444
+ "name": "setProductNftId",
445
+ "outputs": [],
446
+ "stateMutability": "nonpayable",
447
+ "type": "function"
448
+ },
449
+ {
450
+ "inputs": [
451
+ {
452
+ "internalType": "address",
453
+ "name": "newWallet",
454
+ "type": "address"
455
+ }
456
+ ],
457
+ "name": "setWallet",
458
+ "outputs": [],
459
+ "stateMutability": "nonpayable",
460
+ "type": "function"
461
+ },
283
462
  {
284
463
  "inputs": [
285
464
  {
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/a8e0e3f537ba4656e5a360abc248c3a6.json"
3
+ "buildInfo": "../../../build-info/2ed28d37f387338e4c50355843a72c1f.json"
4
4
  }