@etherisc/gif-next 0.0.2-d3543ee-345 → 0.0.2-d679de9-140

Sign up to get free protection for your applications and to get access to all the features.
Files changed (322) hide show
  1. package/README.md +76 -0
  2. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +4 -0
  3. package/artifacts/contracts/components/{Component.sol/Component.json → BaseComponent.sol/BaseComponent.json} +26 -57
  4. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +4 -0
  5. package/artifacts/contracts/{instance/component/IComponent.sol/IComponentContract.json → components/IBaseComponent.sol/IBaseComponent.json} +26 -57
  6. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +4 -0
  7. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +356 -0
  8. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +4 -0
  9. package/artifacts/contracts/components/{IPool.sol/IPoolComponent.json → IProductComponent.sol/IProductComponent.json} +89 -65
  10. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  11. package/artifacts/contracts/components/Pool.sol/Pool.json +134 -75
  12. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  13. package/artifacts/contracts/components/Product.sol/Product.json +72 -113
  14. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
  15. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  16. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  17. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  18. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  19. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  20. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  21. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  22. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  23. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  24. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
  26. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
  28. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
  29. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +2 -2
  30. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
  31. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +2 -2
  32. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  33. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  34. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  35. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +719 -332
  36. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +4 -0
  37. package/artifacts/contracts/instance/{component/IComponent.sol → IInstanceLinked.sol}/IInstanceLinked.json +1 -1
  38. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  39. package/artifacts/contracts/instance/Instance.sol/Instance.json +962 -531
  40. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
  41. package/artifacts/contracts/instance/{component/ComponentModule.sol/ComponentModule.json → base/ComponentServiceBase.sol/ComponentServiceBase.json} +133 -132
  42. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
  43. package/artifacts/contracts/instance/{product/ProductService.sol/ProductModule.json → base/IInstanceBase.sol/IInstanceBase.json} +18 -30
  44. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
  45. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +511 -0
  46. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
  47. package/artifacts/contracts/instance/{lifecycle/ILifecycle.sol/ILifecycleModule.json → base/ILifecycle.sol/ILifecycle.json} +10 -77
  48. package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +4 -0
  49. package/artifacts/contracts/instance/base/IService.sol/IService.json +300 -0
  50. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +4 -0
  51. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +326 -0
  52. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
  53. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +692 -0
  54. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
  55. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +169 -0
  56. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +4 -0
  57. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.json +10 -0
  58. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +4 -0
  59. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.json +300 -0
  60. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +4 -0
  61. package/artifacts/contracts/instance/{access → module/access}/Access.sol/AccessModule.json +85 -152
  62. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +4 -0
  63. package/artifacts/contracts/instance/{access → module/access}/IAccess.sol/IAccess.json +1 -1
  64. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +4 -0
  65. package/artifacts/contracts/instance/{access → module/access}/IAccess.sol/IAccessModule.json +96 -99
  66. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +4 -0
  67. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +296 -0
  68. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +4 -0
  69. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.json +10 -0
  70. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +4 -0
  71. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +296 -0
  72. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.dbg.json +4 -0
  73. package/artifacts/contracts/instance/module/compensation/CompensationModule.sol/CompensationModule.json +10 -0
  74. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.dbg.json +4 -0
  75. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensation.json +10 -0
  76. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.dbg.json +4 -0
  77. package/artifacts/contracts/instance/module/compensation/ICompensation.sol/ICompensationModule.json +10 -0
  78. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +4 -0
  79. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +188 -0
  80. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +4 -0
  81. package/artifacts/contracts/instance/{component → module/component}/IComponent.sol/IComponent.json +1 -1
  82. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +4 -0
  83. package/artifacts/contracts/instance/{component → module/component}/IComponent.sol/IComponentModule.json +33 -62
  84. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +4 -0
  85. package/artifacts/contracts/instance/{policy → module/policy}/IPolicy.sol/IPolicy.json +1 -1
  86. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +4 -0
  87. package/artifacts/contracts/instance/{policy → module/policy}/IPolicy.sol/IPolicyModule.json +132 -125
  88. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +4 -0
  89. package/artifacts/contracts/instance/{policy → module/policy}/PolicyModule.sol/PolicyModule.json +132 -125
  90. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +4 -0
  91. package/artifacts/contracts/instance/{pool → module/pool}/IPoolModule.sol/IPool.json +1 -1
  92. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +4 -0
  93. package/artifacts/contracts/instance/{pool → module/pool}/IPoolModule.sol/IPoolModule.json +67 -47
  94. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +4 -0
  95. package/artifacts/contracts/instance/{pool → module/pool}/PoolModule.sol/PoolModule.json +51 -57
  96. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +4 -0
  97. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.json +10 -0
  98. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +4 -0
  99. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +10 -0
  100. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +4 -0
  101. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +10 -0
  102. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +4 -0
  103. package/artifacts/contracts/instance/{treasury → module/treasury}/ITreasury.sol/ITreasury.json +1 -1
  104. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +4 -0
  105. package/artifacts/contracts/instance/{treasury → module/treasury}/ITreasury.sol/ITreasuryModule.json +100 -57
  106. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +4 -0
  107. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +76 -0
  108. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +4 -0
  109. package/artifacts/contracts/instance/{treasury → module/treasury}/TreasuryModule.sol/TreasuryModule.json +100 -57
  110. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +4 -0
  111. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +491 -0
  112. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +4 -0
  113. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +364 -0
  114. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +4 -0
  115. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +376 -0
  116. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +4 -0
  117. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +477 -0
  118. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +4 -0
  119. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +471 -0
  120. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +4 -0
  121. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +673 -0
  122. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  123. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +65 -2
  124. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
  125. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  126. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +147 -30
  127. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +4 -0
  128. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.json +24 -0
  129. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  130. package/artifacts/contracts/registry/Registry.sol/Registry.json +241 -25
  131. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +4 -0
  132. package/artifacts/contracts/shared/ERC165.sol/ERC165.json +35 -0
  133. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +4 -0
  134. package/artifacts/contracts/{registry/IRegistry.sol → shared/IOwnable.sol}/IOwnable.json +1 -1
  135. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +4 -0
  136. package/artifacts/contracts/{registry/IRegistry.sol → shared/IRegisterable.sol}/IRegisterable.json +16 -61
  137. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +4 -0
  138. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +164 -0
  139. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +4 -0
  140. package/artifacts/contracts/{registry/Registry.sol → shared/Registerable.sol}/Registerable.json +16 -61
  141. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +4 -0
  142. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +164 -0
  143. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +4 -0
  144. package/artifacts/contracts/test/TestFee.sol/TestFee.json +119 -0
  145. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +4 -0
  146. package/artifacts/contracts/test/TestPool.sol/TestPool.json +387 -0
  147. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +4 -0
  148. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +393 -0
  149. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +4 -0
  150. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +137 -0
  151. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +4 -0
  152. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +82 -0
  153. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +4 -0
  154. package/artifacts/contracts/test/TestService.sol/TestService.json +379 -0
  155. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +4 -0
  156. package/artifacts/contracts/test/TestToken.sol/TestUsdc.json +338 -0
  157. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +4 -0
  158. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +218 -0
  159. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +4 -0
  160. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +206 -0
  161. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +4 -0
  162. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.json +10 -0
  163. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  164. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  165. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +4 -0
  166. package/artifacts/contracts/types/Fee.sol/FeeLib.json +218 -0
  167. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +4 -0
  168. package/artifacts/contracts/types/Key32.sol/Key32Lib.json +111 -0
  169. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  170. package/artifacts/contracts/types/NftId.sol/NftIdLib.json +65 -4
  171. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +4 -0
  172. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +10 -0
  173. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  174. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.json +2 -2
  175. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  176. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  177. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  178. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +64 -2
  179. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
  180. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +88 -62
  181. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +4 -0
  182. package/artifacts/contracts/types/Version.sol/VersionLib.json +139 -0
  183. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +4 -0
  184. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +30 -0
  185. package/contracts/components/BaseComponent.sol +88 -0
  186. package/contracts/components/IBaseComponent.sol +19 -0
  187. package/contracts/components/IPoolComponent.sol +57 -0
  188. package/contracts/components/{IProduct.sol → IProductComponent.sol} +9 -6
  189. package/contracts/components/Pool.sol +140 -18
  190. package/contracts/components/Product.sol +53 -25
  191. package/contracts/instance/IInstance.sol +38 -11
  192. package/contracts/instance/IInstanceLinked.sol +8 -0
  193. package/contracts/instance/Instance.sol +44 -48
  194. package/contracts/instance/base/ComponentServiceBase.sol +42 -0
  195. package/contracts/instance/base/IInstanceBase.sol +14 -0
  196. package/contracts/instance/base/IKeyValueStore.sol +49 -0
  197. package/contracts/instance/{lifecycle → base}/ILifecycle.sol +4 -21
  198. package/contracts/instance/base/IService.sol +15 -0
  199. package/contracts/instance/base/InstanceBase.sol +80 -0
  200. package/contracts/instance/base/KeyValueStore.sol +156 -0
  201. package/contracts/instance/{lifecycle/LifecycleModule.sol → base/Lifecycle.sol} +36 -29
  202. package/contracts/instance/base/ModuleBase.sol +52 -0
  203. package/contracts/instance/base/ServiceBase.sol +37 -0
  204. package/contracts/instance/module/access/Access.sol +149 -0
  205. package/contracts/instance/module/access/IAccess.sol +53 -0
  206. package/contracts/instance/module/bundle/BundleModule.sol +136 -0
  207. package/contracts/instance/module/bundle/IBundle.sol +58 -0
  208. package/contracts/instance/module/compensation/CompensationModule.sol +8 -0
  209. package/contracts/instance/module/compensation/ICompensation.sol +10 -0
  210. package/contracts/instance/module/component/ComponentModule.sol +95 -0
  211. package/contracts/instance/module/component/IComponent.sol +53 -0
  212. package/contracts/instance/module/policy/IPolicy.sol +60 -0
  213. package/contracts/instance/module/policy/PolicyModule.sol +76 -0
  214. package/contracts/instance/module/pool/IPoolModule.sol +41 -0
  215. package/contracts/instance/module/pool/PoolModule.sol +87 -0
  216. package/contracts/instance/module/risk/IRisk.sol +10 -0
  217. package/contracts/instance/module/risk/RiskModule.sol +8 -0
  218. package/contracts/instance/{treasury → module/treasury}/ITreasury.sol +27 -15
  219. package/contracts/instance/module/treasury/TokenHandler.sol +48 -0
  220. package/contracts/instance/{treasury → module/treasury}/TreasuryModule.sol +43 -59
  221. package/contracts/instance/service/ComponentOwnerService.sol +170 -0
  222. package/contracts/instance/service/IComponentOwnerService.sol +22 -0
  223. package/contracts/instance/service/IPoolService.sol +30 -0
  224. package/contracts/instance/service/IProductService.sol +58 -0
  225. package/contracts/instance/service/PoolService.sol +123 -0
  226. package/contracts/instance/service/ProductService.sol +354 -0
  227. package/contracts/registry/ChainNft.sol +61 -37
  228. package/contracts/registry/IRegistry.sol +24 -34
  229. package/contracts/registry/IRegistryLinked.sol +8 -0
  230. package/contracts/registry/Registry.sol +284 -85
  231. package/contracts/shared/ERC165.sol +21 -0
  232. package/contracts/shared/IOwnable.sol +6 -0
  233. package/contracts/shared/IRegisterable.sol +24 -0
  234. package/contracts/shared/IVersionable.sol +52 -0
  235. package/contracts/shared/Registerable.sol +86 -0
  236. package/contracts/shared/Versionable.sol +89 -0
  237. package/contracts/test/TestFee.sol +25 -0
  238. package/contracts/test/TestPool.sol +22 -0
  239. package/contracts/test/TestProduct.sol +44 -0
  240. package/contracts/test/TestRegisterable.sol +19 -0
  241. package/contracts/test/TestRoleId.sol +14 -0
  242. package/contracts/test/TestService.sol +32 -0
  243. package/contracts/test/TestToken.sol +26 -0
  244. package/contracts/test/TestVersion.sol +44 -0
  245. package/contracts/test/TestVersionable.sol +17 -0
  246. package/contracts/types/AddressSet.sol +58 -0
  247. package/contracts/types/Fee.sol +39 -20
  248. package/contracts/types/Key32.sol +45 -0
  249. package/contracts/types/NftId.sol +22 -1
  250. package/contracts/types/NftIdSet.sol +60 -0
  251. package/contracts/types/ObjectType.sol +22 -14
  252. package/contracts/types/RoleId.sol +36 -0
  253. package/contracts/types/StateId.sol +13 -3
  254. package/contracts/types/Timestamp.sol +22 -1
  255. package/contracts/types/UFixed.sol +29 -25
  256. package/contracts/types/Version.sol +95 -0
  257. package/package.json +8 -3
  258. package/artifacts/contracts/components/Component.sol/Component.dbg.json +0 -4
  259. package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +0 -4
  260. package/artifacts/contracts/components/Component.sol/InstanceLinked.json +0 -35
  261. package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +0 -4
  262. package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +0 -4
  263. package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +0 -74
  264. package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +0 -4
  265. package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +0 -4
  266. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +0 -4
  267. package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.json +0 -35
  268. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +0 -4
  269. package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.json +0 -50
  270. package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +0 -4
  271. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +0 -4
  272. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +0 -4
  273. package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +0 -202
  274. package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +0 -4
  275. package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +0 -4
  276. package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +0 -4
  277. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +0 -4
  278. package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +0 -141
  279. package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +0 -4
  280. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
  281. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
  282. package/artifacts/contracts/instance/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
  283. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
  284. package/artifacts/contracts/instance/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
  285. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +0 -4
  286. package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +0 -4
  287. package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +0 -4
  288. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +0 -4
  289. package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +0 -4
  290. package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +0 -4
  291. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +0 -4
  292. package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.json +0 -75
  293. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +0 -4
  294. package/artifacts/contracts/instance/product/IProductService.sol/IProductService.json +0 -127
  295. package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +0 -4
  296. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +0 -4
  297. package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +0 -196
  298. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasury.dbg.json +0 -4
  299. package/artifacts/contracts/instance/treasury/ITreasury.sol/ITreasuryModule.dbg.json +0 -4
  300. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.dbg.json +0 -4
  301. package/artifacts/contracts/instance/treasury/TokenHandler.sol/TokenHandler.json +0 -45
  302. package/artifacts/contracts/instance/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +0 -4
  303. package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +0 -4
  304. package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +0 -4
  305. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +0 -4
  306. package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.json +0 -49
  307. package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +0 -4
  308. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +0 -4
  309. package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +0 -60
  310. package/contracts/components/Component.sol +0 -77
  311. package/contracts/components/IPool.sol +0 -15
  312. package/contracts/instance/access/Access.sol +0 -165
  313. package/contracts/instance/access/IAccess.sol +0 -63
  314. package/contracts/instance/component/ComponentModule.sol +0 -274
  315. package/contracts/instance/component/IComponent.sol +0 -74
  316. package/contracts/instance/policy/IPolicy.sol +0 -50
  317. package/contracts/instance/policy/PolicyModule.sol +0 -114
  318. package/contracts/instance/pool/IPoolModule.sol +0 -23
  319. package/contracts/instance/pool/PoolModule.sol +0 -81
  320. package/contracts/instance/product/IProductService.sol +0 -36
  321. package/contracts/instance/product/ProductService.sol +0 -136
  322. package/contracts/instance/treasury/TokenHandler.sol +0 -24
@@ -44,15 +44,41 @@
44
44
  },
45
45
  {
46
46
  "inputs": [],
47
- "name": "ROUNDING_DEFAULT",
47
+ "name": "ROUNDING_DOWN",
48
48
  "outputs": [
49
49
  {
50
- "internalType": "enum UFixedMathLib.Rounding",
50
+ "internalType": "uint8",
51
51
  "name": "",
52
- "type": "UFixedMathLib.Rounding"
52
+ "type": "uint8"
53
53
  }
54
54
  ],
55
- "stateMutability": "view",
55
+ "stateMutability": "pure",
56
+ "type": "function"
57
+ },
58
+ {
59
+ "inputs": [],
60
+ "name": "ROUNDING_HALF_UP",
61
+ "outputs": [
62
+ {
63
+ "internalType": "uint8",
64
+ "name": "",
65
+ "type": "uint8"
66
+ }
67
+ ],
68
+ "stateMutability": "pure",
69
+ "type": "function"
70
+ },
71
+ {
72
+ "inputs": [],
73
+ "name": "ROUNDING_UP",
74
+ "outputs": [
75
+ {
76
+ "internalType": "uint8",
77
+ "name": "",
78
+ "type": "uint8"
79
+ }
80
+ ],
81
+ "stateMutability": "pure",
56
82
  "type": "function"
57
83
  },
58
84
  {
@@ -189,14 +215,19 @@
189
215
  "internalType": "UFixed",
190
216
  "name": "a",
191
217
  "type": "uint256"
218
+ },
219
+ {
220
+ "internalType": "UFixed",
221
+ "name": "b",
222
+ "type": "uint256"
192
223
  }
193
224
  ],
194
- "name": "ftoi",
225
+ "name": "gt",
195
226
  "outputs": [
196
227
  {
197
- "internalType": "uint256",
198
- "name": "",
199
- "type": "uint256"
228
+ "internalType": "bool",
229
+ "name": "isGreaterThan",
230
+ "type": "bool"
200
231
  }
201
232
  ],
202
233
  "stateMutability": "pure",
@@ -210,17 +241,17 @@
210
241
  "type": "uint256"
211
242
  },
212
243
  {
213
- "internalType": "enum UFixedMathLib.Rounding",
214
- "name": "rounding",
215
- "type": "UFixedMathLib.Rounding"
244
+ "internalType": "UFixed",
245
+ "name": "b",
246
+ "type": "uint256"
216
247
  }
217
248
  ],
218
- "name": "ftoi",
249
+ "name": "gte",
219
250
  "outputs": [
220
251
  {
221
- "internalType": "uint256",
222
- "name": "",
223
- "type": "uint256"
252
+ "internalType": "bool",
253
+ "name": "isGreaterThan",
254
+ "type": "bool"
224
255
  }
225
256
  ],
226
257
  "stateMutability": "pure",
@@ -232,18 +263,13 @@
232
263
  "internalType": "UFixed",
233
264
  "name": "a",
234
265
  "type": "uint256"
235
- },
236
- {
237
- "internalType": "UFixed",
238
- "name": "b",
239
- "type": "uint256"
240
266
  }
241
267
  ],
242
- "name": "gt",
268
+ "name": "gtz",
243
269
  "outputs": [
244
270
  {
245
271
  "internalType": "bool",
246
- "name": "isGreaterThan",
272
+ "name": "isZero",
247
273
  "type": "bool"
248
274
  }
249
275
  ],
@@ -263,7 +289,7 @@
263
289
  "type": "uint256"
264
290
  }
265
291
  ],
266
- "name": "gte",
292
+ "name": "lt",
267
293
  "outputs": [
268
294
  {
269
295
  "internalType": "bool",
@@ -280,13 +306,18 @@
280
306
  "internalType": "UFixed",
281
307
  "name": "a",
282
308
  "type": "uint256"
309
+ },
310
+ {
311
+ "internalType": "UFixed",
312
+ "name": "b",
313
+ "type": "uint256"
283
314
  }
284
315
  ],
285
- "name": "gtz",
316
+ "name": "lte",
286
317
  "outputs": [
287
318
  {
288
319
  "internalType": "bool",
289
- "name": "isZero",
320
+ "name": "isGreaterThan",
290
321
  "type": "bool"
291
322
  }
292
323
  ],
@@ -296,12 +327,17 @@
296
327
  {
297
328
  "inputs": [
298
329
  {
299
- "internalType": "uint256",
330
+ "internalType": "UFixed",
300
331
  "name": "a",
301
332
  "type": "uint256"
333
+ },
334
+ {
335
+ "internalType": "UFixed",
336
+ "name": "b",
337
+ "type": "uint256"
302
338
  }
303
339
  ],
304
- "name": "itof",
340
+ "name": "mul",
305
341
  "outputs": [
306
342
  {
307
343
  "internalType": "UFixed",
@@ -315,17 +351,17 @@
315
351
  {
316
352
  "inputs": [
317
353
  {
318
- "internalType": "uint256",
354
+ "internalType": "UFixed",
319
355
  "name": "a",
320
356
  "type": "uint256"
321
357
  },
322
358
  {
323
- "internalType": "int8",
324
- "name": "exp",
325
- "type": "int8"
359
+ "internalType": "UFixed",
360
+ "name": "b",
361
+ "type": "uint256"
326
362
  }
327
363
  ],
328
- "name": "itof",
364
+ "name": "sub",
329
365
  "outputs": [
330
366
  {
331
367
  "internalType": "UFixed",
@@ -342,19 +378,14 @@
342
378
  "internalType": "UFixed",
343
379
  "name": "a",
344
380
  "type": "uint256"
345
- },
346
- {
347
- "internalType": "UFixed",
348
- "name": "b",
349
- "type": "uint256"
350
381
  }
351
382
  ],
352
- "name": "lt",
383
+ "name": "toInt",
353
384
  "outputs": [
354
385
  {
355
- "internalType": "bool",
356
- "name": "isGreaterThan",
357
- "type": "bool"
386
+ "internalType": "uint256",
387
+ "name": "",
388
+ "type": "uint256"
358
389
  }
359
390
  ],
360
391
  "stateMutability": "pure",
@@ -368,17 +399,17 @@
368
399
  "type": "uint256"
369
400
  },
370
401
  {
371
- "internalType": "UFixed",
372
- "name": "b",
373
- "type": "uint256"
402
+ "internalType": "uint8",
403
+ "name": "rounding",
404
+ "type": "uint8"
374
405
  }
375
406
  ],
376
- "name": "lte",
407
+ "name": "toIntWithRounding",
377
408
  "outputs": [
378
409
  {
379
- "internalType": "bool",
380
- "name": "isGreaterThan",
381
- "type": "bool"
410
+ "internalType": "uint256",
411
+ "name": "",
412
+ "type": "uint256"
382
413
  }
383
414
  ],
384
415
  "stateMutability": "pure",
@@ -387,17 +418,17 @@
387
418
  {
388
419
  "inputs": [
389
420
  {
390
- "internalType": "UFixed",
421
+ "internalType": "uint256",
391
422
  "name": "a",
392
423
  "type": "uint256"
393
424
  },
394
425
  {
395
- "internalType": "UFixed",
396
- "name": "b",
397
- "type": "uint256"
426
+ "internalType": "int8",
427
+ "name": "exp",
428
+ "type": "int8"
398
429
  }
399
430
  ],
400
- "name": "mul",
431
+ "name": "toUFixed",
401
432
  "outputs": [
402
433
  {
403
434
  "internalType": "UFixed",
@@ -411,17 +442,12 @@
411
442
  {
412
443
  "inputs": [
413
444
  {
414
- "internalType": "UFixed",
445
+ "internalType": "uint256",
415
446
  "name": "a",
416
447
  "type": "uint256"
417
- },
418
- {
419
- "internalType": "UFixed",
420
- "name": "b",
421
- "type": "uint256"
422
448
  }
423
449
  ],
424
- "name": "sub",
450
+ "name": "toUFixed",
425
451
  "outputs": [
426
452
  {
427
453
  "internalType": "UFixed",
@@ -446,8 +472,8 @@
446
472
  "type": "function"
447
473
  }
448
474
  ],
449
- "bytecode": "0x611461610053600b82828239805160001a607314610046577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061014c5760003560e01c8063b4773329116100c2578063d05b045211610086578063d05b045214610409578063dd45daa114610439578063ea6515c414610469578063eb646d7114610499578063f30ed598146104b7578063f70dd33e146104d55761014c565b8063b47733291461032b578063b67d77c51461035b578063bc1b392d1461038b578063c8a4ac9c146103a9578063cc8b7b73146103d95761014c565b806332148d731161011457806332148d731461020b578063753b14a51461023b578063771602f71461026b5780637a858b971461029b57806392ae8ce0146102cb578063a391c15b146102fb5761014c565b8063059f8b1614610151578063118fc88c1461016f5780631a12cd471461019f57806321e5749b146101bd578063313ce567146101ed575b600080fd5b610159610505565b6040516101669190610b5e565b60405180910390f35b61018960048036038101906101849190610baa565b610519565b6040516101969190610c05565b60405180910390f35b6101a761052d565b6040516101b49190610c3c565b60405180910390f35b6101d760048036038101906101d29190610baa565b610532565b6040516101e49190610c05565b60405180910390f35b6101f5610546565b6040516102029190610b5e565b60405180910390f35b61022560048036038101906102209190610baa565b610552565b6040516102329190610c05565b60405180910390f35b61025560048036038101906102509190610c57565b610566565b6040516102629190610c05565b60405180910390f35b61028560048036038101906102809190610baa565b610578565b6040516102929190610cbf565b60405180910390f35b6102b560048036038101906102b09190610c57565b61058c565b6040516102c29190610c05565b60405180910390f35b6102e560048036038101906102e09190610d06565b61059e565b6040516102f29190610cbf565b60405180910390f35b61031560048036038101906103109190610baa565b6105c3565b6040516103229190610cbf565b60405180910390f35b61034560048036038101906103409190610baa565b6105d7565b6040516103529190610c05565b60405180910390f35b61037560048036038101906103709190610baa565b6105eb565b6040516103829190610cbf565b60405180910390f35b6103936105ff565b6040516103a09190610cbf565b60405180910390f35b6103c360048036038101906103be9190610baa565b610604565b6040516103d09190610cbf565b60405180910390f35b6103f360048036038101906103ee9190610baa565b610618565b6040516104009190610cbf565b60405180910390f35b610423600480360381019061041e9190610c57565b61062c565b6040516104309190610b5e565b60405180910390f35b610453600480360381019061044e9190610d5f565b610640565b6040516104609190610cbf565b60405180910390f35b610483600480360381019061047e9190610baa565b610713565b6040516104909190610c05565b60405180910390f35b6104a1610727565b6040516104ae9190610b5e565b60405180910390f35b6104bf610747565b6040516104cc9190610e16565b60405180910390f35b6104ef60048036038101906104ea9190610e56565b61074c565b6040516104fc9190610b5e565b60405180910390f35b601260000b600a6105169190610ff8565b81565b6000610525838361083d565b905092915050565b601281565b600061053e838361084a565b905092915050565b6000601260ff16905090565b600061055e8383610857565b905092915050565b600061057182610864565b9050919050565b60006105848383610870565b905092915050565b600061059782610886565b9050919050565b6000601260000b600a6105b19190610ff8565b826105bc9190611043565b9050919050565b60006105cf8383610892565b905092915050565b60006105e383836108f1565b905092915050565b60006105f783836108ff565b905092915050565b600090565b6000610610838361095e565b905092915050565b6000610624838361097b565b905092915050565b600061063982600261074c565b9050919050565b6000808260126106509190611085565b60000b1215610694576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068b9061113b565b60405180910390fd5b60408260126106a39190611085565b60000b13156106e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106de906111a7565b60405180910390fd5b8160126106f49190611085565b600a61070091906111d4565b8361070b9190611043565b905092915050565b600061071f83836109b0565b905092915050565b6002601260000b600a61073a9190610ff8565b610744919061124e565b81565b600281565b600060028081111561076157610760610d9f565b5b82600281111561077457610773610d9f565b5b036107c5576107be6002601260000b600a61078f9190610ff8565b610799919061124e565b846107a4919061127f565b6001601260000b600a6107b79190610ff8565b60006109be565b9050610837565b600060028111156107d9576107d8610d9f565b5b8260028111156107ec576107eb610d9f565b5b036108165761080f836001601260000b600a6108089190610ff8565b60006109be565b9050610837565b610834836001601260000b600a61082d9190610ff8565b60016109be565b90505b92915050565b6000818310905092915050565b6000818311905092915050565b6000818314905092915050565b60008082149050919050565b6000818361087e919061127f565b905092915050565b60008082119050919050565b60008082116108d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108cd906112ff565b60405180910390fd5b6108e983670de0b6b3a764000084610a34565b905092915050565b600081831015905092915050565b600061090b83836108f1565b61094a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109419061136b565b60405180910390fd5b8183610956919061138b565b905092915050565b60006109738383670de0b6b3a7640000610a34565b905092915050565b6000610987838361084a565b1561099d5761099683836108ff565b90506109aa565b6109a782846108ff565b90505b92915050565b600081831115905092915050565b6000806109cc868686610a34565b9050600160028111156109e2576109e1610d9f565b5b8360028111156109f5576109f4610d9f565b5b148015610a13575060008480610a0e57610a0d61121f565b5b868809115b15610a2857600181610a25919061127f565b90505b80915050949350505050565b6000806000801985870985870292508281108382030391505060008103610a6f57838281610a6557610a6461121f565b5b0492505050610b3e565b808411610ab1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa89061140b565b60405180910390fd5b60008486880990508281118203915080830392506000600186190186169050808604955080840493506001818260000304019050808302841793506000600287600302189050808702600203810290508087026002038102905080870260020381029050808702600203810290508087026002038102905080870260020381029050808502955050505050505b9392505050565b6000819050919050565b610b5881610b45565b82525050565b6000602082019050610b736000830184610b4f565b92915050565b600080fd5b610b8781610b45565b8114610b9257600080fd5b50565b600081359050610ba481610b7e565b92915050565b60008060408385031215610bc157610bc0610b79565b5b6000610bcf85828601610b95565b9250506020610be085828601610b95565b9150509250929050565b60008115159050919050565b610bff81610bea565b82525050565b6000602082019050610c1a6000830184610bf6565b92915050565b60008160000b9050919050565b610c3681610c20565b82525050565b6000602082019050610c516000830184610c2d565b92915050565b600060208284031215610c6d57610c6c610b79565b5b6000610c7b84828501610b95565b91505092915050565b6000819050919050565b6000610ca9610ca4610c9f84610b45565b610c84565b610b45565b9050919050565b610cb981610c8e565b82525050565b6000602082019050610cd46000830184610cb0565b92915050565b610ce381610b45565b8114610cee57600080fd5b50565b600081359050610d0081610cda565b92915050565b600060208284031215610d1c57610d1b610b79565b5b6000610d2a84828501610cf1565b91505092915050565b610d3c81610c20565b8114610d4757600080fd5b50565b600081359050610d5981610d33565b92915050565b60008060408385031215610d7657610d75610b79565b5b6000610d8485828601610cf1565b9250506020610d9585828601610d4a565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110610ddf57610dde610d9f565b5b50565b6000819050610df082610dce565b919050565b6000610e0082610de2565b9050919050565b610e1081610df5565b82525050565b6000602082019050610e2b6000830184610e07565b92915050565b60038110610e3e57600080fd5b50565b600081359050610e5081610e31565b92915050565b60008060408385031215610e6d57610e6c610b79565b5b6000610e7b85828601610b95565b9250506020610e8c85828601610e41565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115610f1c57808604811115610ef857610ef7610e96565b5b6001851615610f075780820291505b8081029050610f1585610ec5565b9450610edc565b94509492505050565b600082610f355760019050610ff1565b81610f435760009050610ff1565b8160018114610f595760028114610f6357610f92565b6001915050610ff1565b60ff841115610f7557610f74610e96565b5b8360020a915084821115610f8c57610f8b610e96565b5b50610ff1565b5060208310610133831016604e8410600b8410161715610fc75782820a905083811115610fc257610fc1610e96565b5b610ff1565b610fd48484846001610ed2565b92509050818404811115610feb57610fea610e96565b5b81810290505b9392505050565b600061100382610b45565b915061100e83610b45565b925061103b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610f25565b905092915050565b600061104e82610b45565b915061105983610b45565b925082820261106781610b45565b9150828204841483151761107e5761107d610e96565b5b5092915050565b600061109082610c20565b915061109b83610c20565b925082820190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808112607f821317156110d8576110d7610e96565b5b92915050565b600082825260208201905092915050565b7f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c00600082015250565b6000611125601f836110de565b9150611130826110ef565b602082019050919050565b6000602082019050818103600083015261115481611118565b9050919050565b7f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c4152474500600082015250565b6000611191601f836110de565b915061119c8261115b565b602082019050919050565b600060208201905081810360008301526111c081611184565b9050919050565b600060ff82169050919050565b60006111df82610b45565b91506111ea836111c7565b92506112177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610f25565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061125982610b45565b915061126483610b45565b9250826112745761127361121f565b5b828204905092915050565b600061128a82610b45565b915061129583610b45565b92508282019050808211156112ad576112ac610e96565b5b92915050565b7f4552524f523a55464d2d3032303a44495649534f525f5a45524f000000000000600082015250565b60006112e9601a836110de565b91506112f4826112b3565b602082019050919050565b60006020820190508181036000830152611318816112dc565b9050919050565b7f4552524f523a55464d2d3031303a4e454741544956455f524553554c54000000600082015250565b6000611355601d836110de565b91506113608261131f565b602082019050919050565b6000602082019050818103600083015261138481611348565b9050919050565b600061139682610b45565b91506113a183610b45565b92508282039050818111156113b9576113b8610e96565b5b92915050565b7f4d6174683a206d756c446976206f766572666c6f770000000000000000000000600082015250565b60006113f56015836110de565b9150611400826113bf565b602082019050919050565b60006020820190508181036000830152611424816113e8565b905091905056fea2646970667358221220af1ecc6c0c2b56505c376d0dd83afbf44fd70dba799e8cf7e1bf20908bc5c61764736f6c63430008140033",
450
- "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061014c5760003560e01c8063b4773329116100c2578063d05b045211610086578063d05b045214610409578063dd45daa114610439578063ea6515c414610469578063eb646d7114610499578063f30ed598146104b7578063f70dd33e146104d55761014c565b8063b47733291461032b578063b67d77c51461035b578063bc1b392d1461038b578063c8a4ac9c146103a9578063cc8b7b73146103d95761014c565b806332148d731161011457806332148d731461020b578063753b14a51461023b578063771602f71461026b5780637a858b971461029b57806392ae8ce0146102cb578063a391c15b146102fb5761014c565b8063059f8b1614610151578063118fc88c1461016f5780631a12cd471461019f57806321e5749b146101bd578063313ce567146101ed575b600080fd5b610159610505565b6040516101669190610b5e565b60405180910390f35b61018960048036038101906101849190610baa565b610519565b6040516101969190610c05565b60405180910390f35b6101a761052d565b6040516101b49190610c3c565b60405180910390f35b6101d760048036038101906101d29190610baa565b610532565b6040516101e49190610c05565b60405180910390f35b6101f5610546565b6040516102029190610b5e565b60405180910390f35b61022560048036038101906102209190610baa565b610552565b6040516102329190610c05565b60405180910390f35b61025560048036038101906102509190610c57565b610566565b6040516102629190610c05565b60405180910390f35b61028560048036038101906102809190610baa565b610578565b6040516102929190610cbf565b60405180910390f35b6102b560048036038101906102b09190610c57565b61058c565b6040516102c29190610c05565b60405180910390f35b6102e560048036038101906102e09190610d06565b61059e565b6040516102f29190610cbf565b60405180910390f35b61031560048036038101906103109190610baa565b6105c3565b6040516103229190610cbf565b60405180910390f35b61034560048036038101906103409190610baa565b6105d7565b6040516103529190610c05565b60405180910390f35b61037560048036038101906103709190610baa565b6105eb565b6040516103829190610cbf565b60405180910390f35b6103936105ff565b6040516103a09190610cbf565b60405180910390f35b6103c360048036038101906103be9190610baa565b610604565b6040516103d09190610cbf565b60405180910390f35b6103f360048036038101906103ee9190610baa565b610618565b6040516104009190610cbf565b60405180910390f35b610423600480360381019061041e9190610c57565b61062c565b6040516104309190610b5e565b60405180910390f35b610453600480360381019061044e9190610d5f565b610640565b6040516104609190610cbf565b60405180910390f35b610483600480360381019061047e9190610baa565b610713565b6040516104909190610c05565b60405180910390f35b6104a1610727565b6040516104ae9190610b5e565b60405180910390f35b6104bf610747565b6040516104cc9190610e16565b60405180910390f35b6104ef60048036038101906104ea9190610e56565b61074c565b6040516104fc9190610b5e565b60405180910390f35b601260000b600a6105169190610ff8565b81565b6000610525838361083d565b905092915050565b601281565b600061053e838361084a565b905092915050565b6000601260ff16905090565b600061055e8383610857565b905092915050565b600061057182610864565b9050919050565b60006105848383610870565b905092915050565b600061059782610886565b9050919050565b6000601260000b600a6105b19190610ff8565b826105bc9190611043565b9050919050565b60006105cf8383610892565b905092915050565b60006105e383836108f1565b905092915050565b60006105f783836108ff565b905092915050565b600090565b6000610610838361095e565b905092915050565b6000610624838361097b565b905092915050565b600061063982600261074c565b9050919050565b6000808260126106509190611085565b60000b1215610694576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068b9061113b565b60405180910390fd5b60408260126106a39190611085565b60000b13156106e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106de906111a7565b60405180910390fd5b8160126106f49190611085565b600a61070091906111d4565b8361070b9190611043565b905092915050565b600061071f83836109b0565b905092915050565b6002601260000b600a61073a9190610ff8565b610744919061124e565b81565b600281565b600060028081111561076157610760610d9f565b5b82600281111561077457610773610d9f565b5b036107c5576107be6002601260000b600a61078f9190610ff8565b610799919061124e565b846107a4919061127f565b6001601260000b600a6107b79190610ff8565b60006109be565b9050610837565b600060028111156107d9576107d8610d9f565b5b8260028111156107ec576107eb610d9f565b5b036108165761080f836001601260000b600a6108089190610ff8565b60006109be565b9050610837565b610834836001601260000b600a61082d9190610ff8565b60016109be565b90505b92915050565b6000818310905092915050565b6000818311905092915050565b6000818314905092915050565b60008082149050919050565b6000818361087e919061127f565b905092915050565b60008082119050919050565b60008082116108d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108cd906112ff565b60405180910390fd5b6108e983670de0b6b3a764000084610a34565b905092915050565b600081831015905092915050565b600061090b83836108f1565b61094a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109419061136b565b60405180910390fd5b8183610956919061138b565b905092915050565b60006109738383670de0b6b3a7640000610a34565b905092915050565b6000610987838361084a565b1561099d5761099683836108ff565b90506109aa565b6109a782846108ff565b90505b92915050565b600081831115905092915050565b6000806109cc868686610a34565b9050600160028111156109e2576109e1610d9f565b5b8360028111156109f5576109f4610d9f565b5b148015610a13575060008480610a0e57610a0d61121f565b5b868809115b15610a2857600181610a25919061127f565b90505b80915050949350505050565b6000806000801985870985870292508281108382030391505060008103610a6f57838281610a6557610a6461121f565b5b0492505050610b3e565b808411610ab1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aa89061140b565b60405180910390fd5b60008486880990508281118203915080830392506000600186190186169050808604955080840493506001818260000304019050808302841793506000600287600302189050808702600203810290508087026002038102905080870260020381029050808702600203810290508087026002038102905080870260020381029050808502955050505050505b9392505050565b6000819050919050565b610b5881610b45565b82525050565b6000602082019050610b736000830184610b4f565b92915050565b600080fd5b610b8781610b45565b8114610b9257600080fd5b50565b600081359050610ba481610b7e565b92915050565b60008060408385031215610bc157610bc0610b79565b5b6000610bcf85828601610b95565b9250506020610be085828601610b95565b9150509250929050565b60008115159050919050565b610bff81610bea565b82525050565b6000602082019050610c1a6000830184610bf6565b92915050565b60008160000b9050919050565b610c3681610c20565b82525050565b6000602082019050610c516000830184610c2d565b92915050565b600060208284031215610c6d57610c6c610b79565b5b6000610c7b84828501610b95565b91505092915050565b6000819050919050565b6000610ca9610ca4610c9f84610b45565b610c84565b610b45565b9050919050565b610cb981610c8e565b82525050565b6000602082019050610cd46000830184610cb0565b92915050565b610ce381610b45565b8114610cee57600080fd5b50565b600081359050610d0081610cda565b92915050565b600060208284031215610d1c57610d1b610b79565b5b6000610d2a84828501610cf1565b91505092915050565b610d3c81610c20565b8114610d4757600080fd5b50565b600081359050610d5981610d33565b92915050565b60008060408385031215610d7657610d75610b79565b5b6000610d8485828601610cf1565b9250506020610d9585828601610d4a565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60038110610ddf57610dde610d9f565b5b50565b6000819050610df082610dce565b919050565b6000610e0082610de2565b9050919050565b610e1081610df5565b82525050565b6000602082019050610e2b6000830184610e07565b92915050565b60038110610e3e57600080fd5b50565b600081359050610e5081610e31565b92915050565b60008060408385031215610e6d57610e6c610b79565b5b6000610e7b85828601610b95565b9250506020610e8c85828601610e41565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115610f1c57808604811115610ef857610ef7610e96565b5b6001851615610f075780820291505b8081029050610f1585610ec5565b9450610edc565b94509492505050565b600082610f355760019050610ff1565b81610f435760009050610ff1565b8160018114610f595760028114610f6357610f92565b6001915050610ff1565b60ff841115610f7557610f74610e96565b5b8360020a915084821115610f8c57610f8b610e96565b5b50610ff1565b5060208310610133831016604e8410600b8410161715610fc75782820a905083811115610fc257610fc1610e96565b5b610ff1565b610fd48484846001610ed2565b92509050818404811115610feb57610fea610e96565b5b81810290505b9392505050565b600061100382610b45565b915061100e83610b45565b925061103b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610f25565b905092915050565b600061104e82610b45565b915061105983610b45565b925082820261106781610b45565b9150828204841483151761107e5761107d610e96565b5b5092915050565b600061109082610c20565b915061109b83610c20565b925082820190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808112607f821317156110d8576110d7610e96565b5b92915050565b600082825260208201905092915050565b7f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c00600082015250565b6000611125601f836110de565b9150611130826110ef565b602082019050919050565b6000602082019050818103600083015261115481611118565b9050919050565b7f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c4152474500600082015250565b6000611191601f836110de565b915061119c8261115b565b602082019050919050565b600060208201905081810360008301526111c081611184565b9050919050565b600060ff82169050919050565b60006111df82610b45565b91506111ea836111c7565b92506112177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610f25565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061125982610b45565b915061126483610b45565b9250826112745761127361121f565b5b828204905092915050565b600061128a82610b45565b915061129583610b45565b92508282019050808211156112ad576112ac610e96565b5b92915050565b7f4552524f523a55464d2d3032303a44495649534f525f5a45524f000000000000600082015250565b60006112e9601a836110de565b91506112f4826112b3565b602082019050919050565b60006020820190508181036000830152611318816112dc565b9050919050565b7f4552524f523a55464d2d3031303a4e454741544956455f524553554c54000000600082015250565b6000611355601d836110de565b91506113608261131f565b602082019050919050565b6000602082019050818103600083015261138481611348565b9050919050565b600061139682610b45565b91506113a183610b45565b92508282039050818111156113b9576113b8610e96565b5b92915050565b7f4d6174683a206d756c446976206f766572666c6f770000000000000000000000600082015250565b60006113f56015836110de565b9150611400826113bf565b602082019050919050565b60006020820190508181036000830152611424816113e8565b905091905056fea2646970667358221220af1ecc6c0c2b56505c376d0dd83afbf44fd70dba799e8cf7e1bf20908bc5c61764736f6c63430008140033",
475
+ "bytecode": "0x61146a610053600b82828239805160001a607314610046577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106101625760003560e01c80637a858b97116100cd578063bc1b392d11610086578063bc1b392d1461046d578063bdbb46301461048b578063c8a4ac9c146104a9578063cc8b7b73146104d9578063ea6515c414610509578063eb646d711461053957610162565b80637a858b971461037157806389fa8ed7146103a157806393aa8725146103bf578063a391c15b146103dd578063b47733291461040d578063b67d77c51461043d57610162565b8063313ce5671161011f578063313ce5671461026357806332148d731461028157806344aa6836146102b157806345ebb61e146102e1578063753b14a514610311578063771602f71461034157610162565b8063059f8b161461016757806308c76ec414610185578063118fc88c146101b55780631488c845146101e55780631a12cd471461021557806321e5749b14610233575b600080fd5b61016f610557565b60405161017c9190610b99565b60405180910390f35b61019f600480360381019061019a9190610c1e565b61056b565b6040516101ac9190610b99565b60405180910390f35b6101cf60048036038101906101ca9190610c5e565b61062d565b6040516101dc9190610cb9565b60405180910390f35b6101ff60048036038101906101fa9190610d39565b610641565b60405161020c9190610db4565b60405180910390f35b61021d610714565b60405161022a9190610dde565b60405180910390f35b61024d60048036038101906102489190610c5e565b610719565b60405161025a9190610cb9565b60405180910390f35b61026b61072d565b6040516102789190610b99565b60405180910390f35b61029b60048036038101906102969190610c5e565b610739565b6040516102a89190610cb9565b60405180910390f35b6102cb60048036038101906102c69190610df9565b61074d565b6040516102d89190610b99565b60405180910390f35b6102fb60048036038101906102f69190610e26565b610767565b6040516103089190610db4565b60405180910390f35b61032b60048036038101906103269190610df9565b61078c565b6040516103389190610cb9565b60405180910390f35b61035b60048036038101906103569190610c5e565b61079e565b6040516103689190610db4565b60405180910390f35b61038b60048036038101906103869190610df9565b6107b2565b6040516103989190610cb9565b60405180910390f35b6103a96107c4565b6040516103b69190610e62565b60405180910390f35b6103c76107cd565b6040516103d49190610e62565b60405180910390f35b6103f760048036038101906103f29190610c5e565b6107d2565b6040516104049190610db4565b60405180910390f35b61042760048036038101906104229190610c5e565b6107e6565b6040516104349190610cb9565b60405180910390f35b61045760048036038101906104529190610c5e565b6107fa565b6040516104649190610db4565b60405180910390f35b61047561080e565b6040516104829190610db4565b60405180910390f35b610493610813565b6040516104a09190610e62565b60405180910390f35b6104c360048036038101906104be9190610c5e565b61081c565b6040516104d09190610db4565b60405180910390f35b6104f360048036038101906104ee9190610c5e565b610830565b6040516105009190610db4565b60405180910390f35b610523600480360381019061051e9190610c5e565b610844565b6040516105309190610cb9565b60405180910390f35b610541610858565b60405161054e9190610b99565b60405180910390f35b601260000b600a6105689190610fdf565b81565b60006105756107c4565b60ff168260ff16036105cd576105c66002601260000b600a6105979190610fdf565b6105a19190611059565b846105ac919061108a565b6001601260000b600a6105bf9190610fdf565b6000610878565b9050610627565b6105d56107cd565b60ff168260ff1603610606576105ff836001601260000b600a6105f89190610fdf565b6000610878565b9050610627565b610624836001601260000b600a61061d9190610fdf565b6001610878565b90505b92915050565b600061063983836108ee565b905092915050565b60008082601261065191906110be565b60000b1215610695576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068c90611174565b60405180910390fd5b60408260126106a491906110be565b60000b13156106e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106df906111e0565b60405180910390fd5b8160126106f591906110be565b600a6107019190611200565b8361070c919061124b565b905092915050565b601281565b600061072583836108fb565b905092915050565b6000601260ff16905090565b60006107458383610908565b905092915050565b60006107608261075b6107c4565b61056b565b9050919050565b6000601260000b600a61077a9190610fdf565b82610785919061124b565b9050919050565b600061079782610915565b9050919050565b60006107aa8383610921565b905092915050565b60006107bd82610937565b9050919050565b60006002905090565b600090565b60006107de8383610943565b905092915050565b60006107f283836109a2565b905092915050565b600061080683836109b0565b905092915050565b600090565b60006001905090565b60006108288383610a0f565b905092915050565b600061083c8383610a2c565b905092915050565b60006108508383610a61565b905092915050565b6002601260000b600a61086b9190610fdf565b6108759190611059565b81565b600080610886868686610a6f565b90506001600281111561089c5761089b61128d565b5b8360028111156108af576108ae61128d565b5b1480156108cd5750600084806108c8576108c761102a565b5b868809115b156108e2576001816108df919061108a565b90505b80915050949350505050565b6000818310905092915050565b6000818311905092915050565b6000818314905092915050565b60008082149050919050565b6000818361092f919061108a565b905092915050565b60008082119050919050565b6000808211610987576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90611308565b60405180910390fd5b61099a83670de0b6b3a764000084610a6f565b905092915050565b600081831015905092915050565b60006109bc83836109a2565b6109fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f290611374565b60405180910390fd5b8183610a079190611394565b905092915050565b6000610a248383670de0b6b3a7640000610a6f565b905092915050565b6000610a3883836108fb565b15610a4e57610a4783836109b0565b9050610a5b565b610a5882846109b0565b90505b92915050565b600081831115905092915050565b6000806000801985870985870292508281108382030391505060008103610aaa57838281610aa057610a9f61102a565b5b0492505050610b79565b808411610aec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae390611414565b60405180910390fd5b60008486880990508281118203915080830392506000600186190186169050808604955080840493506001818260000304019050808302841793506000600287600302189050808702600203810290508087026002038102905080870260020381029050808702600203810290508087026002038102905080870260020381029050808502955050505050505b9392505050565b6000819050919050565b610b9381610b80565b82525050565b6000602082019050610bae6000830184610b8a565b92915050565b600080fd5b610bc281610b80565b8114610bcd57600080fd5b50565b600081359050610bdf81610bb9565b92915050565b600060ff82169050919050565b610bfb81610be5565b8114610c0657600080fd5b50565b600081359050610c1881610bf2565b92915050565b60008060408385031215610c3557610c34610bb4565b5b6000610c4385828601610bd0565b9250506020610c5485828601610c09565b9150509250929050565b60008060408385031215610c7557610c74610bb4565b5b6000610c8385828601610bd0565b9250506020610c9485828601610bd0565b9150509250929050565b60008115159050919050565b610cb381610c9e565b82525050565b6000602082019050610cce6000830184610caa565b92915050565b610cdd81610b80565b8114610ce857600080fd5b50565b600081359050610cfa81610cd4565b92915050565b60008160000b9050919050565b610d1681610d00565b8114610d2157600080fd5b50565b600081359050610d3381610d0d565b92915050565b60008060408385031215610d5057610d4f610bb4565b5b6000610d5e85828601610ceb565b9250506020610d6f85828601610d24565b9150509250929050565b6000819050919050565b6000610d9e610d99610d9484610b80565b610d79565b610b80565b9050919050565b610dae81610d83565b82525050565b6000602082019050610dc96000830184610da5565b92915050565b610dd881610d00565b82525050565b6000602082019050610df36000830184610dcf565b92915050565b600060208284031215610e0f57610e0e610bb4565b5b6000610e1d84828501610bd0565b91505092915050565b600060208284031215610e3c57610e3b610bb4565b5b6000610e4a84828501610ceb565b91505092915050565b610e5c81610be5565b82525050565b6000602082019050610e776000830184610e53565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115610f0357808604811115610edf57610ede610e7d565b5b6001851615610eee5780820291505b8081029050610efc85610eac565b9450610ec3565b94509492505050565b600082610f1c5760019050610fd8565b81610f2a5760009050610fd8565b8160018114610f405760028114610f4a57610f79565b6001915050610fd8565b60ff841115610f5c57610f5b610e7d565b5b8360020a915084821115610f7357610f72610e7d565b5b50610fd8565b5060208310610133831016604e8410600b8410161715610fae5782820a905083811115610fa957610fa8610e7d565b5b610fd8565b610fbb8484846001610eb9565b92509050818404811115610fd257610fd1610e7d565b5b81810290505b9392505050565b6000610fea82610b80565b9150610ff583610b80565b92506110227fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610f0c565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061106482610b80565b915061106f83610b80565b92508261107f5761107e61102a565b5b828204905092915050565b600061109582610b80565b91506110a083610b80565b92508282019050808211156110b8576110b7610e7d565b5b92915050565b60006110c982610d00565b91506110d483610d00565b925082820190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808112607f8213171561111157611110610e7d565b5b92915050565b600082825260208201905092915050565b7f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c00600082015250565b600061115e601f83611117565b915061116982611128565b602082019050919050565b6000602082019050818103600083015261118d81611151565b9050919050565b7f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c4152474500600082015250565b60006111ca601f83611117565b91506111d582611194565b602082019050919050565b600060208201905081810360008301526111f9816111bd565b9050919050565b600061120b82610b80565b915061121683610be5565b92506112437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610f0c565b905092915050565b600061125682610b80565b915061126183610b80565b925082820261126f81610b80565b9150828204841483151761128657611285610e7d565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4552524f523a55464d2d3032303a44495649534f525f5a45524f000000000000600082015250565b60006112f2601a83611117565b91506112fd826112bc565b602082019050919050565b60006020820190508181036000830152611321816112e5565b9050919050565b7f4552524f523a55464d2d3031303a4e454741544956455f524553554c54000000600082015250565b600061135e601d83611117565b915061136982611328565b602082019050919050565b6000602082019050818103600083015261138d81611351565b9050919050565b600061139f82610b80565b91506113aa83610b80565b92508282039050818111156113c2576113c1610e7d565b5b92915050565b7f4d6174683a206d756c446976206f766572666c6f770000000000000000000000600082015250565b60006113fe601583611117565b9150611409826113c8565b602082019050919050565b6000602082019050818103600083015261142d816113f1565b905091905056fea264697066735822122064a3cd11bbc6afe7af5d0ba5521b7521251300933c59cf5734b5dd8df1f1820364736f6c63430008140033",
476
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106101625760003560e01c80637a858b97116100cd578063bc1b392d11610086578063bc1b392d1461046d578063bdbb46301461048b578063c8a4ac9c146104a9578063cc8b7b73146104d9578063ea6515c414610509578063eb646d711461053957610162565b80637a858b971461037157806389fa8ed7146103a157806393aa8725146103bf578063a391c15b146103dd578063b47733291461040d578063b67d77c51461043d57610162565b8063313ce5671161011f578063313ce5671461026357806332148d731461028157806344aa6836146102b157806345ebb61e146102e1578063753b14a514610311578063771602f71461034157610162565b8063059f8b161461016757806308c76ec414610185578063118fc88c146101b55780631488c845146101e55780631a12cd471461021557806321e5749b14610233575b600080fd5b61016f610557565b60405161017c9190610b99565b60405180910390f35b61019f600480360381019061019a9190610c1e565b61056b565b6040516101ac9190610b99565b60405180910390f35b6101cf60048036038101906101ca9190610c5e565b61062d565b6040516101dc9190610cb9565b60405180910390f35b6101ff60048036038101906101fa9190610d39565b610641565b60405161020c9190610db4565b60405180910390f35b61021d610714565b60405161022a9190610dde565b60405180910390f35b61024d60048036038101906102489190610c5e565b610719565b60405161025a9190610cb9565b60405180910390f35b61026b61072d565b6040516102789190610b99565b60405180910390f35b61029b60048036038101906102969190610c5e565b610739565b6040516102a89190610cb9565b60405180910390f35b6102cb60048036038101906102c69190610df9565b61074d565b6040516102d89190610b99565b60405180910390f35b6102fb60048036038101906102f69190610e26565b610767565b6040516103089190610db4565b60405180910390f35b61032b60048036038101906103269190610df9565b61078c565b6040516103389190610cb9565b60405180910390f35b61035b60048036038101906103569190610c5e565b61079e565b6040516103689190610db4565b60405180910390f35b61038b60048036038101906103869190610df9565b6107b2565b6040516103989190610cb9565b60405180910390f35b6103a96107c4565b6040516103b69190610e62565b60405180910390f35b6103c76107cd565b6040516103d49190610e62565b60405180910390f35b6103f760048036038101906103f29190610c5e565b6107d2565b6040516104049190610db4565b60405180910390f35b61042760048036038101906104229190610c5e565b6107e6565b6040516104349190610cb9565b60405180910390f35b61045760048036038101906104529190610c5e565b6107fa565b6040516104649190610db4565b60405180910390f35b61047561080e565b6040516104829190610db4565b60405180910390f35b610493610813565b6040516104a09190610e62565b60405180910390f35b6104c360048036038101906104be9190610c5e565b61081c565b6040516104d09190610db4565b60405180910390f35b6104f360048036038101906104ee9190610c5e565b610830565b6040516105009190610db4565b60405180910390f35b610523600480360381019061051e9190610c5e565b610844565b6040516105309190610cb9565b60405180910390f35b610541610858565b60405161054e9190610b99565b60405180910390f35b601260000b600a6105689190610fdf565b81565b60006105756107c4565b60ff168260ff16036105cd576105c66002601260000b600a6105979190610fdf565b6105a19190611059565b846105ac919061108a565b6001601260000b600a6105bf9190610fdf565b6000610878565b9050610627565b6105d56107cd565b60ff168260ff1603610606576105ff836001601260000b600a6105f89190610fdf565b6000610878565b9050610627565b610624836001601260000b600a61061d9190610fdf565b6001610878565b90505b92915050565b600061063983836108ee565b905092915050565b60008082601261065191906110be565b60000b1215610695576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068c90611174565b60405180910390fd5b60408260126106a491906110be565b60000b13156106e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106df906111e0565b60405180910390fd5b8160126106f591906110be565b600a6107019190611200565b8361070c919061124b565b905092915050565b601281565b600061072583836108fb565b905092915050565b6000601260ff16905090565b60006107458383610908565b905092915050565b60006107608261075b6107c4565b61056b565b9050919050565b6000601260000b600a61077a9190610fdf565b82610785919061124b565b9050919050565b600061079782610915565b9050919050565b60006107aa8383610921565b905092915050565b60006107bd82610937565b9050919050565b60006002905090565b600090565b60006107de8383610943565b905092915050565b60006107f283836109a2565b905092915050565b600061080683836109b0565b905092915050565b600090565b60006001905090565b60006108288383610a0f565b905092915050565b600061083c8383610a2c565b905092915050565b60006108508383610a61565b905092915050565b6002601260000b600a61086b9190610fdf565b6108759190611059565b81565b600080610886868686610a6f565b90506001600281111561089c5761089b61128d565b5b8360028111156108af576108ae61128d565b5b1480156108cd5750600084806108c8576108c761102a565b5b868809115b156108e2576001816108df919061108a565b90505b80915050949350505050565b6000818310905092915050565b6000818311905092915050565b6000818314905092915050565b60008082149050919050565b6000818361092f919061108a565b905092915050565b60008082119050919050565b6000808211610987576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097e90611308565b60405180910390fd5b61099a83670de0b6b3a764000084610a6f565b905092915050565b600081831015905092915050565b60006109bc83836109a2565b6109fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f290611374565b60405180910390fd5b8183610a079190611394565b905092915050565b6000610a248383670de0b6b3a7640000610a6f565b905092915050565b6000610a3883836108fb565b15610a4e57610a4783836109b0565b9050610a5b565b610a5882846109b0565b90505b92915050565b600081831115905092915050565b6000806000801985870985870292508281108382030391505060008103610aaa57838281610aa057610a9f61102a565b5b0492505050610b79565b808411610aec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae390611414565b60405180910390fd5b60008486880990508281118203915080830392506000600186190186169050808604955080840493506001818260000304019050808302841793506000600287600302189050808702600203810290508087026002038102905080870260020381029050808702600203810290508087026002038102905080870260020381029050808502955050505050505b9392505050565b6000819050919050565b610b9381610b80565b82525050565b6000602082019050610bae6000830184610b8a565b92915050565b600080fd5b610bc281610b80565b8114610bcd57600080fd5b50565b600081359050610bdf81610bb9565b92915050565b600060ff82169050919050565b610bfb81610be5565b8114610c0657600080fd5b50565b600081359050610c1881610bf2565b92915050565b60008060408385031215610c3557610c34610bb4565b5b6000610c4385828601610bd0565b9250506020610c5485828601610c09565b9150509250929050565b60008060408385031215610c7557610c74610bb4565b5b6000610c8385828601610bd0565b9250506020610c9485828601610bd0565b9150509250929050565b60008115159050919050565b610cb381610c9e565b82525050565b6000602082019050610cce6000830184610caa565b92915050565b610cdd81610b80565b8114610ce857600080fd5b50565b600081359050610cfa81610cd4565b92915050565b60008160000b9050919050565b610d1681610d00565b8114610d2157600080fd5b50565b600081359050610d3381610d0d565b92915050565b60008060408385031215610d5057610d4f610bb4565b5b6000610d5e85828601610ceb565b9250506020610d6f85828601610d24565b9150509250929050565b6000819050919050565b6000610d9e610d99610d9484610b80565b610d79565b610b80565b9050919050565b610dae81610d83565b82525050565b6000602082019050610dc96000830184610da5565b92915050565b610dd881610d00565b82525050565b6000602082019050610df36000830184610dcf565b92915050565b600060208284031215610e0f57610e0e610bb4565b5b6000610e1d84828501610bd0565b91505092915050565b600060208284031215610e3c57610e3b610bb4565b5b6000610e4a84828501610ceb565b91505092915050565b610e5c81610be5565b82525050565b6000602082019050610e776000830184610e53565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160011c9050919050565b6000808291508390505b6001851115610f0357808604811115610edf57610ede610e7d565b5b6001851615610eee5780820291505b8081029050610efc85610eac565b9450610ec3565b94509492505050565b600082610f1c5760019050610fd8565b81610f2a5760009050610fd8565b8160018114610f405760028114610f4a57610f79565b6001915050610fd8565b60ff841115610f5c57610f5b610e7d565b5b8360020a915084821115610f7357610f72610e7d565b5b50610fd8565b5060208310610133831016604e8410600b8410161715610fae5782820a905083811115610fa957610fa8610e7d565b5b610fd8565b610fbb8484846001610eb9565b92509050818404811115610fd257610fd1610e7d565b5b81810290505b9392505050565b6000610fea82610b80565b9150610ff583610b80565b92506110227fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610f0c565b905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061106482610b80565b915061106f83610b80565b92508261107f5761107e61102a565b5b828204905092915050565b600061109582610b80565b91506110a083610b80565b92508282019050808211156110b8576110b7610e7d565b5b92915050565b60006110c982610d00565b91506110d483610d00565b925082820190507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff808112607f8213171561111157611110610e7d565b5b92915050565b600082825260208201905092915050565b7f4552524f523a464d2d3031303a4558504f4e454e545f544f4f5f534d414c4c00600082015250565b600061115e601f83611117565b915061116982611128565b602082019050919050565b6000602082019050818103600083015261118d81611151565b9050919050565b7f4552524f523a464d2d3031313a4558504f4e454e545f544f4f5f4c4152474500600082015250565b60006111ca601f83611117565b91506111d582611194565b602082019050919050565b600060208201905081810360008301526111f9816111bd565b9050919050565b600061120b82610b80565b915061121683610be5565b92506112437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484610f0c565b905092915050565b600061125682610b80565b915061126183610b80565b925082820261126f81610b80565b9150828204841483151761128657611285610e7d565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4552524f523a55464d2d3032303a44495649534f525f5a45524f000000000000600082015250565b60006112f2601a83611117565b91506112fd826112bc565b602082019050919050565b60006020820190508181036000830152611321816112e5565b9050919050565b7f4552524f523a55464d2d3031303a4e454741544956455f524553554c54000000600082015250565b600061135e601d83611117565b915061136982611328565b602082019050919050565b6000602082019050818103600083015261138d81611351565b9050919050565b600061139f82610b80565b91506113aa83610b80565b92508282039050818111156113c2576113c1610e7d565b5b92915050565b7f4d6174683a206d756c446976206f766572666c6f770000000000000000000000600082015250565b60006113fe601583611117565b9150611409826113c8565b602082019050919050565b6000602082019050818103600083015261142d816113f1565b905091905056fea264697066735822122064a3cd11bbc6afe7af5d0ba5521b7521251300933c59cf5734b5dd8df1f1820364736f6c63430008140033",
451
477
  "linkReferences": {},
452
478
  "deployedLinkReferences": {}
453
479
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/0df057e2cb8e4692d8cee6d249e8a005.json"
4
+ }
@@ -0,0 +1,139 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "VersionLib",
4
+ "sourceName": "contracts/types/Version.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "Version",
10
+ "name": "version",
11
+ "type": "uint24"
12
+ }
13
+ ],
14
+ "name": "toInt",
15
+ "outputs": [
16
+ {
17
+ "internalType": "uint256",
18
+ "name": "",
19
+ "type": "uint256"
20
+ }
21
+ ],
22
+ "stateMutability": "pure",
23
+ "type": "function"
24
+ },
25
+ {
26
+ "inputs": [
27
+ {
28
+ "internalType": "Version",
29
+ "name": "version",
30
+ "type": "uint24"
31
+ }
32
+ ],
33
+ "name": "toMajorPart",
34
+ "outputs": [
35
+ {
36
+ "internalType": "VersionPart",
37
+ "name": "major",
38
+ "type": "uint8"
39
+ }
40
+ ],
41
+ "stateMutability": "pure",
42
+ "type": "function"
43
+ },
44
+ {
45
+ "inputs": [
46
+ {
47
+ "internalType": "uint256",
48
+ "name": "major",
49
+ "type": "uint256"
50
+ },
51
+ {
52
+ "internalType": "uint256",
53
+ "name": "minor",
54
+ "type": "uint256"
55
+ },
56
+ {
57
+ "internalType": "uint256",
58
+ "name": "patch",
59
+ "type": "uint256"
60
+ }
61
+ ],
62
+ "name": "toVersion",
63
+ "outputs": [
64
+ {
65
+ "internalType": "Version",
66
+ "name": "",
67
+ "type": "uint24"
68
+ }
69
+ ],
70
+ "stateMutability": "pure",
71
+ "type": "function"
72
+ },
73
+ {
74
+ "inputs": [
75
+ {
76
+ "internalType": "uint256",
77
+ "name": "versionPart",
78
+ "type": "uint256"
79
+ }
80
+ ],
81
+ "name": "toVersionPart",
82
+ "outputs": [
83
+ {
84
+ "internalType": "VersionPart",
85
+ "name": "",
86
+ "type": "uint8"
87
+ }
88
+ ],
89
+ "stateMutability": "pure",
90
+ "type": "function"
91
+ },
92
+ {
93
+ "inputs": [
94
+ {
95
+ "internalType": "Version",
96
+ "name": "version",
97
+ "type": "uint24"
98
+ }
99
+ ],
100
+ "name": "toVersionParts",
101
+ "outputs": [
102
+ {
103
+ "internalType": "VersionPart",
104
+ "name": "major",
105
+ "type": "uint8"
106
+ },
107
+ {
108
+ "internalType": "VersionPart",
109
+ "name": "minor",
110
+ "type": "uint8"
111
+ },
112
+ {
113
+ "internalType": "VersionPart",
114
+ "name": "patch",
115
+ "type": "uint8"
116
+ }
117
+ ],
118
+ "stateMutability": "pure",
119
+ "type": "function"
120
+ },
121
+ {
122
+ "inputs": [],
123
+ "name": "zeroVersion",
124
+ "outputs": [
125
+ {
126
+ "internalType": "Version",
127
+ "name": "",
128
+ "type": "uint24"
129
+ }
130
+ ],
131
+ "stateMutability": "pure",
132
+ "type": "function"
133
+ }
134
+ ],
135
+ "bytecode": "0x610656610053600b82828239805160001a607314610046577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c806304b8f6c5146100715780632efe01131461008f57806349a7111a146100bf57806355601007146100f15780638e4ad86c14610121578063c9e66e2914610151575b600080fd5b610079610181565b60405161008691906102fa565b60405180910390f35b6100a960048036038101906100a49190610350565b610186565b6040516100b691906102fa565b60405180910390f35b6100d960048036038101906100d491906103cf565b61020e565b6040516100e89392919061043a565b60405180910390f35b61010b600480360381019061010691906103cf565b610279565b6040516101189190610480565b60405180910390f35b61013b6004803603810190610136919061049b565b610288565b60405161014891906104c8565b60405180910390f35b61016b600480360381019061016691906103cf565b610292565b60405161017891906104c8565b60405180910390f35b600090565b60006101008410801561019a575061010083105b80156101a7575061010082105b6101e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101dd90610566565b60405180910390fd5b81600884901b601086901b6101fb91906105b5565b61020591906105b5565b90509392505050565b600080600080849050600060108262ffffff16901c905060108160ff16901b60ff168261023b91906105e9565b9150600060088362ffffff16901c9050600060088260ff16901b60ff168461026391906105e9565b9050828282965096509650505050509193909250565b60008162ffffff169050919050565b6000819050919050565b600080829050600060108262ffffff16901c90508092505050919050565b600062ffffff82169050919050565b6000819050919050565b60006102e46102df6102da846102b0565b6102bf565b6102b0565b9050919050565b6102f4816102c9565b82525050565b600060208201905061030f60008301846102eb565b92915050565b600080fd5b6000819050919050565b61032d8161031a565b811461033857600080fd5b50565b60008135905061034a81610324565b92915050565b60008060006060848603121561036957610368610315565b5b60006103778682870161033b565b93505060206103888682870161033b565b92505060406103998682870161033b565b9150509250925092565b6103ac816102b0565b81146103b757600080fd5b50565b6000813590506103c9816103a3565b92915050565b6000602082840312156103e5576103e4610315565b5b60006103f3848285016103ba565b91505092915050565b600060ff82169050919050565b600061042461041f61041a846103fc565b6102bf565b6103fc565b9050919050565b61043481610409565b82525050565b600060608201905061044f600083018661042b565b61045c602083018561042b565b610469604083018461042b565b949350505050565b61047a8161031a565b82525050565b60006020820190506104956000830184610471565b92915050565b6000602082840312156104b1576104b0610315565b5b60006104bf8482850161033b565b91505092915050565b60006020820190506104dd600083018461042b565b92915050565b600082825260208201905092915050565b7f4552524f523a5652532d3031303a56455253494f4e5f504152545f544f4f5f4260008201527f4947000000000000000000000000000000000000000000000000000000000000602082015250565b60006105506022836104e3565b915061055b826104f4565b604082019050919050565b6000602082019050818103600083015261057f81610543565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006105c08261031a565b91506105cb8361031a565b92508282019050808211156105e3576105e2610586565b5b92915050565b60006105f4826102b0565b91506105ff836102b0565b9250828203905062ffffff81111561061a57610619610586565b5b9291505056fea2646970667358221220e9dfc763417bd7f39d2043c21beb9c3cd830888e6733558a1b20cddf8a286b5564736f6c63430008140033",
136
+ "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c806304b8f6c5146100715780632efe01131461008f57806349a7111a146100bf57806355601007146100f15780638e4ad86c14610121578063c9e66e2914610151575b600080fd5b610079610181565b60405161008691906102fa565b60405180910390f35b6100a960048036038101906100a49190610350565b610186565b6040516100b691906102fa565b60405180910390f35b6100d960048036038101906100d491906103cf565b61020e565b6040516100e89392919061043a565b60405180910390f35b61010b600480360381019061010691906103cf565b610279565b6040516101189190610480565b60405180910390f35b61013b6004803603810190610136919061049b565b610288565b60405161014891906104c8565b60405180910390f35b61016b600480360381019061016691906103cf565b610292565b60405161017891906104c8565b60405180910390f35b600090565b60006101008410801561019a575061010083105b80156101a7575061010082105b6101e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101dd90610566565b60405180910390fd5b81600884901b601086901b6101fb91906105b5565b61020591906105b5565b90509392505050565b600080600080849050600060108262ffffff16901c905060108160ff16901b60ff168261023b91906105e9565b9150600060088362ffffff16901c9050600060088260ff16901b60ff168461026391906105e9565b9050828282965096509650505050509193909250565b60008162ffffff169050919050565b6000819050919050565b600080829050600060108262ffffff16901c90508092505050919050565b600062ffffff82169050919050565b6000819050919050565b60006102e46102df6102da846102b0565b6102bf565b6102b0565b9050919050565b6102f4816102c9565b82525050565b600060208201905061030f60008301846102eb565b92915050565b600080fd5b6000819050919050565b61032d8161031a565b811461033857600080fd5b50565b60008135905061034a81610324565b92915050565b60008060006060848603121561036957610368610315565b5b60006103778682870161033b565b93505060206103888682870161033b565b92505060406103998682870161033b565b9150509250925092565b6103ac816102b0565b81146103b757600080fd5b50565b6000813590506103c9816103a3565b92915050565b6000602082840312156103e5576103e4610315565b5b60006103f3848285016103ba565b91505092915050565b600060ff82169050919050565b600061042461041f61041a846103fc565b6102bf565b6103fc565b9050919050565b61043481610409565b82525050565b600060608201905061044f600083018661042b565b61045c602083018561042b565b610469604083018461042b565b949350505050565b61047a8161031a565b82525050565b60006020820190506104956000830184610471565b92915050565b6000602082840312156104b1576104b0610315565b5b60006104bf8482850161033b565b91505092915050565b60006020820190506104dd600083018461042b565b92915050565b600082825260208201905092915050565b7f4552524f523a5652532d3031303a56455253494f4e5f504152545f544f4f5f4260008201527f4947000000000000000000000000000000000000000000000000000000000000602082015250565b60006105506022836104e3565b915061055b826104f4565b604082019050919050565b6000602082019050818103600083015261057f81610543565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006105c08261031a565b91506105cb8361031a565b92508282019050808211156105e3576105e2610586565b5b92915050565b60006105f4826102b0565b91506105ff836102b0565b9250828203905062ffffff81111561061a57610619610586565b5b9291505056fea2646970667358221220e9dfc763417bd7f39d2043c21beb9c3cd830888e6733558a1b20cddf8a286b5564736f6c63430008140033",
137
+ "linkReferences": {},
138
+ "deployedLinkReferences": {}
139
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/0df057e2cb8e4692d8cee6d249e8a005.json"
4
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "VersionPartLib",
4
+ "sourceName": "contracts/types/Version.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "VersionPart",
10
+ "name": "x",
11
+ "type": "uint8"
12
+ }
13
+ ],
14
+ "name": "toInt",
15
+ "outputs": [
16
+ {
17
+ "internalType": "uint256",
18
+ "name": "",
19
+ "type": "uint256"
20
+ }
21
+ ],
22
+ "stateMutability": "pure",
23
+ "type": "function"
24
+ }
25
+ ],
26
+ "bytecode": "0x61014c610053600b82828239805160001a607314610046577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c8063ac43d8341461003a575b600080fd5b610054600480360381019061004f91906100b5565b61006a565b60405161006191906100fb565b60405180910390f35b60008160ff169050919050565b600080fd5b600060ff82169050919050565b6100928161007c565b811461009d57600080fd5b50565b6000813590506100af81610089565b92915050565b6000602082840312156100cb576100ca610077565b5b60006100d9848285016100a0565b91505092915050565b6000819050919050565b6100f5816100e2565b82525050565b600060208201905061011060008301846100ec565b9291505056fea2646970667358221220971f855535d4d0bcc77f8cc0059f55647d69b8fdbd159fd425f6ab7091afefbb64736f6c63430008140033",
27
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100355760003560e01c8063ac43d8341461003a575b600080fd5b610054600480360381019061004f91906100b5565b61006a565b60405161006191906100fb565b60405180910390f35b60008160ff169050919050565b600080fd5b600060ff82169050919050565b6100928161007c565b811461009d57600080fd5b50565b6000813590506100af81610089565b92915050565b6000602082840312156100cb576100ca610077565b5b60006100d9848285016100a0565b91505092915050565b6000819050919050565b6100f5816100e2565b82525050565b600060208201905061011060008301846100ec565b9291505056fea2646970667358221220971f855535d4d0bcc77f8cc0059f55647d69b8fdbd159fd425f6ab7091afefbb64736f6c63430008140033",
28
+ "linkReferences": {},
29
+ "deployedLinkReferences": {}
30
+ }
@@ -0,0 +1,88 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ pragma solidity ^0.8.19;
3
+
4
+ import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
5
+
6
+ import {IRegisterable} from "../shared/IRegisterable.sol";
7
+ import {Registerable} from "../shared/Registerable.sol";
8
+
9
+ import {IRegistry} from "../registry/IRegistry.sol";
10
+ import {IInstance} from "../instance/IInstance.sol";
11
+
12
+ import {IInstance} from "../instance/IInstance.sol";
13
+ import {IComponent, IComponentModule} from "../instance/module/component/IComponent.sol";
14
+ import {IComponentOwnerService} from "../instance/service/IComponentOwnerService.sol";
15
+ import {IBaseComponent} from "./IBaseComponent.sol";
16
+ import {NftId} from "../types/NftId.sol";
17
+
18
+ abstract contract BaseComponent is
19
+ Registerable,
20
+ IBaseComponent
21
+ {
22
+ IComponentOwnerService internal _componentOwnerService;
23
+
24
+ address internal _deployer;
25
+ address internal _wallet;
26
+ IERC20Metadata internal _token;
27
+ IInstance internal _instance;
28
+
29
+ constructor(
30
+ address registry,
31
+ NftId instanceNftId,
32
+ address token
33
+ )
34
+ Registerable(registry, instanceNftId)
35
+ {
36
+ IRegistry.ObjectInfo memory instanceInfo = _registry.getObjectInfo(instanceNftId);
37
+ _instance = IInstance(instanceInfo.objectAddress);
38
+ require(
39
+ _instance.supportsInterface(type(IInstance).interfaceId),
40
+ ""
41
+ );
42
+
43
+ _componentOwnerService = _instance.getComponentOwnerService();
44
+ _wallet = address(this);
45
+ _token = IERC20Metadata(token);
46
+ }
47
+
48
+ // from registerable
49
+ function register() public override(IRegisterable, Registerable) returns (NftId componentId) {
50
+ require(msg.sender == getOwner(), "");
51
+ require(
52
+ address(_registry) != address(0),
53
+ "ERROR:COB-001:REGISTRY_ZERO"
54
+ );
55
+ require(
56
+ _registry.isRegistered(address(_instance)),
57
+ "ERROR:COB:INSTANCE_NOT_REGISTERED"
58
+ );
59
+
60
+ componentId = _componentOwnerService.register(this);
61
+ }
62
+
63
+ // from component contract
64
+ function lock() external onlyOwner override {
65
+ _componentOwnerService.lock(this);
66
+ }
67
+
68
+ function unlock() external onlyOwner override {
69
+ _componentOwnerService.unlock(this);
70
+ }
71
+
72
+ function getWallet()
73
+ external
74
+ view
75
+ override
76
+ returns (address walletAddress)
77
+ {
78
+ return _wallet;
79
+ }
80
+
81
+ function getToken() external view override returns (IERC20Metadata token) {
82
+ return _token;
83
+ }
84
+
85
+ function getInstance() external view override returns (IInstance instance) {
86
+ return _instance;
87
+ }
88
+ }