@etherisc/gif-next 0.0.2-efdb520-159 → 0.0.2-efef0ea-320

Sign up to get free protection for your applications and to get access to all the features.
Files changed (274) hide show
  1. package/README.md +58 -11
  2. package/artifacts/contracts/components/BaseComponent.sol/BaseComponent.dbg.json +1 -1
  3. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +4 -0
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.json +405 -0
  5. package/artifacts/contracts/components/IBaseComponent.sol/IBaseComponent.dbg.json +1 -1
  6. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +4 -0
  7. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +340 -0
  8. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +131 -0
  10. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +109 -18
  12. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  13. package/artifacts/contracts/components/Pool.sol/Pool.json +194 -3
  14. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  15. package/artifacts/contracts/components/Product.sol/Product.json +160 -21
  16. package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +1 -1
  17. package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +1 -1
  18. package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +1 -1
  19. package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +1 -1
  20. package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +1 -1
  21. package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +1 -1
  22. package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +1 -1
  23. package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +1 -1
  24. package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +1 -1
  25. package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +1 -1
  26. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.dbg.json +1 -1
  27. package/artifacts/contracts/experiment/statemachine/Dummy.sol/LifeCycleModule.json +2 -2
  28. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISM.dbg.json +1 -1
  29. package/artifacts/contracts/experiment/statemachine/ISM.sol/ISMEE.dbg.json +1 -1
  30. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.dbg.json +1 -1
  31. package/artifacts/contracts/experiment/statemachine/SM.sol/SM.json +2 -2
  32. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.dbg.json +1 -1
  33. package/artifacts/contracts/experiment/statemachine/SimpleStateMachine.sol/SimpleStateMachine.json +2 -2
  34. package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +1 -1
  35. package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +1 -1
  36. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  37. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +697 -671
  38. package/artifacts/contracts/instance/IInstanceLinked.sol/IInstanceLinked.dbg.json +1 -1
  39. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  40. package/artifacts/contracts/instance/Instance.sol/Instance.json +928 -744
  41. package/artifacts/contracts/instance/base/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +4 -0
  42. package/artifacts/contracts/instance/{InstanceBase.sol/InstanceBase.json → base/ComponentServiceBase.sol/ComponentServiceBase.json} +107 -33
  43. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.dbg.json +4 -0
  44. package/artifacts/contracts/instance/base/IInstanceBase.sol/IInstanceBase.json +113 -0
  45. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +4 -0
  46. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.json +560 -0
  47. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +4 -0
  48. package/artifacts/contracts/instance/{module/lifecycle/ILifecycle.sol/ILifecycleModule.json → base/ILifecycle.sol/ILifecycle.json} +10 -77
  49. package/artifacts/contracts/instance/base/IService.sol/IService.dbg.json +4 -0
  50. package/artifacts/contracts/instance/{service → base}/IService.sol/IService.json +63 -22
  51. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.dbg.json +4 -0
  52. package/artifacts/contracts/instance/base/InstanceBase.sol/InstanceBase.json +463 -0
  53. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +4 -0
  54. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +710 -0
  55. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +4 -0
  56. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.json +169 -0
  57. package/artifacts/contracts/instance/base/ModuleBase.sol/ModuleBase.dbg.json +4 -0
  58. package/artifacts/contracts/instance/{module/product/ProductModule.sol/ProductModule.json → base/ModuleBase.sol/ModuleBase.json} +2 -2
  59. package/artifacts/contracts/instance/base/ServiceBase.sol/ServiceBase.dbg.json +4 -0
  60. package/artifacts/contracts/instance/{service → base}/ServiceBase.sol/ServiceBase.json +93 -6
  61. package/artifacts/contracts/instance/module/access/Access.sol/AccessModule.dbg.json +1 -1
  62. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccess.dbg.json +1 -1
  63. package/artifacts/contracts/instance/module/access/IAccess.sol/IAccessModule.dbg.json +1 -1
  64. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.dbg.json +1 -1
  65. package/artifacts/contracts/instance/module/bundle/BundleModule.sol/BundleModule.json +71 -50
  66. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundle.dbg.json +1 -1
  67. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.dbg.json +1 -1
  68. package/artifacts/contracts/instance/module/bundle/IBundle.sol/IBundleModule.json +71 -50
  69. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.dbg.json +1 -1
  70. package/artifacts/contracts/instance/module/component/ComponentModule.sol/ComponentModule.json +22 -93
  71. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponent.dbg.json +1 -1
  72. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.dbg.json +1 -1
  73. package/artifacts/contracts/instance/module/component/IComponent.sol/IComponentModule.json +22 -93
  74. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.dbg.json +4 -0
  75. package/artifacts/contracts/instance/module/distribution/DistributionModule.sol/DistributionModule.json +10 -0
  76. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.dbg.json +4 -0
  77. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistribution.json +10 -0
  78. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.dbg.json +4 -0
  79. package/artifacts/contracts/instance/module/distribution/IDistribution.sol/IDistributionModule.json +10 -0
  80. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicy.dbg.json +1 -1
  81. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.dbg.json +1 -1
  82. package/artifacts/contracts/instance/module/policy/IPolicy.sol/IPolicyModule.json +61 -38
  83. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.dbg.json +1 -1
  84. package/artifacts/contracts/instance/module/policy/PolicyModule.sol/PolicyModule.json +61 -38
  85. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPool.dbg.json +1 -1
  86. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.dbg.json +1 -1
  87. package/artifacts/contracts/instance/module/pool/IPoolModule.sol/IPoolModule.json +0 -5
  88. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.dbg.json +1 -1
  89. package/artifacts/contracts/instance/module/pool/PoolModule.sol/PoolModule.json +0 -5
  90. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRisk.dbg.json +4 -0
  91. package/artifacts/contracts/instance/module/{product/IProductModule.sol/IProductModule.json → risk/IRisk.sol/IRisk.json} +2 -2
  92. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.dbg.json +4 -0
  93. package/artifacts/contracts/instance/module/risk/IRisk.sol/IRiskModule.json +113 -0
  94. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.dbg.json +4 -0
  95. package/artifacts/contracts/instance/module/risk/RiskModule.sol/RiskModule.json +131 -0
  96. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasury.dbg.json +1 -1
  97. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.dbg.json +1 -1
  98. package/artifacts/contracts/instance/module/treasury/ITreasury.sol/ITreasuryModule.json +209 -236
  99. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  100. package/artifacts/contracts/instance/module/treasury/TokenHandler.sol/TokenHandler.json +2 -2
  101. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.dbg.json +1 -1
  102. package/artifacts/contracts/instance/module/treasury/TreasuryModule.sol/TreasuryModule.json +209 -236
  103. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.dbg.json +1 -1
  104. package/artifacts/contracts/instance/service/ComponentOwnerService.sol/ComponentOwnerService.json +141 -42
  105. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +4 -0
  106. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +507 -0
  107. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.dbg.json +1 -1
  108. package/artifacts/contracts/instance/service/IComponentOwnerService.sol/IComponentOwnerService.json +62 -21
  109. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +4 -0
  110. package/artifacts/contracts/instance/service/{ComponentServiceBase.sol/ComponentServiceBase.json → IDistributionService.sol/IDistributionService.json} +96 -30
  111. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  112. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +127 -22
  113. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  114. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +215 -21
  115. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  116. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +177 -46
  117. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  118. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +322 -62
  119. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  120. package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +1 -1
  121. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  122. package/artifacts/contracts/registry/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
  123. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  124. package/artifacts/contracts/registry/Registry.sol/Registry.json +2 -2
  125. package/artifacts/contracts/registry/RegistryUpgradeable.sol/RegistryUpgradeable.dbg.json +4 -0
  126. package/artifacts/contracts/registry/RegistryUpgradeable.sol/RegistryUpgradeable.json +724 -0
  127. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  128. package/artifacts/contracts/shared/IOwnable.sol/IOwnable.dbg.json +1 -1
  129. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  130. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  131. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.json +58 -17
  132. package/artifacts/contracts/shared/Proxy.sol/ProxyDeployer.dbg.json +4 -0
  133. package/artifacts/contracts/shared/Proxy.sol/ProxyDeployer.json +248 -0
  134. package/artifacts/contracts/shared/Proxy.sol/ProxyWithProxyAdminGetter.dbg.json +4 -0
  135. package/artifacts/contracts/shared/Proxy.sol/ProxyWithProxyAdminGetter.json +129 -0
  136. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  137. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  138. package/artifacts/contracts/shared/Versionable.sol/Versionable.json +92 -5
  139. package/artifacts/contracts/shared/VersionableUpgradeable.sol/VersionableUpgradeable.dbg.json +4 -0
  140. package/artifacts/contracts/shared/VersionableUpgradeable.sol/VersionableUpgradeable.json +228 -0
  141. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.dbg.json +4 -0
  142. package/artifacts/contracts/test/TestDistribution.sol/TestDistribution.json +405 -0
  143. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  144. package/artifacts/contracts/test/TestFee.sol/TestFee.json +28 -4
  145. package/artifacts/contracts/test/TestPool.sol/TestPool.dbg.json +1 -1
  146. package/artifacts/contracts/test/TestPool.sol/TestPool.json +194 -3
  147. package/artifacts/contracts/test/TestProduct.sol/TestProduct.dbg.json +1 -1
  148. package/artifacts/contracts/test/TestProduct.sol/TestProduct.json +209 -27
  149. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  150. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.json +2 -2
  151. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  152. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.json +38 -4
  153. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  154. package/artifacts/contracts/test/TestService.sol/TestService.json +102 -43
  155. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  156. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  157. package/artifacts/contracts/test/TestVersion.sol/TestVersion.json +14 -18
  158. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  159. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.json +102 -39
  160. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +4 -0
  161. package/artifacts/contracts/test/Usdc.sol/USDC.json +338 -0
  162. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  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 +257 -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 +1 -1
  172. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.json +2 -2
  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/ReferralId.sol/ReferralIdLib.dbg.json +4 -0
  176. package/artifacts/contracts/types/ReferralId.sol/ReferralIdLib.json +99 -0
  177. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +4 -0
  178. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.json +86 -0
  179. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +4 -0
  180. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.json +30 -0
  181. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  182. package/artifacts/contracts/types/StateId.sol/StateIdLib.json +2 -2
  183. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  184. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +1 -1
  185. package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +34 -8
  186. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  187. package/artifacts/contracts/types/Version.sol/VersionLib.json +101 -2
  188. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  189. package/artifacts/contracts/types/Version.sol/VersionPartLib.json +2 -2
  190. package/contracts/components/BaseComponent.sol +7 -2
  191. package/contracts/components/Distribution.sol +132 -0
  192. package/contracts/components/IDistributionComponent.sol +47 -0
  193. package/contracts/components/IPoolComponent.sol +14 -0
  194. package/contracts/components/IProductComponent.sol +24 -5
  195. package/contracts/components/Pool.sol +64 -3
  196. package/contracts/components/Product.sol +123 -13
  197. package/contracts/instance/IInstance.sol +16 -13
  198. package/contracts/instance/Instance.sol +22 -10
  199. package/contracts/instance/{service → base}/ComponentServiceBase.sol +1 -0
  200. package/contracts/instance/base/IInstanceBase.sol +22 -0
  201. package/contracts/instance/base/IKeyValueStore.sol +50 -0
  202. package/contracts/instance/base/ILifecycle.sol +30 -0
  203. package/contracts/instance/{InstanceBase.sol → base/InstanceBase.sol} +34 -17
  204. package/contracts/instance/base/KeyValueStore.sol +161 -0
  205. package/contracts/instance/{module/lifecycle/LifecycleModule.sol → base/Lifecycle.sol} +50 -39
  206. package/contracts/instance/base/ModuleBase.sol +57 -0
  207. package/contracts/instance/{service → base}/ServiceBase.sol +1 -3
  208. package/contracts/instance/module/access/Access.sol +6 -6
  209. package/contracts/instance/module/bundle/BundleModule.sol +24 -118
  210. package/contracts/instance/module/bundle/IBundle.sol +9 -9
  211. package/contracts/instance/module/component/ComponentModule.sol +27 -61
  212. package/contracts/instance/module/component/IComponent.sol +5 -30
  213. package/contracts/instance/module/distribution/DistributionModule.sol +17 -0
  214. package/contracts/instance/module/distribution/IDistribution.sol +10 -0
  215. package/contracts/instance/module/policy/IPolicy.sol +12 -9
  216. package/contracts/instance/module/policy/PolicyModule.sol +33 -26
  217. package/contracts/instance/module/pool/IPoolModule.sol +0 -1
  218. package/contracts/instance/module/pool/PoolModule.sol +12 -9
  219. package/contracts/instance/module/risk/IRisk.sol +26 -0
  220. package/contracts/instance/module/risk/RiskModule.sol +62 -0
  221. package/contracts/instance/module/treasury/ITreasury.sol +30 -52
  222. package/contracts/instance/module/treasury/TreasuryModule.sol +74 -84
  223. package/contracts/instance/service/ComponentOwnerService.sol +33 -50
  224. package/contracts/instance/service/DistributionService.sol +59 -0
  225. package/contracts/instance/service/IComponentOwnerService.sol +1 -1
  226. package/contracts/instance/service/IDistributionService.sol +12 -0
  227. package/contracts/instance/service/IPoolService.sol +8 -1
  228. package/contracts/instance/service/IProductService.sol +56 -7
  229. package/contracts/instance/service/PoolService.sol +64 -13
  230. package/contracts/instance/service/ProductService.sol +234 -83
  231. package/contracts/registry/Registry.sol +4 -4
  232. package/contracts/registry/RegistryUpgradeable.sol +488 -0
  233. package/contracts/shared/IVersionable.sol +19 -6
  234. package/contracts/shared/Proxy.sol +94 -0
  235. package/contracts/shared/Versionable.sol +16 -9
  236. package/contracts/shared/VersionableUpgradeable.sol +136 -0
  237. package/contracts/test/TestDistribution.sol +21 -0
  238. package/contracts/test/TestFee.sol +3 -3
  239. package/contracts/test/TestPool.sol +6 -3
  240. package/contracts/test/TestProduct.sol +36 -8
  241. package/contracts/test/TestRoleId.sol +2 -2
  242. package/contracts/test/TestService.sol +3 -6
  243. package/contracts/test/TestVersion.sol +4 -7
  244. package/contracts/test/TestVersionable.sol +2 -5
  245. package/contracts/test/Usdc.sol +26 -0
  246. package/contracts/types/Fee.sol +44 -20
  247. package/contracts/types/Key32.sol +45 -0
  248. package/contracts/types/NftId.sol +16 -1
  249. package/contracts/types/ObjectType.sol +24 -8
  250. package/contracts/types/ReferralId.sol +48 -0
  251. package/contracts/types/RiskId.sol +43 -0
  252. package/contracts/types/RoleId.sol +12 -10
  253. package/contracts/types/StateId.sol +7 -1
  254. package/contracts/types/UFixed.sol +19 -16
  255. package/contracts/types/Version.sol +37 -25
  256. package/package.json +1 -1
  257. package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.dbg.json +0 -4
  258. package/artifacts/contracts/instance/IServiceLinked.sol/IServiceLinked.json +0 -50
  259. package/artifacts/contracts/instance/InstanceBase.sol/InstanceBase.dbg.json +0 -4
  260. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.dbg.json +0 -4
  261. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycle.json +0 -134
  262. package/artifacts/contracts/instance/module/lifecycle/ILifecycle.sol/ILifecycleModule.dbg.json +0 -4
  263. package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.dbg.json +0 -4
  264. package/artifacts/contracts/instance/module/lifecycle/LifecycleModule.sol/LifecycleModule.json +0 -221
  265. package/artifacts/contracts/instance/module/product/IProductModule.sol/IProductModule.dbg.json +0 -4
  266. package/artifacts/contracts/instance/module/product/ProductModule.sol/ProductModule.dbg.json +0 -4
  267. package/artifacts/contracts/instance/service/ComponentServiceBase.sol/ComponentServiceBase.dbg.json +0 -4
  268. package/artifacts/contracts/instance/service/IService.sol/IService.dbg.json +0 -4
  269. package/artifacts/contracts/instance/service/ServiceBase.sol/ServiceBase.dbg.json +0 -4
  270. package/contracts/instance/IServiceLinked.sol +0 -12
  271. package/contracts/instance/module/lifecycle/ILifecycle.sol +0 -47
  272. package/contracts/instance/module/product/IProductModule.sol +0 -6
  273. package/contracts/instance/module/product/ProductModule.sol +0 -8
  274. /package/contracts/instance/{service → base}/IService.sol +0 -0
package/README.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # gif-next (Generic Insurance Framework next version)
2
2
 
3
+ ## Add OpenZeppelin V5 Dependencies
4
+
5
+ ```shell
6
+ forge install openzeppelin-contracts-500=OpenZeppelin/openzeppelin-contracts@v5.0.0
7
+ cd cd lib/openzeppelin-contracts-500
8
+ git checkout tags/v5.0.0
9
+ cd ../..
10
+ ```
11
+
12
+ See `remappings.txt` to see how to work with different OpenZeppelin versions in parallel
13
+
14
+ ```
15
+ cat remappings.txt
16
+ @openzeppelin5/contracts/=lib/openzeppelin-contracts-500/contracts/
17
+ @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/
18
+ @openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/
19
+ ```
20
+
21
+
3
22
  ## Submodules checkout
4
23
 
5
24
  This repository uses submodules. To checkout or update to the latest submodules, run the following command after updating to any revision (or checking out the repository)
@@ -23,22 +42,24 @@ npm run coverage
23
42
 
24
43
  ### Deployment
25
44
 
26
- ```
27
- hh run --network <networkname> scripts/deploy.ts
28
- ```
45
+ Install the dependencies before running the script below for the first time.
29
46
 
30
- Networks:
31
- - hardhat (dynamically created network - https://hardhat.org/hardhat-network/docs/overview)
32
- - anvil (anvsil chain running in container next when using devcontainer)
33
- - mumbai (polygon testnet, requires WEB3_INFURA_PROJECT_ID)
34
- - mainnet (polygon mainnet, requires WEB3_INFURA_PROJECT_ID)
47
+ ```bash
48
+ npm install
49
+ ```
35
50
 
51
+ The deploy script will deploy all required contracts and create a test instance with a test product and a test pool.
36
52
 
37
- #### Deply all script
53
+ ```bash
54
+ # run deployment on a locally created ganache instance
55
+ export SKIP_VERIFICATION=true
56
+ hh run scripts/deploy_all.ts
57
+ ```
38
58
 
39
- The deploy all script will deploy all required contracts and create a test instance with a test product and a test pool.
59
+ ```bash
60
+ # set appropriate values vor env variables (see below)
40
61
 
41
- ```
62
+ # run deployment on another network
42
63
  hh run --network <networkname> scripts/deploy_all.ts
43
64
  ```
44
65
 
@@ -199,6 +220,7 @@ sudo apt update
199
220
  sudo apt install python3-pip
200
221
  pip install eth-brownie
201
222
  brownie pm install OpenZeppelin/openzeppelin-contracts@4.9.3
223
+ brownie pm install OpenZeppelin/openzeppelin-contracts@5.0.0
202
224
  ```
203
225
 
204
226
  ```bash
@@ -250,3 +272,28 @@ pool_id = pool.getNftId()
250
272
  product_id = product.getNftId()
251
273
  ```
252
274
 
275
+ ## migrate to kv store
276
+
277
+ sizes before
278
+ | Instance | 23.178 | 1.398 |
279
+ | TestInstanceBase | 3.305 | 21.271 |
280
+ | TestInstanceModuleAccess | 7.86 | 16.716 |
281
+ | TestInstanceModuleBundle | 7.586 | 16.99 |
282
+ | TestInstanceModuleCompensation | 3.305 | 21.271 |
283
+ | TestInstanceModuleComponent | 5.123 | 19.453 |
284
+ | TestInstanceModulePolicy | 6.937 | 17.639 |
285
+ | TestInstanceModulePool | 4.809 | 19.767 |
286
+ | TestInstanceModuleRisk | 3.305 | 21.271 |
287
+ | TestInstanceModuleTreasury | 7.563 | 17.013 |
288
+ ---
289
+ sizes after
290
+ | Instance | 22.727 | 1.849 |
291
+ | TestInstanceBase | 3.485 | 21.091 |
292
+ | TestInstanceModuleAccess | 8.036 | 16.54 |
293
+ | TestInstanceModuleBundle | 8.354 | 16.222 |
294
+ | TestInstanceModuleCompensation | 3.485 | 21.091 |
295
+ | TestInstanceModuleComponent | 5.482 | 19.094 |
296
+ | TestInstanceModulePolicy | 7.502 | 17.074 |
297
+ | TestInstanceModulePool | 5.522 | 19.054 |
298
+ | TestInstanceModuleRisk | 4.635 | 19.941 |
299
+ | TestInstanceModuleTreasury | 8.945 | 15.631 |
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/73036ef8d3587a4d497b53a8e5f6bc33.json"
3
+ "buildInfo": "../../../build-info/5ac43d71ce34a4d504e0bec066491786.json"
4
4
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/5ac43d71ce34a4d504e0bec066491786.json"
4
+ }
@@ -0,0 +1,405 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "Distribution",
4
+ "sourceName": "contracts/components/Distribution.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "address",
10
+ "name": "registry",
11
+ "type": "address"
12
+ },
13
+ {
14
+ "internalType": "NftId",
15
+ "name": "instanceNftId",
16
+ "type": "uint96"
17
+ },
18
+ {
19
+ "internalType": "address",
20
+ "name": "token",
21
+ "type": "address"
22
+ },
23
+ {
24
+ "internalType": "bool",
25
+ "name": "verifying",
26
+ "type": "bool"
27
+ },
28
+ {
29
+ "components": [
30
+ {
31
+ "internalType": "UFixed",
32
+ "name": "fractionalFee",
33
+ "type": "uint256"
34
+ },
35
+ {
36
+ "internalType": "uint256",
37
+ "name": "fixedFee",
38
+ "type": "uint256"
39
+ }
40
+ ],
41
+ "internalType": "struct Fee",
42
+ "name": "distributionFee",
43
+ "type": "tuple"
44
+ }
45
+ ],
46
+ "stateMutability": "nonpayable",
47
+ "type": "constructor"
48
+ },
49
+ {
50
+ "inputs": [
51
+ {
52
+ "internalType": "ReferralId",
53
+ "name": "referralId",
54
+ "type": "bytes8"
55
+ },
56
+ {
57
+ "internalType": "uint256",
58
+ "name": "netPremiumAmount",
59
+ "type": "uint256"
60
+ }
61
+ ],
62
+ "name": "calculateFeeAmount",
63
+ "outputs": [
64
+ {
65
+ "internalType": "uint256",
66
+ "name": "feeAmount",
67
+ "type": "uint256"
68
+ }
69
+ ],
70
+ "stateMutability": "view",
71
+ "type": "function"
72
+ },
73
+ {
74
+ "inputs": [
75
+ {
76
+ "internalType": "ReferralId",
77
+ "name": "referralId",
78
+ "type": "bytes8"
79
+ },
80
+ {
81
+ "internalType": "uint256",
82
+ "name": "netPremiumAmount",
83
+ "type": "uint256"
84
+ }
85
+ ],
86
+ "name": "calculateRenewalFeeAmount",
87
+ "outputs": [
88
+ {
89
+ "internalType": "uint256",
90
+ "name": "feeAmount",
91
+ "type": "uint256"
92
+ }
93
+ ],
94
+ "stateMutability": "view",
95
+ "type": "function"
96
+ },
97
+ {
98
+ "inputs": [],
99
+ "name": "getData",
100
+ "outputs": [
101
+ {
102
+ "internalType": "bytes",
103
+ "name": "data",
104
+ "type": "bytes"
105
+ }
106
+ ],
107
+ "stateMutability": "view",
108
+ "type": "function"
109
+ },
110
+ {
111
+ "inputs": [],
112
+ "name": "getDistributionFee",
113
+ "outputs": [
114
+ {
115
+ "components": [
116
+ {
117
+ "internalType": "UFixed",
118
+ "name": "fractionalFee",
119
+ "type": "uint256"
120
+ },
121
+ {
122
+ "internalType": "uint256",
123
+ "name": "fixedFee",
124
+ "type": "uint256"
125
+ }
126
+ ],
127
+ "internalType": "struct Fee",
128
+ "name": "distributionFee",
129
+ "type": "tuple"
130
+ }
131
+ ],
132
+ "stateMutability": "view",
133
+ "type": "function"
134
+ },
135
+ {
136
+ "inputs": [],
137
+ "name": "getInstance",
138
+ "outputs": [
139
+ {
140
+ "internalType": "contract IInstance",
141
+ "name": "instance",
142
+ "type": "address"
143
+ }
144
+ ],
145
+ "stateMutability": "view",
146
+ "type": "function"
147
+ },
148
+ {
149
+ "inputs": [],
150
+ "name": "getNftId",
151
+ "outputs": [
152
+ {
153
+ "internalType": "NftId",
154
+ "name": "nftId",
155
+ "type": "uint96"
156
+ }
157
+ ],
158
+ "stateMutability": "view",
159
+ "type": "function"
160
+ },
161
+ {
162
+ "inputs": [],
163
+ "name": "getOwner",
164
+ "outputs": [
165
+ {
166
+ "internalType": "address",
167
+ "name": "owner",
168
+ "type": "address"
169
+ }
170
+ ],
171
+ "stateMutability": "view",
172
+ "type": "function"
173
+ },
174
+ {
175
+ "inputs": [],
176
+ "name": "getParentNftId",
177
+ "outputs": [
178
+ {
179
+ "internalType": "NftId",
180
+ "name": "nftId",
181
+ "type": "uint96"
182
+ }
183
+ ],
184
+ "stateMutability": "view",
185
+ "type": "function"
186
+ },
187
+ {
188
+ "inputs": [],
189
+ "name": "getRegistry",
190
+ "outputs": [
191
+ {
192
+ "internalType": "contract IRegistry",
193
+ "name": "registry",
194
+ "type": "address"
195
+ }
196
+ ],
197
+ "stateMutability": "view",
198
+ "type": "function"
199
+ },
200
+ {
201
+ "inputs": [],
202
+ "name": "getToken",
203
+ "outputs": [
204
+ {
205
+ "internalType": "contract IERC20Metadata",
206
+ "name": "token",
207
+ "type": "address"
208
+ }
209
+ ],
210
+ "stateMutability": "view",
211
+ "type": "function"
212
+ },
213
+ {
214
+ "inputs": [],
215
+ "name": "getType",
216
+ "outputs": [
217
+ {
218
+ "internalType": "ObjectType",
219
+ "name": "",
220
+ "type": "uint8"
221
+ }
222
+ ],
223
+ "stateMutability": "pure",
224
+ "type": "function"
225
+ },
226
+ {
227
+ "inputs": [],
228
+ "name": "getWallet",
229
+ "outputs": [
230
+ {
231
+ "internalType": "address",
232
+ "name": "walletAddress",
233
+ "type": "address"
234
+ }
235
+ ],
236
+ "stateMutability": "view",
237
+ "type": "function"
238
+ },
239
+ {
240
+ "inputs": [],
241
+ "name": "isVerifying",
242
+ "outputs": [
243
+ {
244
+ "internalType": "bool",
245
+ "name": "verifying",
246
+ "type": "bool"
247
+ }
248
+ ],
249
+ "stateMutability": "view",
250
+ "type": "function"
251
+ },
252
+ {
253
+ "inputs": [],
254
+ "name": "lock",
255
+ "outputs": [],
256
+ "stateMutability": "nonpayable",
257
+ "type": "function"
258
+ },
259
+ {
260
+ "inputs": [
261
+ {
262
+ "internalType": "ReferralId",
263
+ "name": "referralId",
264
+ "type": "bytes8"
265
+ },
266
+ {
267
+ "internalType": "uint256",
268
+ "name": "feeAmount",
269
+ "type": "uint256"
270
+ }
271
+ ],
272
+ "name": "processRenewal",
273
+ "outputs": [],
274
+ "stateMutability": "nonpayable",
275
+ "type": "function"
276
+ },
277
+ {
278
+ "inputs": [
279
+ {
280
+ "internalType": "ReferralId",
281
+ "name": "referralId",
282
+ "type": "bytes8"
283
+ },
284
+ {
285
+ "internalType": "uint256",
286
+ "name": "feeAmount",
287
+ "type": "uint256"
288
+ }
289
+ ],
290
+ "name": "processSale",
291
+ "outputs": [],
292
+ "stateMutability": "nonpayable",
293
+ "type": "function"
294
+ },
295
+ {
296
+ "inputs": [
297
+ {
298
+ "internalType": "ReferralId",
299
+ "name": "referralId",
300
+ "type": "bytes8"
301
+ }
302
+ ],
303
+ "name": "referralIsValid",
304
+ "outputs": [
305
+ {
306
+ "internalType": "bool",
307
+ "name": "isValid",
308
+ "type": "bool"
309
+ }
310
+ ],
311
+ "stateMutability": "view",
312
+ "type": "function"
313
+ },
314
+ {
315
+ "inputs": [],
316
+ "name": "register",
317
+ "outputs": [
318
+ {
319
+ "internalType": "NftId",
320
+ "name": "componentId",
321
+ "type": "uint96"
322
+ }
323
+ ],
324
+ "stateMutability": "nonpayable",
325
+ "type": "function"
326
+ },
327
+ {
328
+ "inputs": [
329
+ {
330
+ "components": [
331
+ {
332
+ "internalType": "UFixed",
333
+ "name": "fractionalFee",
334
+ "type": "uint256"
335
+ },
336
+ {
337
+ "internalType": "uint256",
338
+ "name": "fixedFee",
339
+ "type": "uint256"
340
+ }
341
+ ],
342
+ "internalType": "struct Fee",
343
+ "name": "distributionFee",
344
+ "type": "tuple"
345
+ }
346
+ ],
347
+ "name": "setFees",
348
+ "outputs": [],
349
+ "stateMutability": "nonpayable",
350
+ "type": "function"
351
+ },
352
+ {
353
+ "inputs": [
354
+ {
355
+ "internalType": "bytes4",
356
+ "name": "interfaceId",
357
+ "type": "bytes4"
358
+ }
359
+ ],
360
+ "name": "supportsInterface",
361
+ "outputs": [
362
+ {
363
+ "internalType": "bool",
364
+ "name": "",
365
+ "type": "bool"
366
+ }
367
+ ],
368
+ "stateMutability": "view",
369
+ "type": "function"
370
+ },
371
+ {
372
+ "inputs": [],
373
+ "name": "unlock",
374
+ "outputs": [],
375
+ "stateMutability": "nonpayable",
376
+ "type": "function"
377
+ }
378
+ ],
379
+ "bytecode": "0x60e06040523480156200001157600080fd5b506040516200192638038062001926833981016040819052620000349162000783565b6301ffc9a760e01b60009081526020527f67be87c3ff9960ca1e9cfac5cab2ff4747269cf9ed20c9b7306235ac35a491c5805460ff1916600117905584848482826001600160a01b038216620000d15760405162461bcd60e51b815260206004820152601b60248201527f4552524f523a5247422d3031303a52454749535452595f5a45524f000000000060448201526064015b60405180910390fd5b6001600160a01b03821660808190526040516301ffc9a760e01b81526306ecd8ef60e01b60048201526301ffc9a790602401602060405180830381865afa15801562000121573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001479190620007f8565b620001955760405162461bcd60e51b815260206004820152601a60248201527f4552524f523a5247422d3031313a4e4f545f52454749535452590000000000006044820152606401620000c8565b6001600160601b03811660a081905260805160405163e74d052f60e01b815260048101929092526001600160a01b03169063e74d052f90602401602060405180830381865afa158015620001ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002139190620007f8565b6200026d5760405162461bcd60e51b815260206004820152602360248201527f4552524f523a5247422d3031323a504152454e545f4e4f545f5245474953544560448201526214915160ea1b6064820152608401620000c8565b3360c052631dfba64760e11b60009081526020527f95e5a2564f7af40498dc043c6da135e06324c5edb1f60c2bf4dcdf2da207fa45805460ff1916600117905550506080516040516305247a1760e51b81526001600160601b03841660048201526000916001600160a01b03169063a48f42e090602401600060405180830381865afa15801562000302573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200032c9190810190620008aa565b6060810151600580546001600160a01b0319166001600160a01b0390921691821790556040516301ffc9a760e01b8152630de7806f60e41b6004820152919250906301ffc9a790602401602060405180830381865afa15801562000394573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003ba9190620007f8565b620003e25760405162461bcd60e51b81526020600482015260006024820152604401620000c8565b600560009054906101000a90046001600160a01b03166001600160a01b0316636fa298536040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000436573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200045c919062000984565b600180546001600160a01b039283166001600160a01b0319918216179091556003805482163017905560048054928516929091169190911781556005805460ff60a01b1916905560408051632bd182d360e01b8152815173__$a23651848365a6a5ca15f07b4331037f48$__93632bd182d39383820193909291908290030181865af4158015620004f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005179190620009a4565b8051600655602090810151600755600a805460ff19168815151790558551600855858101516009556005546040805163329802c760e21b815290516001600160a01b03909216965063ca600b1c9550600480820195509293509091908290030181865afa1580156200058d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005b3919062000984565b600a8054610100600160a81b0319166101006001600160a01b039384160217905560055460408051634288121d60e01b815290519190921691634288121d9160048083019260209291908290030181865afa15801562000617573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200063d919062000984565b600b80546001600160a01b0319166001600160a01b039290921691909117905550620009c39350505050565b6001600160a01b03811681146200067f57600080fd5b50565b80516200068f8162000669565b919050565b80516001600160601b03811681146200068f57600080fd5b805180151581146200068f57600080fd5b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715620006f857620006f8620006bd565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620007295762000729620006bd565b604052919050565b6000604082840312156200074457600080fd5b604080519081016001600160401b0381118282101715620007695762000769620006bd565b604052825181526020928301519281019290925250919050565b600080600080600060c086880312156200079c57600080fd5b8551620007a98162000669565b9450620007b96020870162000694565b93506040860151620007cb8162000669565b9250620007db60608701620006ac565b9150620007ec876080880162000731565b90509295509295909350565b6000602082840312156200080b57600080fd5b6200081682620006ac565b9392505050565b600082601f8301126200082f57600080fd5b81516001600160401b038111156200084b576200084b620006bd565b602062000861601f8301601f19168201620006fe565b82815285828487010111156200087657600080fd5b60005b838110156200089657858101830151828201840152820162000879565b506000928101909101919091529392505050565b600060208284031215620008bd57600080fd5b81516001600160401b0380821115620008d557600080fd5b9083019060c08286031215620008ea57600080fd5b620008f4620006d3565b620008ff8362000694565b81526200090f6020840162000694565b6020820152604083015160ff811681146200092957600080fd5b60408201526200093c6060840162000682565b60608201526200094f6080840162000682565b608082015260a0830151828111156200096757600080fd5b62000975878286016200081d565b60a08301525095945050505050565b6000602082840312156200099757600080fd5b8151620008168162000669565b600060408284031215620009b757600080fd5b62000816838362000731565b60805160a05160c051610f1062000a1660003960006108bb015260006101e501526000818161024d0152818161035a015281816103f00152818161061d0152818161083e01526108fe0152610f106000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c8063644c45e0116100b8578063d16d0fe81161007c578063d16d0fe8146102a9578063de7b5d14146102ca578063e2147567146102db578063f7d39dea146102ef578063f80e207214610238578063f83d08ba1461030257600080fd5b8063644c45e0146102715780637c3d51661461027957806387ef9ba01461028e578063893d20e814610299578063a69df4b5146102a157600080fd5b806331b62a3b116100ff57806331b62a3b146101e35780633bc5de30146102095780633f52c0f6146102235780634cf30a84146102385780635ab1bd531461024b57600080fd5b806301ffc9a71461013c578063132996041461017e57806315dae03e146101a35780631aa3a008146101b257806321df0da7146101d2575b600080fd5b61016961014a366004610b7b565b6001600160e01b03191660009081526020819052604090205460ff1690565b60405190151581526020015b60405180910390f35b6003546001600160a01b03165b6040516001600160a01b039091168152602001610175565b60405160788152602001610175565b6101ba61030f565b6040516001600160601b039091168152602001610175565b6004546001600160a01b031661018b565b7f00000000000000000000000000000000000000000000000000000000000000006101ba565b604080516020810182526000815290516101759190610bac565b610236610231366004610c63565b610534565b005b610236610246366004610cb2565b61059d565b7f000000000000000000000000000000000000000000000000000000000000000061018b565b6101ba610605565b61028161066c565b6040516101759190610cdc565b600a5460ff16610169565b61018b61081c565b610236610977565b6102bc6102b7366004610cb2565b610a39565b604051908152602001610175565b6005546001600160a01b031661018b565b6101696102e9366004610cf3565b50600090565b6102bc6102fd366004610cb2565b610a4e565b610236610ae9565b905090565b600061031961081c565b6001600160a01b0316336001600160a01b0316146103585760405162461bcd60e51b815260206004820152600060248201526044015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103ce5760405162461bcd60e51b815260206004820152601b60248201527f4552524f523a434f422d3030313a52454749535452595f5a45524f0000000000604482015260640161034f565b60055460405163c3c5a54760e01b81526001600160a01b0391821660048201527f00000000000000000000000000000000000000000000000000000000000000009091169063c3c5a54790602401602060405180830381865afa158015610439573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045d9190610d0e565b6104b35760405162461bcd60e51b815260206004820152602160248201527f4552524f523a434f423a494e5354414e43455f4e4f545f5245474953544552456044820152601160fa1b606482015260840161034f565b6005805460ff60a01b1916600160a01b179055600154604051632210724360e11b81523060048201526001600160a01b0390911690634420e486906024016020604051808303816000875af1158015610510573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030a9190610d47565b600a54604051631fa9607b60e11b81526101009091046001600160a01b031690633f52c0f690610568908490600401610cdc565b600060405180830381600087803b15801561058257600080fd5b505af1158015610596573d6000803e3d6000fd5b5050505050565b600b546001600160a01b031633146106015760405162461bcd60e51b815260206004820152602160248201527f4552524f523a504f4c2d3030323a4e4f545f50524f445543545f5345525649436044820152604560f81b606482015260840161034f565b5050565b604051636939560f60e11b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d272ac1e90602401602060405180830381865afa158015610510573d6000803e3d6000fd5b60408051808201909152600080825260208201526005546000906001600160a01b0316639ae31ff561069c610605565b6040516001600160e01b031960e084901b1681526001600160601b039091166004820152602401602060405180830381865afa1580156106e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107049190610d47565b60055460405163278b381b60e01b81526001600160601b03831660048201529192506001600160a01b03169063278b381b90602401602060405180830381865afa158015610756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077a9190610d0e565b156108005760055460405163f2b246c360e01b81526001600160601b03831660048201526001600160a01b039091169063f2b246c3906024016101e060405180830381865afa1580156107d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f59190610db5565b610100015191505090565b5050604080518082019091526008548152600954602082015290565b604051636939560f60e11b815230600482015260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d272ac1e90602401602060405180830381865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a99190610d47565b90506001600160601b0381166108e0577f000000000000000000000000000000000000000000000000000000000000000091505090565b60405163df33330b60e01b81526001600160601b03821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063df33330b90602401602060405180830381865afa15801561094d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109719190610e74565b91505090565b61097f61081c565b6001600160a01b0316336001600160a01b0316146109d95760405162461bcd60e51b815260206004820152601760248201527622a92927a91d2923a1169818189d2727aa2fa7aba722a960491b604482015260640161034f565b600154604051630bdb124f60e21b81523060048201526001600160a01b0390911690632f6c493c906024015b600060405180830381600087803b158015610a1f57600080fd5b505af1158015610a33573d6000803e3d6000fd5b50505050565b6000610a458282610e91565b90505b92915050565b600080610a5961066c565b60405163012ebd8360e21b815281516004820152602082015160248201526044810185905290915073__$a23651848365a6a5ca15f07b4331037f48$__906304baf60c906064016040805180830381865af4158015610abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae09190610eb6565b50949350505050565b610af161081c565b6001600160a01b0316336001600160a01b031614610b4b5760405162461bcd60e51b815260206004820152601760248201527622a92927a91d2923a1169818189d2727aa2fa7aba722a960491b604482015260640161034f565b60015460405163f435f5a760e01b81523060048201526001600160a01b039091169063f435f5a790602401610a05565b600060208284031215610b8d57600080fd5b81356001600160e01b031981168114610ba557600080fd5b9392505050565b600060208083528351808285015260005b81811015610bd957858101830151858201604001528201610bbd565b506000604082860101526040601f19601f8301168501019250505092915050565b6040805190810167ffffffffffffffff81118282101715610c2b57634e487b7160e01b600052604160045260246000fd5b60405290565b604051610120810167ffffffffffffffff81118282101715610c2b57634e487b7160e01b600052604160045260246000fd5b600060408284031215610c7557600080fd5b610c7d610bfa565b82358152602083013560208201528091505092915050565b80356001600160c01b031981168114610cad57600080fd5b919050565b60008060408385031215610cc557600080fd5b610cce83610c95565b946020939093013593505050565b815181526020808301519082015260408101610a48565b600060208284031215610d0557600080fd5b610a4582610c95565b600060208284031215610d2057600080fd5b81518015158114610ba557600080fd5b80516001600160601b0381168114610cad57600080fd5b600060208284031215610d5957600080fd5b610a4582610d30565b6001600160a01b0381168114610d7757600080fd5b50565b8051610cad81610d62565b600060408284031215610d9757600080fd5b610d9f610bfa565b9050815181526020820151602082015292915050565b60006101e08284031215610dc857600080fd5b610dd0610c31565b610dd983610d30565b8152610de760208401610d30565b6020820152610df860408401610d7a565b6040820152610e0a8460608501610d85565b6060820152610e1c8460a08501610d85565b6080820152610e2e8460e08501610d85565b60a0820152610e41846101208501610d85565b60c0820152610e54846101608501610d85565b60e0820152610e67846101a08501610d85565b6101008201529392505050565b600060208284031215610e8657600080fd5b8151610ba581610d62565b8082028115828204841417610a4857634e487b7160e01b600052601160045260246000fd5b60008060408385031215610ec957600080fd5b50508051602090910151909290915056fea264697066735822122018bf5a35d60a55091cad3895f28bd69d0dc225addadacdbba58a47e8a05197ba64736f6c63430008140033",
380
+ "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101375760003560e01c8063644c45e0116100b8578063d16d0fe81161007c578063d16d0fe8146102a9578063de7b5d14146102ca578063e2147567146102db578063f7d39dea146102ef578063f80e207214610238578063f83d08ba1461030257600080fd5b8063644c45e0146102715780637c3d51661461027957806387ef9ba01461028e578063893d20e814610299578063a69df4b5146102a157600080fd5b806331b62a3b116100ff57806331b62a3b146101e35780633bc5de30146102095780633f52c0f6146102235780634cf30a84146102385780635ab1bd531461024b57600080fd5b806301ffc9a71461013c578063132996041461017e57806315dae03e146101a35780631aa3a008146101b257806321df0da7146101d2575b600080fd5b61016961014a366004610b7b565b6001600160e01b03191660009081526020819052604090205460ff1690565b60405190151581526020015b60405180910390f35b6003546001600160a01b03165b6040516001600160a01b039091168152602001610175565b60405160788152602001610175565b6101ba61030f565b6040516001600160601b039091168152602001610175565b6004546001600160a01b031661018b565b7f00000000000000000000000000000000000000000000000000000000000000006101ba565b604080516020810182526000815290516101759190610bac565b610236610231366004610c63565b610534565b005b610236610246366004610cb2565b61059d565b7f000000000000000000000000000000000000000000000000000000000000000061018b565b6101ba610605565b61028161066c565b6040516101759190610cdc565b600a5460ff16610169565b61018b61081c565b610236610977565b6102bc6102b7366004610cb2565b610a39565b604051908152602001610175565b6005546001600160a01b031661018b565b6101696102e9366004610cf3565b50600090565b6102bc6102fd366004610cb2565b610a4e565b610236610ae9565b905090565b600061031961081c565b6001600160a01b0316336001600160a01b0316146103585760405162461bcd60e51b815260206004820152600060248201526044015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166103ce5760405162461bcd60e51b815260206004820152601b60248201527f4552524f523a434f422d3030313a52454749535452595f5a45524f0000000000604482015260640161034f565b60055460405163c3c5a54760e01b81526001600160a01b0391821660048201527f00000000000000000000000000000000000000000000000000000000000000009091169063c3c5a54790602401602060405180830381865afa158015610439573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061045d9190610d0e565b6104b35760405162461bcd60e51b815260206004820152602160248201527f4552524f523a434f423a494e5354414e43455f4e4f545f5245474953544552456044820152601160fa1b606482015260840161034f565b6005805460ff60a01b1916600160a01b179055600154604051632210724360e11b81523060048201526001600160a01b0390911690634420e486906024016020604051808303816000875af1158015610510573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061030a9190610d47565b600a54604051631fa9607b60e11b81526101009091046001600160a01b031690633f52c0f690610568908490600401610cdc565b600060405180830381600087803b15801561058257600080fd5b505af1158015610596573d6000803e3d6000fd5b5050505050565b600b546001600160a01b031633146106015760405162461bcd60e51b815260206004820152602160248201527f4552524f523a504f4c2d3030323a4e4f545f50524f445543545f5345525649436044820152604560f81b606482015260840161034f565b5050565b604051636939560f60e11b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063d272ac1e90602401602060405180830381865afa158015610510573d6000803e3d6000fd5b60408051808201909152600080825260208201526005546000906001600160a01b0316639ae31ff561069c610605565b6040516001600160e01b031960e084901b1681526001600160601b039091166004820152602401602060405180830381865afa1580156106e0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107049190610d47565b60055460405163278b381b60e01b81526001600160601b03831660048201529192506001600160a01b03169063278b381b90602401602060405180830381865afa158015610756573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077a9190610d0e565b156108005760055460405163f2b246c360e01b81526001600160601b03831660048201526001600160a01b039091169063f2b246c3906024016101e060405180830381865afa1580156107d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f59190610db5565b610100015191505090565b5050604080518082019091526008548152600954602082015290565b604051636939560f60e11b815230600482015260009081906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063d272ac1e90602401602060405180830381865afa158015610885573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a99190610d47565b90506001600160601b0381166108e0577f000000000000000000000000000000000000000000000000000000000000000091505090565b60405163df33330b60e01b81526001600160601b03821660048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063df33330b90602401602060405180830381865afa15801561094d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109719190610e74565b91505090565b61097f61081c565b6001600160a01b0316336001600160a01b0316146109d95760405162461bcd60e51b815260206004820152601760248201527622a92927a91d2923a1169818189d2727aa2fa7aba722a960491b604482015260640161034f565b600154604051630bdb124f60e21b81523060048201526001600160a01b0390911690632f6c493c906024015b600060405180830381600087803b158015610a1f57600080fd5b505af1158015610a33573d6000803e3d6000fd5b50505050565b6000610a458282610e91565b90505b92915050565b600080610a5961066c565b60405163012ebd8360e21b815281516004820152602082015160248201526044810185905290915073__$a23651848365a6a5ca15f07b4331037f48$__906304baf60c906064016040805180830381865af4158015610abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae09190610eb6565b50949350505050565b610af161081c565b6001600160a01b0316336001600160a01b031614610b4b5760405162461bcd60e51b815260206004820152601760248201527622a92927a91d2923a1169818189d2727aa2fa7aba722a960491b604482015260640161034f565b60015460405163f435f5a760e01b81523060048201526001600160a01b039091169063f435f5a790602401610a05565b600060208284031215610b8d57600080fd5b81356001600160e01b031981168114610ba557600080fd5b9392505050565b600060208083528351808285015260005b81811015610bd957858101830151858201604001528201610bbd565b506000604082860101526040601f19601f8301168501019250505092915050565b6040805190810167ffffffffffffffff81118282101715610c2b57634e487b7160e01b600052604160045260246000fd5b60405290565b604051610120810167ffffffffffffffff81118282101715610c2b57634e487b7160e01b600052604160045260246000fd5b600060408284031215610c7557600080fd5b610c7d610bfa565b82358152602083013560208201528091505092915050565b80356001600160c01b031981168114610cad57600080fd5b919050565b60008060408385031215610cc557600080fd5b610cce83610c95565b946020939093013593505050565b815181526020808301519082015260408101610a48565b600060208284031215610d0557600080fd5b610a4582610c95565b600060208284031215610d2057600080fd5b81518015158114610ba557600080fd5b80516001600160601b0381168114610cad57600080fd5b600060208284031215610d5957600080fd5b610a4582610d30565b6001600160a01b0381168114610d7757600080fd5b50565b8051610cad81610d62565b600060408284031215610d9757600080fd5b610d9f610bfa565b9050815181526020820151602082015292915050565b60006101e08284031215610dc857600080fd5b610dd0610c31565b610dd983610d30565b8152610de760208401610d30565b6020820152610df860408401610d7a565b6040820152610e0a8460608501610d85565b6060820152610e1c8460a08501610d85565b6080820152610e2e8460e08501610d85565b60a0820152610e41846101208501610d85565b60c0820152610e54846101608501610d85565b60e0820152610e67846101a08501610d85565b6101008201529392505050565b600060208284031215610e8657600080fd5b8151610ba581610d62565b8082028115828204841417610a4857634e487b7160e01b600052601160045260246000fd5b60008060408385031215610ec957600080fd5b50508051602090910151909290915056fea264697066735822122018bf5a35d60a55091cad3895f28bd69d0dc225addadacdbba58a47e8a05197ba64736f6c63430008140033",
381
+ "linkReferences": {
382
+ "contracts/types/Fee.sol": {
383
+ "FeeLib": [
384
+ {
385
+ "length": 20,
386
+ "start": 1205
387
+ },
388
+ {
389
+ "length": 20,
390
+ "start": 5273
391
+ }
392
+ ]
393
+ }
394
+ },
395
+ "deployedLinkReferences": {
396
+ "contracts/types/Fee.sol": {
397
+ "FeeLib": [
398
+ {
399
+ "length": 20,
400
+ "start": 2691
401
+ }
402
+ ]
403
+ }
404
+ }
405
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/73036ef8d3587a4d497b53a8e5f6bc33.json"
3
+ "buildInfo": "../../../build-info/5ac43d71ce34a4d504e0bec066491786.json"
4
4
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/5ac43d71ce34a4d504e0bec066491786.json"
4
+ }