@etherisc/gif-next 0.0.2-f30e0eb-805 → 0.0.2-f4f2d93-430

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. package/README.md +6 -83
  2. package/artifacts/contracts/components/Component.sol/Component.dbg.json +1 -1
  3. package/artifacts/contracts/components/Component.sol/Component.json +10 -0
  4. package/artifacts/contracts/components/Distribution.sol/Distribution.dbg.json +1 -1
  5. package/artifacts/contracts/components/Distribution.sol/Distribution.json +10 -0
  6. package/artifacts/contracts/components/IComponent.sol/IComponent.dbg.json +1 -1
  7. package/artifacts/contracts/components/IComponent.sol/IComponent.json +100 -0
  8. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.dbg.json +1 -1
  9. package/artifacts/contracts/components/IDistributionComponent.sol/IDistributionComponent.json +100 -0
  10. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.dbg.json +1 -1
  11. package/artifacts/contracts/components/IPoolComponent.sol/IPoolComponent.json +110 -0
  12. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.dbg.json +1 -1
  13. package/artifacts/contracts/components/IProductComponent.sol/IProductComponent.json +100 -0
  14. package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +1 -1
  15. package/artifacts/contracts/components/Pool.sol/Pool.json +20 -0
  16. package/artifacts/contracts/components/Product.sol/Product.dbg.json +1 -1
  17. package/artifacts/contracts/components/Product.sol/Product.json +10 -0
  18. package/artifacts/contracts/instance/AccessManagerUpgradeableInitializeable.sol/AccessManagerUpgradeableInitializeable.dbg.json +1 -1
  19. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.dbg.json +1 -1
  20. package/artifacts/contracts/instance/BundleManager.sol/BundleManager.json +2 -2
  21. package/artifacts/contracts/instance/Cloneable.sol/Cloneable.dbg.json +1 -1
  22. package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +1 -1
  23. package/artifacts/contracts/instance/IInstance.sol/IInstance.json +34 -14
  24. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.dbg.json +1 -1
  25. package/artifacts/contracts/instance/IInstanceService.sol/IInstanceService.json +80 -14
  26. package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +1 -1
  27. package/artifacts/contracts/instance/Instance.sol/Instance.json +90 -70
  28. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.dbg.json +1 -1
  29. package/artifacts/contracts/instance/InstanceAccessManager.sol/InstanceAccessManager.json +76 -57
  30. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.dbg.json +1 -1
  31. package/artifacts/contracts/instance/InstanceReader.sol/InstanceReader.json +21 -11
  32. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.dbg.json +1 -1
  33. package/artifacts/contracts/instance/InstanceService.sol/InstanceService.json +208 -62
  34. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.dbg.json +1 -1
  35. package/artifacts/contracts/instance/InstanceServiceManager.sol/InstanceServiceManager.json +62 -22
  36. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.dbg.json +1 -1
  37. package/artifacts/contracts/instance/ObjectManager.sol/ObjectManager.json +2 -2
  38. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.dbg.json +1 -1
  39. package/artifacts/contracts/instance/base/ComponentService.sol/ComponentService.json +85 -30
  40. package/artifacts/contracts/instance/base/IKeyValueStore.sol/IKeyValueStore.dbg.json +1 -1
  41. package/artifacts/contracts/instance/base/ILifecycle.sol/ILifecycle.dbg.json +1 -1
  42. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.dbg.json +1 -1
  43. package/artifacts/contracts/instance/base/KeyValueStore.sol/KeyValueStore.json +2 -2
  44. package/artifacts/contracts/instance/base/Lifecycle.sol/Lifecycle.dbg.json +1 -1
  45. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.dbg.json +1 -1
  46. package/artifacts/contracts/instance/module/IAccess.sol/IAccess.json +6 -6
  47. package/artifacts/contracts/instance/module/IBundle.sol/IBundle.dbg.json +1 -1
  48. package/artifacts/contracts/instance/module/IComponents.sol/IComponents.dbg.json +1 -1
  49. package/artifacts/contracts/instance/module/IDistribution.sol/IDistribution.dbg.json +1 -1
  50. package/artifacts/contracts/instance/module/IPolicy.sol/IPolicy.dbg.json +1 -1
  51. package/artifacts/contracts/instance/module/IRisk.sol/IRisk.dbg.json +1 -1
  52. package/artifacts/contracts/instance/module/ISetup.sol/ISetup.dbg.json +1 -1
  53. package/artifacts/contracts/instance/module/ITreasury.sol/ITreasury.dbg.json +1 -1
  54. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.dbg.json +1 -1
  55. package/artifacts/contracts/instance/service/ApplicationService.sol/ApplicationService.json +124 -53
  56. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.dbg.json +1 -1
  57. package/artifacts/contracts/instance/service/ApplicationServiceManager.sol/ApplicationServiceManager.json +21 -13
  58. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.dbg.json +1 -1
  59. package/artifacts/contracts/instance/service/BundleService.sol/BundleService.json +298 -160
  60. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.dbg.json +1 -1
  61. package/artifacts/contracts/instance/service/BundleServiceManager.sol/BundleServiceManager.json +74 -14
  62. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.dbg.json +1 -1
  63. package/artifacts/contracts/instance/service/ClaimService.sol/ClaimService.json +104 -41
  64. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.dbg.json +1 -1
  65. package/artifacts/contracts/instance/service/ClaimServiceManager.sol/ClaimServiceManager.json +11 -7
  66. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.dbg.json +1 -1
  67. package/artifacts/contracts/instance/service/DistributionService.sol/DistributionService.json +189 -123
  68. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.dbg.json +1 -1
  69. package/artifacts/contracts/instance/service/DistributionServiceManager.sol/DistributionServiceManager.json +48 -48
  70. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.dbg.json +1 -1
  71. package/artifacts/contracts/instance/service/IApplicationService.sol/IApplicationService.json +80 -14
  72. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.dbg.json +1 -1
  73. package/artifacts/contracts/instance/service/IBundleService.sol/IBundleService.json +142 -113
  74. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.dbg.json +1 -1
  75. package/artifacts/contracts/instance/service/IClaimService.sol/IClaimService.json +80 -14
  76. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.dbg.json +1 -1
  77. package/artifacts/contracts/instance/service/IDistributionService.sol/IDistributionService.json +101 -24
  78. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.dbg.json +1 -1
  79. package/artifacts/contracts/instance/service/IPolicyService.sol/IPolicyService.json +90 -24
  80. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.dbg.json +1 -1
  81. package/artifacts/contracts/instance/service/IPoolService.sol/IPoolService.json +430 -14
  82. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.dbg.json +1 -1
  83. package/artifacts/contracts/instance/service/IProductService.sol/IProductService.json +80 -14
  84. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.dbg.json +1 -1
  85. package/artifacts/contracts/instance/service/PolicyService.sol/PolicyService.json +136 -65
  86. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.dbg.json +1 -1
  87. package/artifacts/contracts/instance/service/PolicyServiceManager.sol/PolicyServiceManager.json +27 -19
  88. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.dbg.json +1 -1
  89. package/artifacts/contracts/instance/service/PoolService.sol/PoolService.json +468 -55
  90. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.dbg.json +1 -1
  91. package/artifacts/contracts/instance/service/PoolServiceManager.sol/PoolServiceManager.json +18 -14
  92. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.dbg.json +1 -1
  93. package/artifacts/contracts/instance/service/ProductService.sol/ProductService.json +114 -51
  94. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.dbg.json +1 -1
  95. package/artifacts/contracts/instance/service/ProductServiceManager.sol/ProductServiceManager.json +16 -12
  96. package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +1 -1
  97. package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +1 -1
  98. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.dbg.json +1 -1
  99. package/artifacts/contracts/registry/IRegistryService.sol/IRegistryService.json +0 -24
  100. package/artifacts/contracts/registry/ITransferInterceptor.sol/ITransferInterceptor.dbg.json +1 -1
  101. package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +1 -1
  102. package/artifacts/contracts/registry/Registry.sol/Registry.json +2 -2
  103. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.dbg.json +1 -1
  104. package/artifacts/contracts/registry/RegistryAccessManager.sol/RegistryAccessManager.json +2 -2
  105. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.dbg.json +1 -1
  106. package/artifacts/contracts/registry/RegistryService.sol/RegistryService.json +17 -36
  107. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.dbg.json +1 -1
  108. package/artifacts/contracts/registry/RegistryServiceManager.sol/RegistryServiceManager.json +7 -7
  109. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.dbg.json +1 -1
  110. package/artifacts/contracts/registry/ReleaseManager.sol/ReleaseManager.json +23 -11
  111. package/artifacts/contracts/registry/TokenRegistry.sol/TokenRegistry.dbg.json +1 -1
  112. package/artifacts/contracts/shared/ContractDeployerLib.sol/ContractDeployerLib.dbg.json +1 -1
  113. package/artifacts/contracts/shared/ERC165.sol/ERC165.dbg.json +1 -1
  114. package/artifacts/contracts/shared/INftOwnable.sol/INftOwnable.dbg.json +1 -1
  115. package/artifacts/contracts/shared/IPolicyHolder.sol/IPolicyHolder.dbg.json +1 -1
  116. package/artifacts/contracts/shared/IRegisterable.sol/IRegisterable.dbg.json +1 -1
  117. package/artifacts/contracts/shared/IRegistryLinked.sol/IRegistryLinked.dbg.json +1 -1
  118. package/artifacts/contracts/shared/IService.sol/IService.dbg.json +1 -1
  119. package/artifacts/contracts/shared/IService.sol/IService.json +80 -14
  120. package/artifacts/contracts/shared/IVersionable.sol/IVersionable.dbg.json +1 -1
  121. package/artifacts/contracts/shared/NftOwnable.sol/NftOwnable.dbg.json +1 -1
  122. package/artifacts/contracts/shared/PolicyHolder.sol/PolicyHolder.dbg.json +1 -1
  123. package/artifacts/contracts/shared/ProxyManager.sol/ProxyManager.dbg.json +1 -1
  124. package/artifacts/contracts/shared/Registerable.sol/Registerable.dbg.json +1 -1
  125. package/artifacts/contracts/shared/RegistryLinked.sol/RegistryLinked.dbg.json +1 -1
  126. package/artifacts/contracts/shared/Service.sol/Service.dbg.json +1 -1
  127. package/artifacts/contracts/shared/Service.sol/Service.json +86 -15
  128. package/artifacts/contracts/shared/TokenHandler.sol/TokenHandler.dbg.json +1 -1
  129. package/artifacts/contracts/shared/UpgradableProxyWithAdmin.sol/UpgradableProxyWithAdmin.dbg.json +1 -1
  130. package/artifacts/contracts/shared/Versionable.sol/Versionable.dbg.json +1 -1
  131. package/artifacts/contracts/test/TestFee.sol/TestFee.dbg.json +1 -1
  132. package/artifacts/contracts/test/TestFee.sol/TestFee.json +2 -2
  133. package/artifacts/contracts/test/TestRegisterable.sol/TestRegisterable.dbg.json +1 -1
  134. package/artifacts/contracts/test/TestRoleId.sol/TestRoleId.dbg.json +1 -1
  135. package/artifacts/contracts/test/TestService.sol/TestService.dbg.json +1 -1
  136. package/artifacts/contracts/test/TestService.sol/TestService.json +101 -26
  137. package/artifacts/contracts/test/TestToken.sol/TestUsdc.dbg.json +1 -1
  138. package/artifacts/contracts/test/TestVersion.sol/TestVersion.dbg.json +1 -1
  139. package/artifacts/contracts/test/TestVersionable.sol/TestVersionable.dbg.json +1 -1
  140. package/artifacts/contracts/test/Usdc.sol/USDC.dbg.json +1 -1
  141. package/artifacts/contracts/types/AddressSet.sol/LibAddressSet.dbg.json +1 -1
  142. package/artifacts/contracts/types/Amount.sol/AmountLib.dbg.json +4 -0
  143. package/artifacts/contracts/types/Amount.sol/AmountLib.json +161 -0
  144. package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +1 -1
  145. package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +1 -1
  146. package/artifacts/contracts/types/ClaimId.sol/ClaimIdLib.dbg.json +1 -1
  147. package/artifacts/contracts/types/DistributorType.sol/DistributorTypeLib.dbg.json +1 -1
  148. package/artifacts/contracts/types/Fee.sol/FeeLib.dbg.json +1 -1
  149. package/artifacts/contracts/types/Fee.sol/FeeLib.json +40 -9
  150. package/artifacts/contracts/types/Key32.sol/Key32Lib.dbg.json +1 -1
  151. package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +1 -1
  152. package/artifacts/contracts/types/NftIdSet.sol/LibNftIdSet.dbg.json +1 -1
  153. package/artifacts/contracts/types/NumberId.sol/NumberIdLib.dbg.json +1 -1
  154. package/artifacts/contracts/types/ObjectType.sol/ObjectTypeLib.dbg.json +1 -1
  155. package/artifacts/contracts/types/PayoutId.sol/PayoutIdLib.dbg.json +1 -1
  156. package/artifacts/contracts/types/Referral.sol/ReferralLib.dbg.json +1 -1
  157. package/artifacts/contracts/types/RiskId.sol/RiskIdLib.dbg.json +1 -1
  158. package/artifacts/contracts/types/RoleId.sol/RoleIdLib.dbg.json +1 -1
  159. package/artifacts/contracts/types/Seconds.sol/SecondsLib.dbg.json +1 -1
  160. package/artifacts/contracts/types/StateId.sol/StateIdLib.dbg.json +1 -1
  161. package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +1 -1
  162. package/artifacts/contracts/types/UFixed.sol/MathLib.dbg.json +1 -1
  163. package/artifacts/contracts/types/UFixed.sol/UFixedLib.dbg.json +1 -1
  164. package/artifacts/contracts/types/Version.sol/VersionLib.dbg.json +1 -1
  165. package/artifacts/contracts/types/Version.sol/VersionPartLib.dbg.json +1 -1
  166. package/contracts/components/Component.sol +4 -2
  167. package/contracts/components/IComponent.sol +3 -1
  168. package/contracts/components/Pool.sol +8 -4
  169. package/contracts/instance/Instance.sol +1 -0
  170. package/contracts/instance/InstanceAccessManager.sol +16 -11
  171. package/contracts/instance/InstanceReader.sol +1 -0
  172. package/contracts/instance/InstanceService.sol +19 -19
  173. package/contracts/instance/base/ComponentService.sol +17 -30
  174. package/contracts/instance/base/KeyValueStore.sol +8 -3
  175. package/contracts/instance/module/IAccess.sol +2 -2
  176. package/contracts/instance/module/IBundle.sol +6 -4
  177. package/contracts/instance/module/IComponents.sol +6 -0
  178. package/contracts/instance/service/ApplicationService.sol +9 -9
  179. package/contracts/instance/service/BundleService.sol +155 -60
  180. package/contracts/instance/service/ClaimService.sol +3 -3
  181. package/contracts/instance/service/DistributionService.sol +24 -56
  182. package/contracts/instance/service/IBundleService.sol +53 -22
  183. package/contracts/instance/service/IDistributionService.sol +1 -0
  184. package/contracts/instance/service/IPoolService.sol +65 -1
  185. package/contracts/instance/service/PolicyService.sol +60 -101
  186. package/contracts/instance/service/PoolService.sol +132 -49
  187. package/contracts/instance/service/ProductService.sol +20 -51
  188. package/contracts/registry/IRegistryService.sol +4 -3
  189. package/contracts/registry/RegistryService.sol +10 -11
  190. package/contracts/registry/ReleaseManager.sol +20 -18
  191. package/contracts/shared/IService.sol +4 -6
  192. package/contracts/shared/Service.sol +21 -7
  193. package/contracts/test/TestService.sol +1 -1
  194. package/contracts/types/Amount.sol +60 -0
  195. package/contracts/types/Fee.sol +12 -5
  196. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "_format": "hh-sol-dbg-1",
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
+ }
@@ -0,0 +1,161 @@
1
+ {
2
+ "_format": "hh-sol-artifact-1",
3
+ "contractName": "AmountLib",
4
+ "sourceName": "contracts/types/Amount.sol",
5
+ "abi": [
6
+ {
7
+ "inputs": [
8
+ {
9
+ "internalType": "uint256",
10
+ "name": "amount",
11
+ "type": "uint256"
12
+ }
13
+ ],
14
+ "name": "ErrorAmountLibValueTooBig",
15
+ "type": "error"
16
+ },
17
+ {
18
+ "inputs": [
19
+ {
20
+ "internalType": "Amount",
21
+ "name": "amount",
22
+ "type": "uint96"
23
+ }
24
+ ],
25
+ "name": "eqz",
26
+ "outputs": [
27
+ {
28
+ "internalType": "bool",
29
+ "name": "",
30
+ "type": "bool"
31
+ }
32
+ ],
33
+ "stateMutability": "pure",
34
+ "type": "function"
35
+ },
36
+ {
37
+ "inputs": [
38
+ {
39
+ "internalType": "Amount",
40
+ "name": "amount",
41
+ "type": "uint96"
42
+ }
43
+ ],
44
+ "name": "gtz",
45
+ "outputs": [
46
+ {
47
+ "internalType": "bool",
48
+ "name": "",
49
+ "type": "bool"
50
+ }
51
+ ],
52
+ "stateMutability": "pure",
53
+ "type": "function"
54
+ },
55
+ {
56
+ "inputs": [],
57
+ "name": "max",
58
+ "outputs": [
59
+ {
60
+ "internalType": "Amount",
61
+ "name": "",
62
+ "type": "uint96"
63
+ }
64
+ ],
65
+ "stateMutability": "pure",
66
+ "type": "function"
67
+ },
68
+ {
69
+ "inputs": [
70
+ {
71
+ "internalType": "uint256",
72
+ "name": "amount",
73
+ "type": "uint256"
74
+ }
75
+ ],
76
+ "name": "toAmount",
77
+ "outputs": [
78
+ {
79
+ "internalType": "Amount",
80
+ "name": "",
81
+ "type": "uint96"
82
+ }
83
+ ],
84
+ "stateMutability": "pure",
85
+ "type": "function"
86
+ },
87
+ {
88
+ "inputs": [
89
+ {
90
+ "internalType": "Amount",
91
+ "name": "amount",
92
+ "type": "uint96"
93
+ }
94
+ ],
95
+ "name": "toInt",
96
+ "outputs": [
97
+ {
98
+ "internalType": "uint256",
99
+ "name": "",
100
+ "type": "uint256"
101
+ }
102
+ ],
103
+ "stateMutability": "pure",
104
+ "type": "function"
105
+ },
106
+ {
107
+ "inputs": [
108
+ {
109
+ "internalType": "Amount",
110
+ "name": "amount",
111
+ "type": "uint96"
112
+ }
113
+ ],
114
+ "name": "toUFixed",
115
+ "outputs": [
116
+ {
117
+ "internalType": "UFixed",
118
+ "name": "",
119
+ "type": "uint256"
120
+ }
121
+ ],
122
+ "stateMutability": "pure",
123
+ "type": "function"
124
+ },
125
+ {
126
+ "inputs": [],
127
+ "name": "zero",
128
+ "outputs": [
129
+ {
130
+ "internalType": "Amount",
131
+ "name": "",
132
+ "type": "uint96"
133
+ }
134
+ ],
135
+ "stateMutability": "pure",
136
+ "type": "function"
137
+ }
138
+ ],
139
+ "bytecode": "0x6102a461003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806352694ee81161006557806352694ee81461011057806355205f0f1461012b5780636ac5db191461013e578063bc1b392d1461014b57600080fd5b806308dc895e1461008c57806330b8415f146100b95780634c41dd96146100e5575b600080fd5b6100a661009a36600461020c565b6001600160601b031690565b6040519081526020015b60405180910390f35b6100d56100c736600461020c565b6001600160601b0316151590565b60405190151581526020016100b0565b6100f86100f336600461023c565b610152565b6040516001600160601b0390911681526020016100b0565b6100d561011e36600461020c565b6001600160601b03161590565b6100a661013936600461020c565b610187565b6001600160601b036100f8565b60006100f8565b60006001600160601b0382111561018357604051635a1bd76760e01b81526004810183905260240160405180910390fd5b5090565b6040516322f5db0f60e11b81526001600160601b038216600482015260009073__$5ac3274b8cf1e01ea223bf093142af05b0$__906345ebb61e90602401602060405180830381865af41580156101e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102069190610255565b92915050565b60006020828403121561021e57600080fd5b81356001600160601b038116811461023557600080fd5b9392505050565b60006020828403121561024e57600080fd5b5035919050565b60006020828403121561026757600080fd5b505191905056fea2646970667358221220b3e7a75e3b40eafbc65b6bf06fbf0ee53bce5301a3ac2bd0cebb9501897f0dc364736f6c63430008140033",
140
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c806352694ee81161006557806352694ee81461011057806355205f0f1461012b5780636ac5db191461013e578063bc1b392d1461014b57600080fd5b806308dc895e1461008c57806330b8415f146100b95780634c41dd96146100e5575b600080fd5b6100a661009a36600461020c565b6001600160601b031690565b6040519081526020015b60405180910390f35b6100d56100c736600461020c565b6001600160601b0316151590565b60405190151581526020016100b0565b6100f86100f336600461023c565b610152565b6040516001600160601b0390911681526020016100b0565b6100d561011e36600461020c565b6001600160601b03161590565b6100a661013936600461020c565b610187565b6001600160601b036100f8565b60006100f8565b60006001600160601b0382111561018357604051635a1bd76760e01b81526004810183905260240160405180910390fd5b5090565b6040516322f5db0f60e11b81526001600160601b038216600482015260009073__$5ac3274b8cf1e01ea223bf093142af05b0$__906345ebb61e90602401602060405180830381865af41580156101e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102069190610255565b92915050565b60006020828403121561021e57600080fd5b81356001600160601b038116811461023557600080fd5b9392505050565b60006020828403121561024e57600080fd5b5035919050565b60006020828403121561026757600080fd5b505191905056fea2646970667358221220b3e7a75e3b40eafbc65b6bf06fbf0ee53bce5301a3ac2bd0cebb9501897f0dc364736f6c63430008140033",
141
+ "linkReferences": {
142
+ "contracts/types/UFixed.sol": {
143
+ "UFixedLib": [
144
+ {
145
+ "length": 20,
146
+ "start": 482
147
+ }
148
+ ]
149
+ }
150
+ },
151
+ "deployedLinkReferences": {
152
+ "contracts/types/UFixed.sol": {
153
+ "UFixedLib": [
154
+ {
155
+ "length": 20,
156
+ "start": 424
157
+ }
158
+ ]
159
+ }
160
+ }
161
+ }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -44,6 +44,37 @@
44
44
  "stateMutability": "pure",
45
45
  "type": "function"
46
46
  },
47
+ {
48
+ "inputs": [
49
+ {
50
+ "components": [
51
+ {
52
+ "internalType": "UFixed",
53
+ "name": "fractionalFee",
54
+ "type": "uint256"
55
+ },
56
+ {
57
+ "internalType": "uint256",
58
+ "name": "fixedFee",
59
+ "type": "uint256"
60
+ }
61
+ ],
62
+ "internalType": "struct Fee",
63
+ "name": "fee",
64
+ "type": "tuple"
65
+ }
66
+ ],
67
+ "name": "eqz",
68
+ "outputs": [
69
+ {
70
+ "internalType": "bool",
71
+ "name": "",
72
+ "type": "bool"
73
+ }
74
+ ],
75
+ "stateMutability": "pure",
76
+ "type": "function"
77
+ },
47
78
  {
48
79
  "inputs": [
49
80
  {
@@ -112,7 +143,7 @@
112
143
  "type": "tuple"
113
144
  }
114
145
  ],
115
- "name": "feeIsZero",
146
+ "name": "gtz",
116
147
  "outputs": [
117
148
  {
118
149
  "internalType": "bool",
@@ -216,22 +247,22 @@
216
247
  "type": "function"
217
248
  }
218
249
  ],
219
- "bytecode": "0x61062361003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c806304baf60c146100715780632bd182d31461009e5780635faa955b146100df5780638de0a4c2146100f25780639524886814610115578063c7010dfa14610128575b600080fd5b61008461007f3660046104c1565b61015c565b604080519283526020830191909152015b60405180910390f35b604080518082018252600080825260209182018190528251808401909352808352908201525b60408051825181526020928301519281019290925201610095565b6100c46100ed3660046104ec565b610282565b61010561010036600461050f565b61032b565b6040519015158152602001610095565b61010561012336600461052b565b610346565b6100c4610136366004610560565b604080518082018252600080825260209182015281518083019092529281529182015290565b60008060006101e573__$5ac3274b8cf1e01ea223bf093142af05b0$__6345ebb61e866040518263ffffffff1660e01b815260040161019d91815260200190565b602060405180830381865af41580156101ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101de9190610582565b8651610367565b6020860151604051632255341b60e11b8152600481018390529192509073__$5ac3274b8cf1e01ea223bf093142af05b0$__906344aa683690602401602060405180830381865af415801561023e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102629190610582565b61026c91906105b1565b925061027883856105c4565b9150509250929050565b60408051808201825260008082526020820152815180830192839052631488c84560e01b90925260ff831660448301526001196064830152908073__$5ac3274b8cf1e01ea223bf093142af05b0$__631488c84560848301602060405180830381865af41580156102f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031b9190610582565b8152600060209091015292915050565b60008160200151600014801561034057508151155b92915050565b600081602001518360200151148015610360575082518251145b9392505050565b60006103608383670de0b6b3a764000060008080600019858709858702925082811083820303915050806000036103b1578382816103a7576103a76105d7565b0492505050610360565b8084116103fc5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640160405180910390fd5b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b60006040828403121561047657600080fd5b6040516040810181811067ffffffffffffffff821117156104a757634e487b7160e01b600052604160045260246000fd5b604052823581526020928301359281019290925250919050565b600080606083850312156104d457600080fd5b6104de8484610464565b946040939093013593505050565b6000602082840312156104fe57600080fd5b813560ff8116811461036057600080fd5b60006040828403121561052157600080fd5b6103608383610464565b6000806080838503121561053e57600080fd5b6105488484610464565b91506105578460408501610464565b90509250929050565b6000806040838503121561057357600080fd5b50508035926020909101359150565b60006020828403121561059457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103405761034061059b565b818103818111156103405761034061059b565b634e487b7160e01b600052601260045260246000fdfea2646970667358221220fb163c5e46017ea982269faf4f7e383bae8ccd840a59af25aef0249b558760d264736f6c63430008140033",
220
- "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c806304baf60c146100715780632bd182d31461009e5780635faa955b146100df5780638de0a4c2146100f25780639524886814610115578063c7010dfa14610128575b600080fd5b61008461007f3660046104c1565b61015c565b604080519283526020830191909152015b60405180910390f35b604080518082018252600080825260209182018190528251808401909352808352908201525b60408051825181526020928301519281019290925201610095565b6100c46100ed3660046104ec565b610282565b61010561010036600461050f565b61032b565b6040519015158152602001610095565b61010561012336600461052b565b610346565b6100c4610136366004610560565b604080518082018252600080825260209182015281518083019092529281529182015290565b60008060006101e573__$5ac3274b8cf1e01ea223bf093142af05b0$__6345ebb61e866040518263ffffffff1660e01b815260040161019d91815260200190565b602060405180830381865af41580156101ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101de9190610582565b8651610367565b6020860151604051632255341b60e11b8152600481018390529192509073__$5ac3274b8cf1e01ea223bf093142af05b0$__906344aa683690602401602060405180830381865af415801561023e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102629190610582565b61026c91906105b1565b925061027883856105c4565b9150509250929050565b60408051808201825260008082526020820152815180830192839052631488c84560e01b90925260ff831660448301526001196064830152908073__$5ac3274b8cf1e01ea223bf093142af05b0$__631488c84560848301602060405180830381865af41580156102f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031b9190610582565b8152600060209091015292915050565b60008160200151600014801561034057508151155b92915050565b600081602001518360200151148015610360575082518251145b9392505050565b60006103608383670de0b6b3a764000060008080600019858709858702925082811083820303915050806000036103b1578382816103a7576103a76105d7565b0492505050610360565b8084116103fc5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640160405180910390fd5b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b60006040828403121561047657600080fd5b6040516040810181811067ffffffffffffffff821117156104a757634e487b7160e01b600052604160045260246000fd5b604052823581526020928301359281019290925250919050565b600080606083850312156104d457600080fd5b6104de8484610464565b946040939093013593505050565b6000602082840312156104fe57600080fd5b813560ff8116811461036057600080fd5b60006040828403121561052157600080fd5b6103608383610464565b6000806080838503121561053e57600080fd5b6105488484610464565b91506105578460408501610464565b90509250929050565b6000806040838503121561057357600080fd5b50508035926020909101359150565b60006020828403121561059457600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156103405761034061059b565b818103818111156103405761034061059b565b634e487b7160e01b600052601260045260246000fdfea2646970667358221220fb163c5e46017ea982269faf4f7e383bae8ccd840a59af25aef0249b558760d264736f6c63430008140033",
250
+ "bytecode": "0x61067461003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c80635faa955b116100655780635faa955b1461011d5780639524886814610130578063c7010dfa14610143578063d0e149f71461017757600080fd5b806304baf60c1461008c57806305deb8b7146100b95780632bd182d3146100dc575b600080fd5b61009f61009a366004610512565b61018a565b604080519283526020830191909152015b60405180910390f35b6100cc6100c736600461053d565b6102bb565b60405190151581526020016100b0565b604080518082018252600080825260209182018190528251808401909352808352908201525b604080518251815260209283015192810192909252016100b0565b61010261012b366004610559565b6102d7565b6100cc61013e36600461057c565b610380565b6101026101513660046105b1565b604080518082018252600080825260209182015281518083019092529281529182015290565b6100cc61018536600461053d565b6103a1565b600081610196846102bb565b156102b4576040516322f5db0f60e11b81526004810184905260009061021d9073__$5ac3274b8cf1e01ea223bf093142af05b0$__906345ebb61e90602401602060405180830381865af41580156101f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061021691906105d3565b86516103b8565b6020860151604051632255341b60e11b8152600481018390529192509073__$5ac3274b8cf1e01ea223bf093142af05b0$__906344aa683690602401602060405180830381865af4158015610276573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029a91906105d3565b6102a49190610602565b92506102b08383610615565b9150505b9250929050565b80516000901515806102d1575060008260200151115b92915050565b60408051808201825260008082526020820152815180830192839052631488c84560e01b90925260ff831660448301526001196064830152908073__$5ac3274b8cf1e01ea223bf093142af05b0$__631488c84560848301602060405180830381865af415801561034c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037091906105d3565b8152600060209091015292915050565b60008160200151836020015114801561039a575082518251145b9392505050565b6000816020015160001480156102d1575050511590565b600061039a8383670de0b6b3a76400006000808060001985870985870292508281108382030391505080600003610402578382816103f8576103f8610628565b049250505061039a565b80841161044d5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640160405180910390fd5b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b6000604082840312156104c757600080fd5b6040516040810181811067ffffffffffffffff821117156104f857634e487b7160e01b600052604160045260246000fd5b604052823581526020928301359281019290925250919050565b6000806060838503121561052557600080fd5b61052f84846104b5565b946040939093013593505050565b60006040828403121561054f57600080fd5b61039a83836104b5565b60006020828403121561056b57600080fd5b813560ff8116811461039a57600080fd5b6000806080838503121561058f57600080fd5b61059984846104b5565b91506105a884604085016104b5565b90509250929050565b600080604083850312156105c457600080fd5b50508035926020909101359150565b6000602082840312156105e557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156102d1576102d16105ec565b818103818111156102d1576102d16105ec565b634e487b7160e01b600052601260045260246000fdfea26469706673582212207bcdb0ae01e6ab2efe34804fec4c3f799669d65c5338d45ed762a4b7b7ba204964736f6c63430008140033",
251
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100875760003560e01c80635faa955b116100655780635faa955b1461011d5780639524886814610130578063c7010dfa14610143578063d0e149f71461017757600080fd5b806304baf60c1461008c57806305deb8b7146100b95780632bd182d3146100dc575b600080fd5b61009f61009a366004610512565b61018a565b604080519283526020830191909152015b60405180910390f35b6100cc6100c736600461053d565b6102bb565b60405190151581526020016100b0565b604080518082018252600080825260209182018190528251808401909352808352908201525b604080518251815260209283015192810192909252016100b0565b61010261012b366004610559565b6102d7565b6100cc61013e36600461057c565b610380565b6101026101513660046105b1565b604080518082018252600080825260209182015281518083019092529281529182015290565b6100cc61018536600461053d565b6103a1565b600081610196846102bb565b156102b4576040516322f5db0f60e11b81526004810184905260009061021d9073__$5ac3274b8cf1e01ea223bf093142af05b0$__906345ebb61e90602401602060405180830381865af41580156101f2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061021691906105d3565b86516103b8565b6020860151604051632255341b60e11b8152600481018390529192509073__$5ac3274b8cf1e01ea223bf093142af05b0$__906344aa683690602401602060405180830381865af4158015610276573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029a91906105d3565b6102a49190610602565b92506102b08383610615565b9150505b9250929050565b80516000901515806102d1575060008260200151115b92915050565b60408051808201825260008082526020820152815180830192839052631488c84560e01b90925260ff831660448301526001196064830152908073__$5ac3274b8cf1e01ea223bf093142af05b0$__631488c84560848301602060405180830381865af415801561034c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037091906105d3565b8152600060209091015292915050565b60008160200151836020015114801561039a575082518251145b9392505050565b6000816020015160001480156102d1575050511590565b600061039a8383670de0b6b3a76400006000808060001985870985870292508281108382030391505080600003610402578382816103f8576103f8610628565b049250505061039a565b80841161044d5760405162461bcd60e51b81526020600482015260156024820152744d6174683a206d756c446976206f766572666c6f7760581b604482015260640160405180910390fd5b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b6000604082840312156104c757600080fd5b6040516040810181811067ffffffffffffffff821117156104f857634e487b7160e01b600052604160045260246000fd5b604052823581526020928301359281019290925250919050565b6000806060838503121561052557600080fd5b61052f84846104b5565b946040939093013593505050565b60006040828403121561054f57600080fd5b61039a83836104b5565b60006020828403121561056b57600080fd5b813560ff8116811461039a57600080fd5b6000806080838503121561058f57600080fd5b61059984846104b5565b91506105a884604085016104b5565b90509250929050565b600080604083850312156105c457600080fd5b50508035926020909101359150565b6000602082840312156105e557600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156102d1576102d16105ec565b818103818111156102d1576102d16105ec565b634e487b7160e01b600052601260045260246000fdfea26469706673582212207bcdb0ae01e6ab2efe34804fec4c3f799669d65c5338d45ed762a4b7b7ba204964736f6c63430008140033",
221
252
  "linkReferences": {
222
253
  "contracts/types/UFixed.sol": {
223
254
  "UFixedLib": [
224
255
  {
225
256
  "length": 20,
226
- "start": 416
257
+ "start": 498
227
258
  },
228
259
  {
229
260
  "length": 20,
230
- "start": 574
261
+ "start": 630
231
262
  },
232
263
  {
233
264
  "length": 20,
234
- "start": 760
265
+ "start": 845
235
266
  }
236
267
  ]
237
268
  }
@@ -241,15 +272,15 @@
241
272
  "UFixedLib": [
242
273
  {
243
274
  "length": 20,
244
- "start": 358
275
+ "start": 440
245
276
  },
246
277
  {
247
278
  "length": 20,
248
- "start": 516
279
+ "start": 572
249
280
  },
250
281
  {
251
282
  "length": 20,
252
- "start": 702
283
+ "start": 787
253
284
  }
254
285
  ]
255
286
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/95371df5f28c49f1193e96df62dcfc87.json"
3
+ "buildInfo": "../../../build-info/19724ea417151985924344f750f0deb4.json"
4
4
  }
@@ -1,9 +1,10 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.20;
3
3
 
4
- import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
5
- import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
6
4
  import {AccessManagedUpgradeable} from "@openzeppelin/contracts-upgradeable/access/manager/AccessManagedUpgradeable.sol";
5
+ import {IAccessManaged} from "@openzeppelin/contracts/access/manager/IAccessManaged.sol";
6
+ import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
7
+ import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
7
8
 
8
9
  import {IComponent} from "./IComponent.sol";
9
10
  import {IComponents} from "../instance/module/IComponents.sol";
@@ -90,6 +91,7 @@ abstract contract Component is
90
91
  $._wallet = address(this);
91
92
  $._token = IERC20Metadata(token);
92
93
 
94
+ registerInterface(type(IAccessManaged).interfaceId);
93
95
  registerInterface(type(IComponent).interfaceId);
94
96
  }
95
97
 
@@ -1,6 +1,7 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.20;
3
3
 
4
+ import {IAccessManaged} from "@openzeppelin/contracts/access/manager/IAccessManaged.sol";
4
5
  import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
5
6
 
6
7
  import {IComponents} from "../instance/module/IComponents.sol";
@@ -16,7 +17,8 @@ import {ObjectType} from "../types/ObjectType.sol";
16
17
  /// component examples are product, distribution, pool and oracle
17
18
  interface IComponent is
18
19
  IRegisterable,
19
- ITransferInterceptor
20
+ ITransferInterceptor,
21
+ IAccessManaged
20
22
  {
21
23
  error ErrorComponentNotChainNft(address caller);
22
24
  error ErrorComponentNotProductService(address caller);
@@ -1,6 +1,7 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  pragma solidity ^0.8.20;
3
3
 
4
+ import {Amount, AmountLib} from "../types/Amount.sol";
4
5
  import {Component} from "./Component.sol";
5
6
  import {Fee, FeeLib} from "../types/Fee.sol";
6
7
  import {IBundleService} from "../instance/service/IBundleService.sol";
@@ -15,7 +16,6 @@ import {Seconds} from "../types/Seconds.sol";
15
16
  import {TokenHandler} from "../shared/TokenHandler.sol";
16
17
  import {UFixed, UFixedLib} from "../types/UFixed.sol";
17
18
 
18
-
19
19
  abstract contract Pool is
20
20
  Component,
21
21
  IPoolComponent
@@ -133,7 +133,7 @@ abstract contract Pool is
133
133
  //restricted()
134
134
  onlyBundleOwner(bundleNftId)
135
135
  {
136
- _getPoolStorage()._bundleService.close(bundleNftId);
136
+ _getPoolStorage()._poolService.closeBundle(bundleNftId);
137
137
  }
138
138
 
139
139
 
@@ -239,14 +239,14 @@ abstract contract Pool is
239
239
  function _createBundle(
240
240
  address bundleOwner,
241
241
  Fee memory fee,
242
- uint256 amount,
242
+ Amount amount,
243
243
  Seconds lifetime,
244
244
  bytes memory filter
245
245
  )
246
246
  internal
247
247
  returns(NftId bundleNftId)
248
248
  {
249
- bundleNftId = _getPoolStorage()._bundleService.create(
249
+ bundleNftId = _getPoolStorage()._poolService.createBundle(
250
250
  bundleOwner,
251
251
  fee,
252
252
  amount,
@@ -274,11 +274,15 @@ abstract contract Pool is
274
274
  getToken(),
275
275
  TokenHandler(address(0)), // will be created by GIF service during registration
276
276
  address(this), // contract is its own wallet
277
+ AmountLib.zero(), // balance amount
278
+ AmountLib.zero(), // fee amount
277
279
  abi.encode(
278
280
  IComponents.PoolInfo(
279
281
  NftIdLib.zero(), // will be set when GIF registers the related product
280
282
  PUBLIC_ROLE(), // bundleOwnerRole
281
283
  type(uint256).max, // maxCapitalAmount,
284
+ 0, // initial balance amount
285
+ 0, // initial fee amount
282
286
  isNftInterceptor(), // isInterceptingBundleTransfers
283
287
  false, // isExternallyManaged,
284
288
  false, // isVerifyingApplications,
@@ -324,4 +324,5 @@ contract Instance is
324
324
  function getInstanceAccessManager() external view returns (InstanceAccessManager) {
325
325
  return _accessManager;
326
326
  }
327
+
327
328
  }
@@ -268,22 +268,22 @@ contract InstanceAccessManager is
268
268
  {
269
269
  _createTarget(target, name, IAccess.Type.Custom);
270
270
  }
271
+
271
272
  // INSTANCE_SERVICE_ROLE
272
273
  // IMPORTANT: instance access manager MUST be of Core type -> otherwise will be locked forever
273
- function setTargetLocked(string memory targetName, bool locked)
274
+ function setTargetLocked(address target, bool locked)
274
275
  external
275
276
  restricted()
276
277
  {
277
- ShortString nameShort = ShortStrings.toShortString(targetName);
278
- address target = _targetAddressForName[nameShort];
279
-
280
- if (target == address(0)) {
281
- revert IAccess.ErrorIAccessTargetDoesNotExist(nameShort);
278
+ IAccess.Type targetType = _targetInfo[target].ttype;
279
+ if(target == address(0) || targetType == IAccess.Type.NotInitialized) {
280
+ revert IAccess.ErrorIAccessTargetDoesNotExist(target);
282
281
  }
283
282
 
284
- if(_targetInfo[target].ttype == IAccess.Type.Core) {
285
- revert IAccess.ErrorIAccessTargetTypeInvalid(nameShort, _targetInfo[target].ttype);
283
+ if(targetType == IAccess.Type.Core) {
284
+ revert IAccess.ErrorIAccessTargetTypeInvalid(target, targetType);
286
285
  }
286
+
287
287
  // TODO isLocked is redundant but makes getTargetInfo() faster
288
288
  _targetInfo[target].isLocked = locked;
289
289
  _accessManager.setTargetClosed(target, locked);
@@ -314,7 +314,7 @@ contract InstanceAccessManager is
314
314
 
315
315
  // not custom target
316
316
  if(_targetInfo[target].ttype == IAccess.Type.Custom) {
317
- revert IAccess.ErrorIAccessTargetTypeInvalid(nameShort, IAccess.Type.Custom);
317
+ revert IAccess.ErrorIAccessTargetTypeInvalid(target, IAccess.Type.Custom);
318
318
  }
319
319
 
320
320
  // not custom role
@@ -345,7 +345,7 @@ contract InstanceAccessManager is
345
345
 
346
346
  // not core target
347
347
  if(_targetInfo[target].ttype == IAccess.Type.Core) {
348
- revert IAccess.ErrorIAccessTargetTypeInvalid(nameShort, IAccess.Type.Core);
348
+ revert IAccess.ErrorIAccessTargetTypeInvalid(target, IAccess.Type.Core);
349
349
  }
350
350
 
351
351
  // not core role
@@ -356,6 +356,11 @@ contract InstanceAccessManager is
356
356
  _setTargetFunctionRole(target, nameShort, selectors, roleId);
357
357
  }
358
358
 
359
+ function getTargetAddress(string memory targetName) public view returns(address targetAddress) {
360
+ ShortString nameShort = ShortStrings.toShortString(targetName);
361
+ return _targetAddressForName[nameShort];
362
+ }
363
+
359
364
  function isTargetLocked(address target) public view returns (bool locked) {
360
365
  return _accessManager.isTargetClosed(target);
361
366
  }
@@ -501,7 +506,7 @@ contract InstanceAccessManager is
501
506
  internal
502
507
  {
503
508
  if (target == address(0)) {
504
- revert IAccess.ErrorIAccessTargetDoesNotExist(name);
509
+ revert IAccess.ErrorIAccessTargetDoesNotExist(target);
505
510
  }
506
511
 
507
512
  if (!roleExists(roleId)) {
@@ -148,6 +148,7 @@ contract InstanceReader {
148
148
  }
149
149
  }
150
150
 
151
+ // TODO consider to replace by component type specific getXyzInfo
151
152
  function getComponentInfo(NftId poolNftId)
152
153
  public
153
154
  view