@etherisc/gif-next 0.0.2-e5a2253-213 → 0.0.2-e69072e-892

Sign up to get free protection for your applications and to get access to all the features.
Files changed (337) 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/{BaseComponent.sol/BaseComponent.json → Component.sol/Component.json} +340 -59
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +804 -211
  6. package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +4 -0
  7. package/artifacts/contracts/components/{IBaseComponent.sol/IBaseComponent.json → IComponent.sol/IComponent.json} +95 -56
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +699 -22
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +814 -60
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +519 -4
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +896 -298
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +442 -129
  18. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +1 -1
  19. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +38 -62
  20. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +1 -1
  21. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  22. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +910 -289
  23. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  24. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +110 -171
  25. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  26. package/artifacts/contracts/instance/Instance.sol/Instance.json +874 -557
  27. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
  28. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +52 -115
  29. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  30. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +101 -168
  31. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  32. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +346 -263
  33. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  34. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +319 -86
  35. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +1 -1
  36. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +8 -32
  37. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +4 -0
  38. package/artifacts/contracts/instance/base/{ComponentServiceBase.sol/ComponentServiceBase.json → ComponentService.sol/ComponentService.json} +119 -189
  39. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  40. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  41. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  42. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +2 -2
  43. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  44. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +2 -2
  45. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
  46. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +13 -13
  47. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
  48. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
  49. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
  50. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
  51. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +1 -1
  52. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +1 -1
  53. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.dbg.json +4 -0
  54. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.json +968 -0
  55. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +4 -0
  56. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.json +665 -0
  57. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +1 -1
  58. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +258 -283
  59. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
  60. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +305 -80
  61. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.dbg.json +4 -0
  62. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.json +754 -0
  63. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +4 -0
  64. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.json +637 -0
  65. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
  66. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +983 -221
  67. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
  68. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +441 -72
  69. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +4 -0
  70. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.json +556 -0
  71. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +1 -1
  72. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +130 -217
  73. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.dbg.json +4 -0
  74. package/artifacts/contracts/{shared/RegisterableUpgradable.sol/RegisterableUpgradable.json → instance/service/IClaimService.sol/IClaimService.json} +146 -179
  75. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  76. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +552 -140
  77. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +1 -1
  78. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +40 -292
  79. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  80. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +22 -174
  81. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  82. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +22 -174
  83. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +1 -1
  84. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +161 -407
  85. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
  86. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +311 -114
  87. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  88. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +139 -237
  89. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
  90. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +302 -77
  91. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  92. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +139 -237
  93. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
  94. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +302 -77
  95. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  96. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  97. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +98 -5
  98. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  99. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +112 -198
  100. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  101. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  102. package/artifacts/contracts/registry/Registry.sol/Registry.json +112 -27
  103. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +1 -1
  104. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +18 -18
  105. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  106. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +216 -234
  107. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  108. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +300 -81
  109. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +1 -1
  110. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +70 -53
  111. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
  112. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.json +151 -50
  113. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
  114. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  115. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +41 -3
  116. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  117. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.json +40 -29
  118. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +4 -0
  119. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.json +129 -0
  120. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  121. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.json +21 -34
  122. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
  123. package/artifacts/contracts/{experiment/inheritance/IB.sol/IB.json → shared/IRegistryLinked.sol/IRegistryLinked.json} +18 -20
  124. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
  125. package/artifacts/contracts/shared/IService.sol/IService.json +22 -174
  126. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  127. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +2 -152
  128. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  129. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.json +120 -27
  130. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +4 -0
  131. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.json +248 -0
  132. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  133. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.json +294 -61
  134. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  135. package/artifacts/contracts/shared/Registerable.sol/Registerable.json +129 -51
  136. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +4 -0
  137. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.json +84 -0
  138. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
  139. package/artifacts/contracts/shared/Service.sol/Service.json +114 -157
  140. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  141. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  142. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.json +2 -2
  143. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  144. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +2 -152
  145. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  146. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  147. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +129 -51
  148. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  149. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +2 -2
  150. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  151. package/artifacts/contracts/test/TestService.sol/TestService.json +135 -214
  152. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  153. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  154. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  155. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +8 -190
  156. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  157. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  158. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  159. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  160. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.dbg.json +4 -0
  161. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.json +100 -0
  162. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  163. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.json +2 -2
  164. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  165. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  166. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +2 -2
  167. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  168. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +2 -2
  169. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  170. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
  171. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +1 -1
  172. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  173. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  174. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.dbg.json +4 -0
  175. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.json +100 -0
  176. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +1 -1
  177. package/artifacts/contracts/types/Referral.sol/ReferralLib.json +2 -2
  178. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +1 -1
  179. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +2 -2
  180. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
  181. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +2 -2
  182. package/artifacts/contracts/types/Seconds.sol/SecondsLib.dbg.json +4 -0
  183. package/artifacts/contracts/types/Seconds.sol/SecondsLib.json +124 -0
  184. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  185. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  186. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +25 -7
  187. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
  188. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
  189. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  190. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  191. package/contracts/components/Component.sol +221 -0
  192. package/contracts/components/Distribution.sol +206 -67
  193. package/contracts/components/IComponent.sol +68 -0
  194. package/contracts/components/IDistributionComponent.sol +44 -9
  195. package/contracts/components/IPoolComponent.sol +124 -39
  196. package/contracts/components/IProductComponent.sol +8 -3
  197. package/contracts/components/Pool.sol +284 -164
  198. package/contracts/components/Product.sol +110 -116
  199. package/contracts/instance/BundleManager.sol +8 -12
  200. package/contracts/instance/IInstance.sol +41 -9
  201. package/contracts/instance/IInstanceService.sol +20 -1
  202. package/contracts/instance/Instance.sol +90 -61
  203. package/contracts/instance/InstanceAccessManager.sol +18 -24
  204. package/contracts/instance/InstanceReader.sol +3 -25
  205. package/contracts/instance/InstanceService.sol +195 -50
  206. package/contracts/instance/InstanceServiceManager.sol +1 -1
  207. package/contracts/instance/ObjectManager.sol +7 -24
  208. package/contracts/instance/base/{ComponentServiceBase.sol → ComponentService.sol} +9 -13
  209. package/contracts/instance/module/IAccess.sol +3 -4
  210. package/contracts/instance/module/IBundle.sol +2 -1
  211. package/contracts/instance/module/IDistribution.sol +2 -0
  212. package/contracts/instance/module/IPolicy.sol +30 -3
  213. package/contracts/instance/module/ISetup.sol +10 -10
  214. package/contracts/instance/service/ApplicationService.sol +350 -0
  215. package/contracts/instance/service/ApplicationServiceManager.sol +35 -0
  216. package/contracts/instance/service/BundleService.sol +17 -12
  217. package/contracts/instance/service/BundleServiceManager.sol +1 -1
  218. package/contracts/instance/service/ClaimService.sol +151 -0
  219. package/contracts/instance/service/ClaimServiceManager.sol +35 -0
  220. package/contracts/instance/service/DistributionService.sol +312 -33
  221. package/contracts/instance/service/DistributionServiceManager.sol +1 -1
  222. package/contracts/instance/service/IApplicationService.sol +82 -0
  223. package/contracts/instance/service/IBundleService.sol +14 -3
  224. package/contracts/instance/service/IClaimService.sol +61 -0
  225. package/contracts/instance/service/IDistributionService.sol +74 -0
  226. package/contracts/instance/service/IPolicyService.sol +26 -50
  227. package/contracts/instance/service/PolicyService.sol +127 -262
  228. package/contracts/instance/service/PolicyServiceManager.sol +2 -2
  229. package/contracts/instance/service/PoolService.sol +12 -45
  230. package/contracts/instance/service/PoolServiceManager.sol +1 -1
  231. package/contracts/instance/service/ProductService.sol +50 -26
  232. package/contracts/instance/service/ProductServiceManager.sol +2 -2
  233. package/contracts/registry/IRegistry.sol +16 -8
  234. package/contracts/registry/IRegistryService.sol +19 -10
  235. package/contracts/registry/Registry.sol +120 -52
  236. package/contracts/registry/RegistryAccessManager.sol +31 -25
  237. package/contracts/registry/RegistryService.sol +91 -128
  238. package/contracts/registry/RegistryServiceManager.sol +13 -13
  239. package/contracts/registry/ReleaseManager.sol +86 -106
  240. package/contracts/registry/TokenRegistry.sol +19 -13
  241. package/contracts/shared/ERC165.sol +14 -12
  242. package/contracts/shared/INftOwnable.sol +11 -10
  243. package/contracts/shared/IPolicyHolder.sol +26 -0
  244. package/contracts/shared/IRegisterable.sol +4 -4
  245. package/contracts/shared/IRegistryLinked.sol +12 -0
  246. package/contracts/shared/IService.sol +2 -0
  247. package/contracts/shared/IVersionable.sol +4 -47
  248. package/contracts/shared/NftOwnable.sol +66 -80
  249. package/contracts/shared/PolicyHolder.sol +81 -0
  250. package/contracts/shared/ProxyManager.sol +100 -25
  251. package/contracts/shared/Registerable.sol +16 -32
  252. package/contracts/shared/RegistryLinked.sol +48 -0
  253. package/contracts/shared/Service.sol +19 -19
  254. package/contracts/shared/Versionable.sol +4 -92
  255. package/contracts/test/TestRegisterable.sol +1 -1
  256. package/contracts/test/TestService.sol +1 -1
  257. package/contracts/types/ClaimId.sol +52 -0
  258. package/contracts/types/DistributorType.sol +2 -2
  259. package/contracts/types/ObjectType.sol +9 -5
  260. package/contracts/types/PayoutId.sol +54 -0
  261. package/contracts/types/RoleId.sol +12 -7
  262. package/contracts/types/Seconds.sol +54 -0
  263. package/contracts/types/Timestamp.sol +12 -13
  264. package/package.json +3 -3
  265. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +0 -4
  266. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +0 -4
  267. package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.dbg.json +0 -4
  268. package/artifacts/contracts/experiment/cloning/Cloner.sol/Cloner.json +0 -66
  269. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.dbg.json +0 -4
  270. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock1.json +0 -24
  271. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.dbg.json +0 -4
  272. package/artifacts/contracts/experiment/cloning/Cloner.sol/Mock2.json +0 -42
  273. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +0 -4
  274. package/artifacts/contracts/experiment/errors/Require.sol/Require.json +0 -105
  275. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +0 -4
  276. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +0 -105
  277. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +0 -4
  278. package/artifacts/contracts/experiment/inheritance/A.sol/A.json +0 -128
  279. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +0 -4
  280. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +0 -42
  281. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +0 -4
  282. package/artifacts/contracts/experiment/inheritance/B.sol/B.json +0 -76
  283. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +0 -4
  284. package/artifacts/contracts/experiment/inheritance/C.sol/C.json +0 -89
  285. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +0 -4
  286. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +0 -128
  287. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +0 -4
  288. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +0 -37
  289. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +0 -4
  290. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +0 -4
  291. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +0 -63
  292. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +0 -4
  293. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +0 -59
  294. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +0 -4
  295. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.json +0 -124
  296. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +0 -4
  297. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.json +0 -74
  298. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +0 -4
  299. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +0 -124
  300. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +0 -4
  301. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +0 -207
  302. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +0 -4
  303. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +0 -10
  304. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +0 -4
  305. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +0 -10
  306. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +0 -4
  307. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.json +0 -1206
  308. package/artifacts/contracts/instance/IInstanceBase.sol/IInstanceBase.dbg.json +0 -4
  309. package/artifacts/contracts/instance/IInstanceBase.sol/IInstanceBase.json +0 -448
  310. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +0 -4
  311. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.json +0 -763
  312. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
  313. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +0 -4
  314. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +0 -100
  315. package/artifacts/contracts/shared/RegisterableUpgradable.sol/RegisterableUpgradable.dbg.json +0 -4
  316. package/contracts/components/BaseComponent.sol +0 -168
  317. package/contracts/components/IBaseComponent.sol +0 -35
  318. package/contracts/experiment/cloning/Cloner.sol +0 -47
  319. package/contracts/experiment/errors/Require.sol +0 -38
  320. package/contracts/experiment/errors/Revert.sol +0 -44
  321. package/contracts/experiment/inheritance/A.sol +0 -53
  322. package/contracts/experiment/inheritance/B.sol +0 -28
  323. package/contracts/experiment/inheritance/C.sol +0 -34
  324. package/contracts/experiment/inheritance/IA.sol +0 -13
  325. package/contracts/experiment/inheritance/IB.sol +0 -10
  326. package/contracts/experiment/inheritance/IC.sol +0 -12
  327. package/contracts/experiment/statemachine/Dummy.sol +0 -27
  328. package/contracts/experiment/statemachine/ISM.sol +0 -25
  329. package/contracts/experiment/statemachine/SM.sol +0 -57
  330. package/contracts/experiment/statemachine/SimpleStateMachine.sol +0 -31
  331. package/contracts/experiment/types/TypeA.sol +0 -47
  332. package/contracts/experiment/types/TypeB.sol +0 -29
  333. package/contracts/instance/AccessManagerUpgradeableInitializeable.sol +0 -23
  334. package/contracts/instance/IInstanceBase.sol +0 -25
  335. package/contracts/instance/InstanceBase.sol +0 -39
  336. package/contracts/instance/base/IInstanceBase.sol +0 -21
  337. package/contracts/shared/RegisterableUpgradable.sol +0 -16
@@ -0,0 +1,100 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "PayoutIdLib",
4
+ "sourceName": "contracts/types/PayoutId.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "PayoutId",
10
+ "name": "a",
11
+ "type": "uint24"
12
+ }
13
+ ],
14
+ "name": "eqz",
15
+ "outputs": [
16
+ {
17
+ "internalType": "bool",
18
+ "name": "",
19
+ "type": "bool"
20
+ }
21
+ ],
22
+ "stateMutability": "pure",
23
+ "type": "function"
24
+ },
25
+ {
26
+ "inputs": [
27
+ {
28
+ "internalType": "PayoutId",
29
+ "name": "a",
30
+ "type": "uint24"
31
+ }
32
+ ],
33
+ "name": "gtz",
34
+ "outputs": [
35
+ {
36
+ "internalType": "bool",
37
+ "name": "",
38
+ "type": "bool"
39
+ }
40
+ ],
41
+ "stateMutability": "pure",
42
+ "type": "function"
43
+ },
44
+ {
45
+ "inputs": [
46
+ {
47
+ "internalType": "PayoutId",
48
+ "name": "a",
49
+ "type": "uint24"
50
+ }
51
+ ],
52
+ "name": "toInt",
53
+ "outputs": [
54
+ {
55
+ "internalType": "uint24",
56
+ "name": "",
57
+ "type": "uint24"
58
+ }
59
+ ],
60
+ "stateMutability": "pure",
61
+ "type": "function"
62
+ },
63
+ {
64
+ "inputs": [
65
+ {
66
+ "internalType": "uint256",
67
+ "name": "a",
68
+ "type": "uint256"
69
+ }
70
+ ],
71
+ "name": "toPayoutId",
72
+ "outputs": [
73
+ {
74
+ "internalType": "PayoutId",
75
+ "name": "",
76
+ "type": "uint24"
77
+ }
78
+ ],
79
+ "stateMutability": "pure",
80
+ "type": "function"
81
+ },
82
+ {
83
+ "inputs": [],
84
+ "name": "zero",
85
+ "outputs": [
86
+ {
87
+ "internalType": "PayoutId",
88
+ "name": "",
89
+ "type": "uint24"
90
+ }
91
+ ],
92
+ "stateMutability": "pure",
93
+ "type": "function"
94
+ }
95
+ ],
96
+ "bytecode": "0x61015f61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100615760003560e01c806302985c61146100665780635560100714610093578063691d05ec146100b8578063bc1b392d146100cf578063f43d0be4146100d6575b600080fd5b61007e6100743660046100e4565b62ffffff16151590565b60405190151581526020015b60405180910390f35b6100a46100a13660046100e4565b90565b60405162ffffff909116815260200161008a565b61007e6100c63660046100e4565b62ffffff161590565b60006100a4565b6100a46100a1366004610110565b6000602082840312156100f657600080fd5b813562ffffff8116811461010957600080fd5b9392505050565b60006020828403121561012257600080fd5b503591905056fea26469706673582212207ec57330ef4c4442fd6c82ef8bddeb33653eafa2bd64d4a0d3cd4448c6b536c764736f6c63430008140033",
97
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100615760003560e01c806302985c61146100665780635560100714610093578063691d05ec146100b8578063bc1b392d146100cf578063f43d0be4146100d6575b600080fd5b61007e6100743660046100e4565b62ffffff16151590565b60405190151581526020015b60405180910390f35b6100a46100a13660046100e4565b90565b60405162ffffff909116815260200161008a565b61007e6100c63660046100e4565b62ffffff161590565b60006100a4565b6100a46100a1366004610110565b6000602082840312156100f657600080fd5b813562ffffff8116811461010957600080fd5b9392505050565b60006020828403121561012257600080fd5b503591905056fea26469706673582212207ec57330ef4c4442fd6c82ef8bddeb33653eafa2bd64d4a0d3cd4448c6b536c764736f6c63430008140033",
98
+ "linkReferences": {},
99
+ "deployedLinkReferences": {}
100
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/2d0d5ac9f3af33498ef492a7caeac063.json"
3
+ "buildInfo": "../../../build-info/a8e58e3e317904030d8bf765133d5722.json"
4
4
  }
@@ -98,8 +98,8 @@
98
98
  "type": "function"
99
99
  }
100
100
  ],
101
- "bytecode": "0x6103cf61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100615760003560e01c80632cf96bf9146100665780633f093cd61461009957806355ee6275146100c5578063a420c787146100e6578063bc1b392d14610109575b600080fd5b6100816100743660046101dd565b6001600160c01b03191690565b60405160ff1990911681526020015b60405180910390f35b6100ac6100a7366004610224565b610110565b6040516001600160c01b03199091168152602001610090565b6100d86100d33660046101dd565b610143565b604051908152602001610090565b6100f76100f43660046102f9565b90565b60405160ff9091168152602001610090565b60006100ac565b6000828260405160200161012592919061031c565b60405160208183030381529060405280519060200120905092915050565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce607b6001600160c01b031985166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af41580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610380565b92915050565b6000602082840312156101ef57600080fd5b81356001600160c01b03198116811461020757600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561023757600080fd5b82356bffffffffffffffffffffffff8116811461025357600080fd5b9150602083013567ffffffffffffffff8082111561027057600080fd5b818501915085601f83011261028457600080fd5b8135818111156102965761029661020e565b604051601f8201601f19908116603f011681019083821181831017156102be576102be61020e565b816040528281528860208487010111156102d757600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60006020828403121561030b57600080fd5b813560ff8116811461020757600080fd5b6bffffffffffffffffffffffff8316815260006020604081840152835180604085015260005b8181101561035e57858101830151858201606001528201610342565b506000606082860101526060601f19601f830116850101925050509392505050565b60006020828403121561039257600080fd5b505191905056fea2646970667358221220e3067e33abc10c92bca6b263bfc1f83fba9fd0597a869d4ffec064e06a9d7c1464736f6c63430008140033",
102
- "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100615760003560e01c80632cf96bf9146100665780633f093cd61461009957806355ee6275146100c5578063a420c787146100e6578063bc1b392d14610109575b600080fd5b6100816100743660046101dd565b6001600160c01b03191690565b60405160ff1990911681526020015b60405180910390f35b6100ac6100a7366004610224565b610110565b6040516001600160c01b03199091168152602001610090565b6100d86100d33660046101dd565b610143565b604051908152602001610090565b6100f76100f43660046102f9565b90565b60405160ff9091168152602001610090565b60006100ac565b6000828260405160200161012592919061031c565b60405160208183030381529060405280519060200120905092915050565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce607b6001600160c01b031985166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af41580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610380565b92915050565b6000602082840312156101ef57600080fd5b81356001600160c01b03198116811461020757600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561023757600080fd5b82356bffffffffffffffffffffffff8116811461025357600080fd5b9150602083013567ffffffffffffffff8082111561027057600080fd5b818501915085601f83011261028457600080fd5b8135818111156102965761029661020e565b604051601f8201601f19908116603f011681019083821181831017156102be576102be61020e565b816040528281528860208487010111156102d757600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60006020828403121561030b57600080fd5b813560ff8116811461020757600080fd5b6bffffffffffffffffffffffff8316815260006020604081840152835180604085015260005b8181101561035e57858101830151858201606001528201610342565b506000606082860101526060601f19601f830116850101925050509392505050565b60006020828403121561039257600080fd5b505191905056fea2646970667358221220e3067e33abc10c92bca6b263bfc1f83fba9fd0597a869d4ffec064e06a9d7c1464736f6c63430008140033",
101
+ "bytecode": "0x6103cf61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100615760003560e01c80632cf96bf9146100665780633f093cd61461009957806355ee6275146100c5578063a420c787146100e6578063bc1b392d14610109575b600080fd5b6100816100743660046101dd565b6001600160c01b03191690565b60405160ff1990911681526020015b60405180910390f35b6100ac6100a7366004610224565b610110565b6040516001600160c01b03199091168152602001610090565b6100d86100d33660046101dd565b610143565b604051908152602001610090565b6100f76100f43660046102f9565b90565b60405160ff9091168152602001610090565b60006100ac565b6000828260405160200161012592919061031c565b60405160208183030381529060405280519060200120905092915050565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce607b6001600160c01b031985166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af41580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610380565b92915050565b6000602082840312156101ef57600080fd5b81356001600160c01b03198116811461020757600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561023757600080fd5b82356bffffffffffffffffffffffff8116811461025357600080fd5b9150602083013567ffffffffffffffff8082111561027057600080fd5b818501915085601f83011261028457600080fd5b8135818111156102965761029661020e565b604051601f8201601f19908116603f011681019083821181831017156102be576102be61020e565b816040528281528860208487010111156102d757600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60006020828403121561030b57600080fd5b813560ff8116811461020757600080fd5b6bffffffffffffffffffffffff8316815260006020604081840152835180604085015260005b8181101561035e57858101830151858201606001528201610342565b506000606082860101526060601f19601f830116850101925050509392505050565b60006020828403121561039257600080fd5b505191905056fea26469706673582212203a17215075d8a5001956f0f2bfeba817b6404b3d8755f596baba942df9648c8764736f6c63430008140033",
102
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100615760003560e01c80632cf96bf9146100665780633f093cd61461009957806355ee6275146100c5578063a420c787146100e6578063bc1b392d14610109575b600080fd5b6100816100743660046101dd565b6001600160c01b03191690565b60405160ff1990911681526020015b60405180910390f35b6100ac6100a7366004610224565b610110565b6040516001600160c01b03199091168152602001610090565b6100d86100d33660046101dd565b610143565b604051908152602001610090565b6100f76100f43660046102f9565b90565b60405160ff9091168152602001610090565b60006100ac565b6000828260405160200161012592919061031c565b60405160208183030381529060405280519060200120905092915050565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce607b6001600160c01b031985166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af41580156101b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101d79190610380565b92915050565b6000602082840312156101ef57600080fd5b81356001600160c01b03198116811461020757600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561023757600080fd5b82356bffffffffffffffffffffffff8116811461025357600080fd5b9150602083013567ffffffffffffffff8082111561027057600080fd5b818501915085601f83011261028457600080fd5b8135818111156102965761029661020e565b604051601f8201601f19908116603f011681019083821181831017156102be576102be61020e565b816040528281528860208487010111156102d757600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b60006020828403121561030b57600080fd5b813560ff8116811461020757600080fd5b6bffffffffffffffffffffffff8316815260006020604081840152835180604085015260005b8181101561035e57858101830151858201606001528201610342565b506000606082860101526060601f19601f830116850101925050509392505050565b60006020828403121561039257600080fd5b505191905056fea26469706673582212203a17215075d8a5001956f0f2bfeba817b6404b3d8755f596baba942df9648c8764736f6c63430008140033",
103
103
  "linkReferences": {
104
104
  "contracts/types/Key32.sol": {
105
105
  "Key32Lib": [
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/2d0d5ac9f3af33498ef492a7caeac063.json"
3
+ "buildInfo": "../../../build-info/a8e58e3e317904030d8bf765133d5722.json"
4
4
  }
@@ -61,8 +61,8 @@
61
61
  "type": "function"
62
62
  }
63
63
  ],
64
- "bytecode": "0x61032f61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c80632cf96bf9146100505780634a7485ba1461008357806355ee6275146100af575b600080fd5b61006b61005e36600461019a565b6001600160c01b03191690565b60405160ff1990911681526020015b60405180910390f35b6100966100913660046101e1565b6100d0565b6040516001600160c01b0319909116815260200161007a565b6100c26100bd36600461019a565b610100565b60405190815260200161007a565b6000816040516020016100e39190610292565b604051602081830303815290604052805190602001209050919050565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce60c86001600160c01b031985166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af4158015610170573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019491906102e0565b92915050565b6000602082840312156101ac57600080fd5b81356001600160c01b0319811681146101c457600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156101f357600080fd5b813567ffffffffffffffff8082111561020b57600080fd5b818401915084601f83011261021f57600080fd5b813581811115610231576102316101cb565b604051601f8201601f19908116603f01168101908382118183101715610259576102596101cb565b8160405282815287602084870101111561027257600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b818110156102bf578581018301518582016040015282016102a3565b506000604082860101526040601f19601f8301168501019250505092915050565b6000602082840312156102f257600080fd5b505191905056fea2646970667358221220acade4fae6a94a3704657aa5558cd7b643bb3131353aefbe2c03a2748459b3c064736f6c63430008140033",
65
- "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c80632cf96bf9146100505780634a7485ba1461008357806355ee6275146100af575b600080fd5b61006b61005e36600461019a565b6001600160c01b03191690565b60405160ff1990911681526020015b60405180910390f35b6100966100913660046101e1565b6100d0565b6040516001600160c01b0319909116815260200161007a565b6100c26100bd36600461019a565b610100565b60405190815260200161007a565b6000816040516020016100e39190610292565b604051602081830303815290604052805190602001209050919050565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce60c86001600160c01b031985166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af4158015610170573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019491906102e0565b92915050565b6000602082840312156101ac57600080fd5b81356001600160c01b0319811681146101c457600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156101f357600080fd5b813567ffffffffffffffff8082111561020b57600080fd5b818401915084601f83011261021f57600080fd5b813581811115610231576102316101cb565b604051601f8201601f19908116603f01168101908382118183101715610259576102596101cb565b8160405282815287602084870101111561027257600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b818110156102bf578581018301518582016040015282016102a3565b506000604082860101526040601f19601f8301168501019250505092915050565b6000602082840312156102f257600080fd5b505191905056fea2646970667358221220acade4fae6a94a3704657aa5558cd7b643bb3131353aefbe2c03a2748459b3c064736f6c63430008140033",
64
+ "bytecode": "0x61032f61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c80632cf96bf9146100505780634a7485ba1461008357806355ee6275146100af575b600080fd5b61006b61005e36600461019a565b6001600160c01b03191690565b60405160ff1990911681526020015b60405180910390f35b6100966100913660046101e1565b6100d0565b6040516001600160c01b0319909116815260200161007a565b6100c26100bd36600461019a565b610100565b60405190815260200161007a565b6000816040516020016100e39190610292565b604051602081830303815290604052805190602001209050919050565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce60c86001600160c01b031985166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af4158015610170573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019491906102e0565b92915050565b6000602082840312156101ac57600080fd5b81356001600160c01b0319811681146101c457600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156101f357600080fd5b813567ffffffffffffffff8082111561020b57600080fd5b818401915084601f83011261021f57600080fd5b813581811115610231576102316101cb565b604051601f8201601f19908116603f01168101908382118183101715610259576102596101cb565b8160405282815287602084870101111561027257600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b818110156102bf578581018301518582016040015282016102a3565b506000604082860101526040601f19601f8301168501019250505092915050565b6000602082840312156102f257600080fd5b505191905056fea26469706673582212209159fe3208a459e4904359ef92d8cc7cecbb0b142f3caecc8eb34f90da5f931c64736f6c63430008140033",
65
+ "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c80632cf96bf9146100505780634a7485ba1461008357806355ee6275146100af575b600080fd5b61006b61005e36600461019a565b6001600160c01b03191690565b60405160ff1990911681526020015b60405180910390f35b6100966100913660046101e1565b6100d0565b6040516001600160c01b0319909116815260200161007a565b6100c26100bd36600461019a565b610100565b60405190815260200161007a565b6000816040516020016100e39190610292565b604051602081830303815290604052805190602001209050919050565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce60c86001600160c01b031985166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af4158015610170573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061019491906102e0565b92915050565b6000602082840312156101ac57600080fd5b81356001600160c01b0319811681146101c457600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156101f357600080fd5b813567ffffffffffffffff8082111561020b57600080fd5b818401915084601f83011261021f57600080fd5b813581811115610231576102316101cb565b604051601f8201601f19908116603f01168101908382118183101715610259576102596101cb565b8160405282815287602084870101111561027257600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b818110156102bf578581018301518582016040015282016102a3565b506000604082860101526040601f19601f8301168501019250505092915050565b6000602082840312156102f257600080fd5b505191905056fea26469706673582212209159fe3208a459e4904359ef92d8cc7cecbb0b142f3caecc8eb34f90da5f931c64736f6c63430008140033",
66
66
  "linkReferences": {
67
67
  "contracts/types/Key32.sol": {
68
68
  "Key32Lib": [
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/2d0d5ac9f3af33498ef492a7caeac063.json"
3
+ "buildInfo": "../../../build-info/a8e58e3e317904030d8bf765133d5722.json"
4
4
  }
@@ -131,8 +131,8 @@
131
131
  "type": "function"
132
132
  }
133
133
  ],
134
- "bytecode": "0x6102a461003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806368aebf7b1161006557806368aebf7b14610119578063a42e52e914610127578063bc1b392d14610144578063f37f38f01461014b57600080fd5b8063057182b41461008c578063545ce21c146100bd57806367cb8ec1146100e7575b600080fd5b6100a861009a36600461020b565b67ffffffffffffffff161590565b60405190151581526020015b60405180910390f35b6100ce6100cb36600461020b565b90565b60405167ffffffffffffffff90911681526020016100b4565b6101066100f536600461020b565b60081b68ffffffffffffffff001690565b60405160ff1990911681526020016100b4565b6100ce6100cb36600461023c565b6100a861013536600461020b565b67ffffffffffffffff16151590565b60006100ce565b61015e61015936600461020b565b61016c565b6040519081526020016100b4565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce6014600885901b68ffffffffffffffff00166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af41580156101e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102059190610255565b92915050565b60006020828403121561021d57600080fd5b813567ffffffffffffffff8116811461023557600080fd5b9392505050565b60006020828403121561024e57600080fd5b5035919050565b60006020828403121561026757600080fd5b505191905056fea2646970667358221220c2d0d8fb79f0159b98912e9216ffb6ba8a88f6c92828e6343131e731c143b46b64736f6c63430008140033",
135
- "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806368aebf7b1161006557806368aebf7b14610119578063a42e52e914610127578063bc1b392d14610144578063f37f38f01461014b57600080fd5b8063057182b41461008c578063545ce21c146100bd57806367cb8ec1146100e7575b600080fd5b6100a861009a36600461020b565b67ffffffffffffffff161590565b60405190151581526020015b60405180910390f35b6100ce6100cb36600461020b565b90565b60405167ffffffffffffffff90911681526020016100b4565b6101066100f536600461020b565b60081b68ffffffffffffffff001690565b60405160ff1990911681526020016100b4565b6100ce6100cb36600461023c565b6100a861013536600461020b565b67ffffffffffffffff16151590565b60006100ce565b61015e61015936600461020b565b61016c565b6040519081526020016100b4565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce6014600885901b68ffffffffffffffff00166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af41580156101e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102059190610255565b92915050565b60006020828403121561021d57600080fd5b813567ffffffffffffffff8116811461023557600080fd5b9392505050565b60006020828403121561024e57600080fd5b5035919050565b60006020828403121561026757600080fd5b505191905056fea2646970667358221220c2d0d8fb79f0159b98912e9216ffb6ba8a88f6c92828e6343131e731c143b46b64736f6c63430008140033",
134
+ "bytecode": "0x6102a461003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806368aebf7b1161006557806368aebf7b14610119578063a42e52e914610127578063bc1b392d14610144578063f37f38f01461014b57600080fd5b8063057182b41461008c578063545ce21c146100bd57806367cb8ec1146100e7575b600080fd5b6100a861009a36600461020b565b67ffffffffffffffff161590565b60405190151581526020015b60405180910390f35b6100ce6100cb36600461020b565b90565b60405167ffffffffffffffff90911681526020016100b4565b6101066100f536600461020b565b60081b68ffffffffffffffff001690565b60405160ff1990911681526020016100b4565b6100ce6100cb36600461023c565b6100a861013536600461020b565b67ffffffffffffffff16151590565b60006100ce565b61015e61015936600461020b565b61016c565b6040519081526020016100b4565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce6014600885901b68ffffffffffffffff00166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af41580156101e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102059190610255565b92915050565b60006020828403121561021d57600080fd5b813567ffffffffffffffff8116811461023557600080fd5b9392505050565b60006020828403121561024e57600080fd5b5035919050565b60006020828403121561026757600080fd5b505191905056fea264697066735822122094b261d62927493454f4c2c04d283c56c57fc24826a001fa1e503146845a8b8b64736f6c63430008140033",
135
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806368aebf7b1161006557806368aebf7b14610119578063a42e52e914610127578063bc1b392d14610144578063f37f38f01461014b57600080fd5b8063057182b41461008c578063545ce21c146100bd57806367cb8ec1146100e7575b600080fd5b6100a861009a36600461020b565b67ffffffffffffffff161590565b60405190151581526020015b60405180910390f35b6100ce6100cb36600461020b565b90565b60405167ffffffffffffffff90911681526020016100b4565b6101066100f536600461020b565b60081b68ffffffffffffffff001690565b60405160ff1990911681526020016100b4565b6100ce6100cb36600461023c565b6100a861013536600461020b565b67ffffffffffffffff16151590565b60006100ce565b61015e61015936600461020b565b61016c565b6040519081526020016100b4565b600073__$c8f743efd2b4f0c9300f2558c784479d3e$__63f48016ce6014600885901b68ffffffffffffffff00166040516001600160e01b031960e085901b16815260ff909216600483015260ff19166024820152604401602060405180830381865af41580156101e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102059190610255565b92915050565b60006020828403121561021d57600080fd5b813567ffffffffffffffff8116811461023557600080fd5b9392505050565b60006020828403121561024e57600080fd5b5035919050565b60006020828403121561026757600080fd5b505191905056fea264697066735822122094b261d62927493454f4c2c04d283c56c57fc24826a001fa1e503146845a8b8b64736f6c63430008140033",
136
136
  "linkReferences": {
137
137
  "contracts/types/Key32.sol": {
138
138
  "Key32Lib": [
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/a8e58e3e317904030d8bf765133d5722.json"
4
+ }
@@ -0,0 +1,124 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "SecondsLib",
4
+ "sourceName": "contracts/types/Seconds.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "uint256",
10
+ "name": "duration",
11
+ "type": "uint256"
12
+ }
13
+ ],
14
+ "name": "ErrorSecondsLibDurationTooBig",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "inputs": [
19
+ {
20
+ "internalType": "Seconds",
21
+ "name": "duration",
22
+ "type": "uint40"
23
+ }
24
+ ],
25
+ "name": "eqz",
26
+ "outputs": [
27
+ {
28
+ "internalType": "bool",
29
+ "name": "",
30
+ "type": "bool"
31
+ }
32
+ ],
33
+ "stateMutability": "pure",
34
+ "type": "function"
35
+ },
36
+ {
37
+ "inputs": [
38
+ {
39
+ "internalType": "Seconds",
40
+ "name": "duration",
41
+ "type": "uint40"
42
+ }
43
+ ],
44
+ "name": "gtz",
45
+ "outputs": [
46
+ {
47
+ "internalType": "bool",
48
+ "name": "",
49
+ "type": "bool"
50
+ }
51
+ ],
52
+ "stateMutability": "pure",
53
+ "type": "function"
54
+ },
55
+ {
56
+ "inputs": [],
57
+ "name": "max",
58
+ "outputs": [
59
+ {
60
+ "internalType": "Seconds",
61
+ "name": "",
62
+ "type": "uint40"
63
+ }
64
+ ],
65
+ "stateMutability": "pure",
66
+ "type": "function"
67
+ },
68
+ {
69
+ "inputs": [
70
+ {
71
+ "internalType": "Seconds",
72
+ "name": "duration",
73
+ "type": "uint40"
74
+ }
75
+ ],
76
+ "name": "toInt",
77
+ "outputs": [
78
+ {
79
+ "internalType": "uint256",
80
+ "name": "",
81
+ "type": "uint256"
82
+ }
83
+ ],
84
+ "stateMutability": "pure",
85
+ "type": "function"
86
+ },
87
+ {
88
+ "inputs": [
89
+ {
90
+ "internalType": "uint256",
91
+ "name": "duration",
92
+ "type": "uint256"
93
+ }
94
+ ],
95
+ "name": "toSeconds",
96
+ "outputs": [
97
+ {
98
+ "internalType": "Seconds",
99
+ "name": "",
100
+ "type": "uint40"
101
+ }
102
+ ],
103
+ "stateMutability": "pure",
104
+ "type": "function"
105
+ },
106
+ {
107
+ "inputs": [],
108
+ "name": "zero",
109
+ "outputs": [
110
+ {
111
+ "internalType": "Seconds",
112
+ "name": "",
113
+ "type": "uint40"
114
+ }
115
+ ],
116
+ "stateMutability": "pure",
117
+ "type": "function"
118
+ }
119
+ ],
120
+ "bytecode": "0x6101ca61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c80630c67422c146100715780636ac5db191461009f578063790a38ad146100aa5780638d38cd4b146100d3578063bc1b392d146100ed578063da09d484146100f4575b600080fd5b61008461007f36600461014d565b61011a565b60405164ffffffffff90911681526020015b60405180910390f35b64ffffffffff610084565b6100c36100b8366004610166565b64ffffffffff161590565b6040519015158152602001610096565b6100c36100e1366004610166565b64ffffffffff16151590565b6000610084565b61010c610102366004610166565b64ffffffffff1690565b604051908152602001610096565b600064ffffffffff821115610149576040516385cb094d60e01b81526004810183905260240160405180910390fd5b5090565b60006020828403121561015f57600080fd5b5035919050565b60006020828403121561017857600080fd5b813564ffffffffff8116811461018d57600080fd5b939250505056fea2646970667358221220ab0bbb431ec7f7f9b4c20e069af9cc0de1aae40a79df6ae4b685a901b58ac9b064736f6c63430008140033",
121
+ "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c80630c67422c146100715780636ac5db191461009f578063790a38ad146100aa5780638d38cd4b146100d3578063bc1b392d146100ed578063da09d484146100f4575b600080fd5b61008461007f36600461014d565b61011a565b60405164ffffffffff90911681526020015b60405180910390f35b64ffffffffff610084565b6100c36100b8366004610166565b64ffffffffff161590565b6040519015158152602001610096565b6100c36100e1366004610166565b64ffffffffff16151590565b6000610084565b61010c610102366004610166565b64ffffffffff1690565b604051908152602001610096565b600064ffffffffff821115610149576040516385cb094d60e01b81526004810183905260240160405180910390fd5b5090565b60006020828403121561015f57600080fd5b5035919050565b60006020828403121561017857600080fd5b813564ffffffffff8116811461018d57600080fd5b939250505056fea2646970667358221220ab0bbb431ec7f7f9b4c20e069af9cc0de1aae40a79df6ae4b685a901b58ac9b064736f6c63430008140033",
122
+ "linkReferences": {},
123
+ "deployedLinkReferences": {}
124
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/2d0d5ac9f3af33498ef492a7caeac063.json"
3
+ "buildInfo": "../../../build-info/a8e58e3e317904030d8bf765133d5722.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/2d0d5ac9f3af33498ef492a7caeac063.json"
3
+ "buildInfo": "../../../build-info/a8e58e3e317904030d8bf765133d5722.json"
4
4
  }
@@ -11,9 +11,9 @@
11
11
  "type": "uint40"
12
12
  },
13
13
  {
14
- "internalType": "uint256",
15
- "name": "timeDelta",
16
- "type": "uint256"
14
+ "internalType": "Seconds",
15
+ "name": "duration",
16
+ "type": "uint40"
17
17
  }
18
18
  ],
19
19
  "name": "addSeconds",
@@ -242,8 +242,26 @@
242
242
  "type": "function"
243
243
  }
244
244
  ],
245
- "bytecode": "0x61034b61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100b35760003560e01c8063adb618321161007b578063adb6183214610139578063add9ce9914610151578063c24922ce14610164578063da09d48414610177578063ddf3d6311461019d578063ef6c0d78146101b057600080fd5b8063790a38ad146100b857806383ffcdef146100e65780638d38cd4b146100f957806394335b1a146101135780639df8763914610126575b600080fd5b6100d16100c636600461026a565b64ffffffffff161590565b60405190151581526020015b60405180910390f35b6100d16100f4366004610285565b6101c3565b6100d161010736600461026a565b64ffffffffff16151590565b6100d1610121366004610285565b6101da565b6100d1610134366004610285565b6101ef565b425b60405164ffffffffff90911681526020016100dd565b6100d161015f366004610285565b610203565b6100d1610172366004610285565b610217565b61018f61018536600461026a565b64ffffffffff1690565b6040519081526020016100dd565b6100d16101ab366004610285565b61022c565b61013b6101be3660046102b8565b610241565b600064ffffffffff808316908416115b9392505050565b600064ffffffffff80831690841611156101d3565b600064ffffffffff808416908316146101d3565b600064ffffffffff808316908416106101d3565b600064ffffffffff80831690841610156101d3565b600064ffffffffff80841690831614156101d3565b60006101d361018583856102e2565b803564ffffffffff8116811461026557600080fd5b919050565b60006020828403121561027c57600080fd5b6101d382610250565b6000806040838503121561029857600080fd5b6102a183610250565b91506102af60208401610250565b90509250929050565b600080604083850312156102cb57600080fd5b6102d483610250565b946020939093013593505050565b64ffffffffff81811683821601908082111561030e57634e487b7160e01b600052601160045260246000fd5b509291505056fea26469706673582212202f299f91b811d074d64e39f0cc8e41061eac2d435ad2afa8817b109f9cabc07364736f6c63430008140033",
246
- "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100b35760003560e01c8063adb618321161007b578063adb6183214610139578063add9ce9914610151578063c24922ce14610164578063da09d48414610177578063ddf3d6311461019d578063ef6c0d78146101b057600080fd5b8063790a38ad146100b857806383ffcdef146100e65780638d38cd4b146100f957806394335b1a146101135780639df8763914610126575b600080fd5b6100d16100c636600461026a565b64ffffffffff161590565b60405190151581526020015b60405180910390f35b6100d16100f4366004610285565b6101c3565b6100d161010736600461026a565b64ffffffffff16151590565b6100d1610121366004610285565b6101da565b6100d1610134366004610285565b6101ef565b425b60405164ffffffffff90911681526020016100dd565b6100d161015f366004610285565b610203565b6100d1610172366004610285565b610217565b61018f61018536600461026a565b64ffffffffff1690565b6040519081526020016100dd565b6100d16101ab366004610285565b61022c565b61013b6101be3660046102b8565b610241565b600064ffffffffff808316908416115b9392505050565b600064ffffffffff80831690841611156101d3565b600064ffffffffff808416908316146101d3565b600064ffffffffff808316908416106101d3565b600064ffffffffff80831690841610156101d3565b600064ffffffffff80841690831614156101d3565b60006101d361018583856102e2565b803564ffffffffff8116811461026557600080fd5b919050565b60006020828403121561027c57600080fd5b6101d382610250565b6000806040838503121561029857600080fd5b6102a183610250565b91506102af60208401610250565b90509250929050565b600080604083850312156102cb57600080fd5b6102d483610250565b946020939093013593505050565b64ffffffffff81811683821601908082111561030e57634e487b7160e01b600052601160045260246000fd5b509291505056fea26469706673582212202f299f91b811d074d64e39f0cc8e41061eac2d435ad2afa8817b109f9cabc07364736f6c63430008140033",
247
- "linkReferences": {},
248
- "deployedLinkReferences": {}
245
+ "bytecode": "0x6103bf61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100b35760003560e01c8063a5798b4e1161007b578063a5798b4e14610139578063adb6183214610162578063add9ce9914610168578063c24922ce1461017b578063da09d4841461018e578063ddf3d631146101b457600080fd5b8063790a38ad146100b857806383ffcdef146100e65780638d38cd4b146100f957806394335b1a146101135780639df8763914610126575b600080fd5b6100d16100c63660046102f2565b64ffffffffff161590565b60405190151581526020015b60405180910390f35b6100d16100f4366004610316565b6101c7565b6100d16101073660046102f2565b64ffffffffff16151590565b6100d1610121366004610316565b6101e0565b6100d1610134366004610316565b6101f5565b61014c610147366004610316565b610209565b60405164ffffffffff90911681526020016100dd565b4261014c565b6100d1610176366004610316565b61029e565b6100d1610189366004610316565b6102b2565b6101a661019c3660046102f2565b64ffffffffff1690565b6040519081526020016100dd565b6100d16101c2366004610316565b6102c7565b600064ffffffffff808316908416115b90505b92915050565b600064ffffffffff80831690841611156101d7565b600064ffffffffff808416908316146101d7565b604051633682752160e21b815264ffffffffff821660048201526000906101d79073__$a3c3b8d16d3b00e17e1b34e034b17e7fd4$__9063da09d48490602401602060405180830381865af4158015610266573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028a919061034f565b61029b9064ffffffffff8616610368565b90565b600064ffffffffff808316908416106101d7565b600064ffffffffff80831690841610156101d7565b600064ffffffffff80841690831614156101d7565b64ffffffffff811681146102ef57600080fd5b50565b60006020828403121561030457600080fd5b813561030f816102dc565b9392505050565b6000806040838503121561032957600080fd5b8235610334816102dc565b91506020830135610344816102dc565b809150509250929050565b60006020828403121561036157600080fd5b5051919050565b808201808211156101da57634e487b7160e01b600052601160045260246000fdfea26469706673582212209d275f5b6b2c0e4f549c3e731b1e4ec56eb4b1ed245f433dab8ae6d5e7013a1564736f6c63430008140033",
246
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100b35760003560e01c8063a5798b4e1161007b578063a5798b4e14610139578063adb6183214610162578063add9ce9914610168578063c24922ce1461017b578063da09d4841461018e578063ddf3d631146101b457600080fd5b8063790a38ad146100b857806383ffcdef146100e65780638d38cd4b146100f957806394335b1a146101135780639df8763914610126575b600080fd5b6100d16100c63660046102f2565b64ffffffffff161590565b60405190151581526020015b60405180910390f35b6100d16100f4366004610316565b6101c7565b6100d16101073660046102f2565b64ffffffffff16151590565b6100d1610121366004610316565b6101e0565b6100d1610134366004610316565b6101f5565b61014c610147366004610316565b610209565b60405164ffffffffff90911681526020016100dd565b4261014c565b6100d1610176366004610316565b61029e565b6100d1610189366004610316565b6102b2565b6101a661019c3660046102f2565b64ffffffffff1690565b6040519081526020016100dd565b6100d16101c2366004610316565b6102c7565b600064ffffffffff808316908416115b90505b92915050565b600064ffffffffff80831690841611156101d7565b600064ffffffffff808416908316146101d7565b604051633682752160e21b815264ffffffffff821660048201526000906101d79073__$a3c3b8d16d3b00e17e1b34e034b17e7fd4$__9063da09d48490602401602060405180830381865af4158015610266573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028a919061034f565b61029b9064ffffffffff8616610368565b90565b600064ffffffffff808316908416106101d7565b600064ffffffffff80831690841610156101d7565b600064ffffffffff80841690831614156101d7565b64ffffffffff811681146102ef57600080fd5b50565b60006020828403121561030457600080fd5b813561030f816102dc565b9392505050565b6000806040838503121561032957600080fd5b8235610334816102dc565b91506020830135610344816102dc565b809150509250929050565b60006020828403121561036157600080fd5b5051919050565b808201808211156101da57634e487b7160e01b600052601160045260246000fdfea26469706673582212209d275f5b6b2c0e4f549c3e731b1e4ec56eb4b1ed245f433dab8ae6d5e7013a1564736f6c63430008140033",
247
+ "linkReferences": {
248
+ "contracts/types/Seconds.sol": {
249
+ "SecondsLib": [
250
+ {
251
+ "length": 20,
252
+ "start": 614
253
+ }
254
+ ]
255
+ }
256
+ },
257
+ "deployedLinkReferences": {
258
+ "contracts/types/Seconds.sol": {
259
+ "SecondsLib": [
260
+ {
261
+ "length": 20,
262
+ "start": 556
263
+ }
264
+ ]
265
+ }
266
+ }
249
267
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/2d0d5ac9f3af33498ef492a7caeac063.json"
3
+ "buildInfo": "../../../build-info/a8e58e3e317904030d8bf765133d5722.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/2d0d5ac9f3af33498ef492a7caeac063.json"
3
+ "buildInfo": "../../../build-info/a8e58e3e317904030d8bf765133d5722.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/2d0d5ac9f3af33498ef492a7caeac063.json"
3
+ "buildInfo": "../../../build-info/a8e58e3e317904030d8bf765133d5722.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/2d0d5ac9f3af33498ef492a7caeac063.json"
3
+ "buildInfo": "../../../build-info/a8e58e3e317904030d8bf765133d5722.json"
4
4
  }
@@ -0,0 +1,221 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.20;
3
+
4
+ import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
5
+ import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
6
+ import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";
7
+
8
+ import {IComponent} from "./IComponent.sol";
9
+ import {IProductService} from "../instance/service/IProductService.sol";
10
+ import {IInstanceService} from "../instance/IInstanceService.sol";
11
+ import {IInstance} from "../instance/IInstance.sol";
12
+ import {InstanceAccessManager} from "../instance/InstanceAccessManager.sol";
13
+ import {InstanceReader} from "../instance/InstanceReader.sol";
14
+ import {IRegistry} from "../registry/IRegistry.sol";
15
+ import {NftId} from "../types/NftId.sol";
16
+ import {ObjectType, INSTANCE, PRODUCT} from "../types/ObjectType.sol";
17
+ import {VersionPart} from "../types/Version.sol";
18
+ import {Registerable} from "../shared/Registerable.sol";
19
+ import {RoleId, RoleIdLib} from "../types/RoleId.sol";
20
+ import {IAccess} from "../instance/module/IAccess.sol";
21
+ import {VersionPart} from "../types/Version.sol";
22
+
23
+ // TODO discuss to inherit from oz accessmanaged
24
+ // then add (Distribution|Pool|Product)Upradeable that also intherit from Versionable
25
+ // same pattern as for Service which is also upgradeable
26
+ abstract contract Component is
27
+ Registerable,
28
+ IComponent,
29
+ AccessManagedUpgradeable
30
+ {
31
+ // keccak256(abi.encode(uint256(keccak256("gif-next.contracts.component.Component.sol")) - 1)) & ~bytes32(uint256(0xff));
32
+ bytes32 public constant COMPONENT_LOCATION_V1 = 0xffe8d4462baed26a47154f4b8f6db497d2f772496965791d25bd456e342b7f00;
33
+
34
+ struct ComponentStorage {
35
+ string _name; // unique (per instance) component name
36
+ IERC20Metadata _token; // token for this component
37
+ IInstance _instance; // instance for this component
38
+ address _wallet; // wallet for this component (default = component contract itself)
39
+ InstanceReader _instanceReader; // instance reader for this component
40
+ bool _isNftInterceptor; // declares if component is involved in nft transfers
41
+ NftId _productNftId; // only relevant for components that are linked to a aproduct
42
+ }
43
+
44
+ function _getComponentStorage() private pure returns (ComponentStorage storage $) {
45
+ assembly {
46
+ $.slot := COMPONENT_LOCATION_V1
47
+ }
48
+ }
49
+
50
+ function initializeComponent(
51
+ address registry,
52
+ NftId instanceNftId,
53
+ string memory name,
54
+ address token,
55
+ ObjectType componentType,
56
+ bool isInterceptor,
57
+ address initialOwner,
58
+ bytes memory registryData // writeonly data that will saved in the object info record of the registry
59
+ )
60
+ public
61
+ virtual
62
+ onlyInitializing()
63
+ {
64
+ initializeRegisterable(registry, instanceNftId, componentType, isInterceptor, initialOwner, registryData);
65
+
66
+ // set and check linked instance
67
+ ComponentStorage storage $ = _getComponentStorage();
68
+ $._instance = IInstance(
69
+ getRegistry().getObjectInfo(instanceNftId).objectAddress);
70
+
71
+ if(!$._instance.supportsInterface(type(IInstance).interfaceId)) {
72
+ revert ErrorComponentNotInstance(instanceNftId);
73
+ }
74
+
75
+ // initialize AccessManagedUpgradeable
76
+ __AccessManaged_init($._instance.authority());
77
+
78
+ // set component state
79
+ $._name = name;
80
+ $._isNftInterceptor = isInterceptor;
81
+ $._instanceReader = $._instance.getInstanceReader();
82
+ $._wallet = address(this);
83
+ $._token = IERC20Metadata(token);
84
+
85
+ registerInterface(type(IComponent).interfaceId);
86
+ }
87
+
88
+ function lock() external onlyOwner override {
89
+ IInstanceService(_getServiceAddress(INSTANCE())).setTargetLocked(getName(), true);
90
+ }
91
+
92
+ function unlock() external onlyOwner override {
93
+ IInstanceService(_getServiceAddress(INSTANCE())).setTargetLocked(getName(), false);
94
+ }
95
+
96
+ function setWallet(address newWallet)
97
+ external
98
+ override
99
+ onlyOwner
100
+ {
101
+ ComponentStorage storage $ = _getComponentStorage();
102
+
103
+ address currentWallet = $._wallet;
104
+ uint256 currentBalance = $._token.balanceOf(currentWallet);
105
+
106
+ // checks
107
+ if (newWallet == address(0)) {
108
+ revert ErrorComponentWalletAddressZero();
109
+ }
110
+
111
+ if (newWallet == currentWallet) {
112
+ revert ErrorComponentWalletAddressIsSameAsCurrent();
113
+ }
114
+
115
+ if (currentBalance > 0) {
116
+ if (currentWallet == address(this)) {
117
+ // move tokens from component smart contract to external wallet
118
+ } else {
119
+ // move tokens from external wallet to component smart contract or another external wallet
120
+ uint256 allowance = $._token.allowance(currentWallet, address(this));
121
+ if (allowance < currentBalance) {
122
+ revert ErrorComponentWalletAllowanceTooSmall(currentWallet, newWallet, allowance, currentBalance);
123
+ }
124
+ }
125
+ }
126
+
127
+ // effects
128
+ $._wallet = newWallet;
129
+ emit LogComponentWalletAddressChanged(currentWallet, newWallet);
130
+
131
+ // interactions
132
+ if (currentBalance > 0) {
133
+ // transfer tokens from current wallet to new wallet
134
+ if (currentWallet == address(this)) {
135
+ // transferFrom requires self allowance too
136
+ $._token.approve(address(this), currentBalance);
137
+ }
138
+
139
+ SafeERC20.safeTransferFrom($._token, currentWallet, newWallet, currentBalance);
140
+ emit LogComponentWalletTokensTransferred(currentWallet, newWallet, currentBalance);
141
+ }
142
+ }
143
+
144
+ function setProductNftId(NftId productNftId)
145
+ external
146
+ override
147
+ {
148
+ ComponentStorage storage $ = _getComponentStorage();
149
+
150
+ // verify caller is product service
151
+ if(msg.sender != _getServiceAddress(PRODUCT())) {
152
+ revert ErrorComponentNotProductService(msg.sender);
153
+ }
154
+
155
+ // verify component is not yet linked to a product
156
+ if($._productNftId.gtz()) {
157
+ revert ErrorComponentProductNftAlreadySet();
158
+ }
159
+
160
+ $._productNftId = productNftId;
161
+ }
162
+
163
+ /// @dev callback function for nft transfers
164
+ /// may only be called by chain nft contract.
165
+ /// do not override this function to implement business logic for handling transfers
166
+ /// override internal function _nftTransferFrom instead
167
+ function nftTransferFrom(address from, address to, uint256 tokenId)
168
+ external
169
+ virtual override
170
+ {
171
+ if(msg.sender != getRegistry().getChainNftAddress()) {
172
+ revert ErrorComponentNotChainNft(msg.sender);
173
+ }
174
+
175
+ _nftTransferFrom(from, to, tokenId);
176
+ }
177
+
178
+ function getWallet() public view override returns (address walletAddress)
179
+ {
180
+ return _getComponentStorage()._wallet;
181
+ }
182
+
183
+ function getToken() public view override returns (IERC20Metadata token) {
184
+ return _getComponentStorage()._token;
185
+ }
186
+
187
+ function isNftInterceptor() public view override returns(bool isInterceptor) {
188
+ return _getComponentStorage()._isNftInterceptor;
189
+ }
190
+
191
+ function getInstance() public view override returns (IInstance instance) {
192
+ return _getComponentStorage()._instance;
193
+ }
194
+
195
+ function getName() public view override returns(string memory name) {
196
+ return _getComponentStorage()._name;
197
+ }
198
+
199
+ function getProductNftId() public view override returns (NftId productNftId) {
200
+ return _getComponentStorage()._productNftId;
201
+ }
202
+
203
+ /// @dev internal function for nft transfers.
204
+ /// handling logic that deals with nft transfers need to overwrite this function
205
+ function _nftTransferFrom(address from, address to, uint256 tokenId)
206
+ internal
207
+ virtual
208
+ { }
209
+
210
+ /// @dev returns reader for linked instance
211
+ function _getInstanceReader() internal view returns (InstanceReader reader) {
212
+ return _getComponentStorage()._instanceReader;
213
+ }
214
+
215
+ /// @dev returns the service address for the specified domain
216
+ /// gets address via lookup from registry using the major version form the linked instance
217
+ function _getServiceAddress(ObjectType domain) internal view returns (address service) {
218
+ VersionPart majorVersion = _getComponentStorage()._instance.getMajorVersion();
219
+ return getRegistry().getServiceAddress(domain, majorVersion);
220
+ }
221
+ }