@gmx-io/sdk 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/build/cjs/src/abis/ClaimHandler.json +424 -0
  2. package/build/cjs/src/abis/CustomErrors.json +642 -61
  3. package/build/cjs/src/abis/DataStore.json +25 -6
  4. package/build/cjs/src/abis/EventEmitter.json +1 -6
  5. package/build/cjs/src/abis/ExchangeRouter.json +195 -290
  6. package/build/cjs/src/abis/GelatoRelayRouter.json +251 -98
  7. package/build/cjs/src/abis/GlvReader.json +60 -3
  8. package/build/cjs/src/abis/GlvRouter.json +144 -86
  9. package/build/cjs/src/abis/GovToken.json +1 -354
  10. package/build/cjs/src/abis/LayerZeroProvider.json +372 -0
  11. package/build/cjs/src/abis/Multicall.json +134 -38
  12. package/build/cjs/src/abis/MultichainClaimsRouter.json +1266 -0
  13. package/build/cjs/src/abis/MultichainGlvRouter.json +1150 -0
  14. package/build/cjs/src/abis/MultichainGmRouter.json +1449 -0
  15. package/build/cjs/src/abis/MultichainOrderRouter.json +1820 -0
  16. package/build/cjs/src/abis/MultichainSubaccountRouter.json +2069 -0
  17. package/build/cjs/src/abis/MultichainTransferRouter.json +915 -0
  18. package/build/cjs/src/abis/MultichainUtils.json +133 -0
  19. package/build/cjs/src/abis/MultichainVault.json +275 -0
  20. package/build/cjs/src/abis/ReferralStorage.json +69 -19
  21. package/build/cjs/src/abis/RelayParams.json +85 -48
  22. package/build/cjs/src/abis/SmartAccount.json +28 -0
  23. package/build/cjs/src/abis/SubaccountGelatoRelayRouter.json +282 -148
  24. package/build/cjs/src/abis/SubaccountRouter.json +62 -118
  25. package/build/cjs/src/abis/SyntheticsReader.json +342 -474
  26. package/build/cjs/src/abis/SyntheticsRouter.json +1 -6
  27. package/build/cjs/src/abis/index.js +53 -5
  28. package/build/cjs/src/configs/__tests__/markets.spec.js +2 -2
  29. package/build/cjs/src/configs/__tests__/permits.spec.js +1 -1
  30. package/build/cjs/src/configs/__tests__/tokens.spec.js +2 -2
  31. package/build/cjs/src/configs/batch.js +60 -0
  32. package/build/cjs/src/configs/chains.js +41 -8
  33. package/build/cjs/src/configs/contracts.js +151 -39
  34. package/build/cjs/src/configs/dataStore.js +49 -5
  35. package/build/cjs/src/configs/express.js +6 -1
  36. package/build/cjs/src/configs/factors.js +1 -1
  37. package/build/cjs/src/configs/markets.js +163 -0
  38. package/build/cjs/src/configs/oracleKeeper.js +21 -35
  39. package/build/cjs/src/configs/tokens.js +272 -2
  40. package/build/cjs/src/index.js +3 -3
  41. package/build/cjs/src/modules/markets/index.js +9 -4
  42. package/build/cjs/src/modules/markets/query-builders.js +28 -8
  43. package/build/cjs/src/modules/orders/helpers.js +11 -2
  44. package/build/cjs/src/modules/orders/helpers.spec.js +2 -2
  45. package/build/cjs/src/modules/orders/orders.js +3 -3
  46. package/build/cjs/src/modules/orders/utils.js +4 -5
  47. package/build/cjs/src/modules/positions/positions.js +38 -5
  48. package/build/cjs/src/modules/utils/utils.js +4 -3
  49. package/build/cjs/src/prebuilt/hashedKinkModelMarketRatesKeys.json +186 -0
  50. package/build/cjs/src/prebuilt/hashedMarketConfigKeys.json +2442 -512
  51. package/build/cjs/src/prebuilt/hashedMarketValuesKeys.json +347 -0
  52. package/build/cjs/src/test/mock.js +9 -4
  53. package/build/cjs/src/types/subsquid.js +597 -1
  54. package/build/cjs/src/types/swapStrategy.js +2 -0
  55. package/build/cjs/src/types/trade.js +1 -0
  56. package/build/cjs/src/utils/LruCache.js +4 -0
  57. package/build/cjs/src/utils/__tests__/LruCache.spec.js +18 -0
  58. package/build/cjs/src/utils/__tests__/numbers.spec.js +18 -16
  59. package/build/cjs/src/utils/__tests__/orderTransactions/batchUtils.spec.js +0 -1
  60. package/build/cjs/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +8 -0
  61. package/build/cjs/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +40 -30
  62. package/build/cjs/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +12 -0
  63. package/build/cjs/src/utils/__tests__/orderTransactions/swapOrders.spec.js +6 -0
  64. package/build/cjs/src/utils/__tests__/positions.spec.js +23 -6
  65. package/build/cjs/src/utils/__tests__/uiFeeReceiver.spec.js +10 -0
  66. package/build/cjs/src/utils/bigmath.js +9 -2
  67. package/build/cjs/src/utils/errors/parseError.js +35 -1
  68. package/build/cjs/src/utils/errors/transactionsErrors.js +7 -1
  69. package/build/cjs/src/utils/fees/executionFee.js +5 -3
  70. package/build/cjs/src/utils/fees/index.js +8 -6
  71. package/build/cjs/src/utils/fees/priceImpact.js +94 -32
  72. package/build/cjs/src/utils/gelatoRelay.js +5 -0
  73. package/build/cjs/src/utils/marketKeysAndConfigs.js +24 -4
  74. package/build/cjs/src/utils/markets.js +10 -3
  75. package/build/cjs/src/utils/numbers.js +18 -17
  76. package/build/cjs/src/utils/orderTransactions.js +5 -2
  77. package/build/cjs/src/utils/positions.js +77 -9
  78. package/build/cjs/src/utils/prices.js +19 -13
  79. package/build/cjs/src/utils/swap/__tests__/mockRouting.spec.js +1 -0
  80. package/build/cjs/src/utils/swap/botanixStaking.js +90 -0
  81. package/build/cjs/src/utils/swap/buildSwapStrategy.js +224 -0
  82. package/build/cjs/src/utils/swap/externalSwapPath.js +41 -0
  83. package/build/cjs/src/utils/swap/externalSwapQuoteByPath.js +27 -0
  84. package/build/cjs/src/utils/swap/swapStats.js +6 -3
  85. package/build/cjs/src/utils/swap/swapValues.js +250 -11
  86. package/build/cjs/src/utils/trade/decrease.js +470 -0
  87. package/build/cjs/src/utils/trade/{amounts.js → increase.js} +175 -72
  88. package/build/cjs/src/utils/trade/trade.js +2 -2
  89. package/build/cjs/src/utils/tradeHistory.js +3 -0
  90. package/build/cjs/src/utils/twap/uiFeeReceiver.js +9 -9
  91. package/build/esm/src/abis/ClaimHandler.json +424 -0
  92. package/build/esm/src/abis/CustomErrors.json +642 -61
  93. package/build/esm/src/abis/DataStore.json +25 -6
  94. package/build/esm/src/abis/EventEmitter.json +1 -6
  95. package/build/esm/src/abis/ExchangeRouter.json +195 -290
  96. package/build/esm/src/abis/GelatoRelayRouter.json +251 -98
  97. package/build/esm/src/abis/GlvReader.json +60 -3
  98. package/build/esm/src/abis/GlvRouter.json +144 -86
  99. package/build/esm/src/abis/GovToken.json +1 -354
  100. package/build/esm/src/abis/LayerZeroProvider.json +372 -0
  101. package/build/esm/src/abis/Multicall.json +134 -38
  102. package/build/esm/src/abis/MultichainClaimsRouter.json +1266 -0
  103. package/build/esm/src/abis/MultichainGlvRouter.json +1150 -0
  104. package/build/esm/src/abis/MultichainGmRouter.json +1449 -0
  105. package/build/esm/src/abis/MultichainOrderRouter.json +1820 -0
  106. package/build/esm/src/abis/MultichainSubaccountRouter.json +2069 -0
  107. package/build/esm/src/abis/MultichainTransferRouter.json +915 -0
  108. package/build/esm/src/abis/MultichainUtils.json +133 -0
  109. package/build/esm/src/abis/MultichainVault.json +275 -0
  110. package/build/esm/src/abis/ReferralStorage.json +69 -19
  111. package/build/esm/src/abis/RelayParams.json +85 -48
  112. package/build/esm/src/abis/SmartAccount.json +28 -0
  113. package/build/esm/src/abis/SubaccountGelatoRelayRouter.json +282 -148
  114. package/build/esm/src/abis/SubaccountRouter.json +62 -118
  115. package/build/esm/src/abis/SyntheticsReader.json +342 -474
  116. package/build/esm/src/abis/SyntheticsRouter.json +1 -6
  117. package/build/esm/src/abis/index.js +53 -5
  118. package/build/esm/src/configs/__tests__/markets.spec.js +4 -4
  119. package/build/esm/src/configs/__tests__/permits.spec.js +2 -2
  120. package/build/esm/src/configs/__tests__/tokens.spec.js +3 -3
  121. package/build/esm/src/configs/batch.js +61 -1
  122. package/build/esm/src/configs/chains.js +40 -7
  123. package/build/esm/src/configs/contracts.js +152 -40
  124. package/build/esm/src/configs/dataStore.js +37 -1
  125. package/build/esm/src/configs/express.js +6 -1
  126. package/build/esm/src/configs/factors.js +1 -1
  127. package/build/esm/src/configs/markets.js +164 -1
  128. package/build/esm/src/configs/oracleKeeper.js +20 -30
  129. package/build/esm/src/configs/tokens.js +271 -2
  130. package/build/esm/src/index.js +3 -3
  131. package/build/esm/src/modules/markets/index.js +9 -4
  132. package/build/esm/src/modules/markets/query-builders.js +28 -8
  133. package/build/esm/src/modules/orders/helpers.js +10 -1
  134. package/build/esm/src/modules/orders/helpers.spec.js +2 -2
  135. package/build/esm/src/modules/orders/orders.js +3 -3
  136. package/build/esm/src/modules/orders/utils.js +4 -5
  137. package/build/esm/src/modules/positions/positions.js +40 -7
  138. package/build/esm/src/modules/utils/utils.js +4 -3
  139. package/build/esm/src/prebuilt/hashedKinkModelMarketRatesKeys.json +186 -0
  140. package/build/esm/src/prebuilt/hashedMarketConfigKeys.json +2442 -512
  141. package/build/esm/src/prebuilt/hashedMarketValuesKeys.json +347 -0
  142. package/build/esm/src/test/mock.js +9 -4
  143. package/build/esm/src/types/subsquid.js +596 -0
  144. package/build/esm/src/types/swapStrategy.js +1 -0
  145. package/build/esm/src/types/trade.js +1 -0
  146. package/build/esm/src/utils/LruCache.js +4 -0
  147. package/build/esm/src/utils/__tests__/LruCache.spec.js +18 -0
  148. package/build/esm/src/utils/__tests__/numbers.spec.js +18 -16
  149. package/build/esm/src/utils/__tests__/orderTransactions/batchUtils.spec.js +0 -1
  150. package/build/esm/src/utils/__tests__/orderTransactions/decreaseOrders.spec.js +8 -0
  151. package/build/esm/src/utils/__tests__/orderTransactions/exchangeRouterMulticall.spec.js +40 -30
  152. package/build/esm/src/utils/__tests__/orderTransactions/increaseOrders.spec.js +12 -0
  153. package/build/esm/src/utils/__tests__/orderTransactions/swapOrders.spec.js +7 -1
  154. package/build/esm/src/utils/__tests__/positions.spec.js +23 -6
  155. package/build/esm/src/utils/__tests__/uiFeeReceiver.spec.js +11 -1
  156. package/build/esm/src/utils/bigmath.js +9 -2
  157. package/build/esm/src/utils/errors/parseError.js +31 -0
  158. package/build/esm/src/utils/errors/transactionsErrors.js +7 -1
  159. package/build/esm/src/utils/fees/executionFee.js +5 -3
  160. package/build/esm/src/utils/fees/index.js +8 -6
  161. package/build/esm/src/utils/fees/priceImpact.js +88 -30
  162. package/build/esm/src/utils/gelatoRelay.js +2 -0
  163. package/build/esm/src/utils/marketKeysAndConfigs.js +25 -5
  164. package/build/esm/src/utils/markets.js +7 -1
  165. package/build/esm/src/utils/numbers.js +18 -17
  166. package/build/esm/src/utils/orderTransactions.js +5 -2
  167. package/build/esm/src/utils/positions.js +75 -11
  168. package/build/esm/src/utils/prices.js +20 -14
  169. package/build/esm/src/utils/swap/__tests__/mockRouting.spec.js +1 -0
  170. package/build/esm/src/utils/swap/botanixStaking.js +83 -0
  171. package/build/esm/src/utils/swap/buildSwapStrategy.js +219 -0
  172. package/build/esm/src/utils/swap/externalSwapPath.js +37 -0
  173. package/build/esm/src/utils/swap/externalSwapQuoteByPath.js +23 -0
  174. package/build/esm/src/utils/swap/swapStats.js +6 -3
  175. package/build/esm/src/utils/swap/swapValues.js +248 -9
  176. package/build/esm/src/utils/trade/decrease.js +460 -0
  177. package/build/esm/src/utils/trade/{amounts.js → increase.js} +176 -74
  178. package/build/esm/src/utils/trade/trade.js +2 -2
  179. package/build/esm/src/utils/tradeHistory.js +3 -0
  180. package/build/esm/src/utils/twap/uiFeeReceiver.js +9 -9
  181. package/build/types/src/abis/index.d.ts +1 -1
  182. package/build/types/src/configs/batch.d.ts +2 -1
  183. package/build/types/src/configs/chains.d.ts +25 -20
  184. package/build/types/src/configs/contracts.d.ts +118 -8
  185. package/build/types/src/configs/dataStore.d.ts +20 -0
  186. package/build/types/src/configs/express.d.ts +1 -0
  187. package/build/types/src/configs/factors.d.ts +1 -1
  188. package/build/types/src/configs/markets.d.ts +2 -2
  189. package/build/types/src/configs/oracleKeeper.d.ts +2 -3
  190. package/build/types/src/configs/tokens.d.ts +1 -0
  191. package/build/types/src/index.d.ts +1 -1
  192. package/build/types/src/modules/base.d.ts +1 -1
  193. package/build/types/src/modules/markets/query-builders.d.ts +3 -2
  194. package/build/types/src/modules/markets/types.d.ts +2 -2
  195. package/build/types/src/modules/orders/utils.d.ts +6 -5
  196. package/build/types/src/types/fees.d.ts +1 -0
  197. package/build/types/src/types/markets.d.ts +10 -5
  198. package/build/types/src/types/orders.d.ts +1 -1
  199. package/build/types/src/types/positions.d.ts +26 -2
  200. package/build/types/src/types/sdk.d.ts +2 -2
  201. package/build/types/src/types/subsquid.d.ts +1562 -9
  202. package/build/types/src/types/swapStrategy.d.ts +33 -0
  203. package/build/types/src/types/tokens.d.ts +12 -0
  204. package/build/types/src/types/trade.d.ts +32 -7
  205. package/build/types/src/types/tradeHistory.d.ts +3 -0
  206. package/build/types/src/utils/LruCache.d.ts +1 -0
  207. package/build/types/src/utils/bigmath.d.ts +2 -1
  208. package/build/types/src/utils/errors/parseError.d.ts +11 -0
  209. package/build/types/src/utils/fees/executionFee.d.ts +6 -3
  210. package/build/types/src/utils/fees/index.d.ts +2 -2
  211. package/build/types/src/utils/fees/priceImpact.d.ts +33 -5
  212. package/build/types/src/utils/marketKeysAndConfigs.d.ts +9 -4
  213. package/build/types/src/utils/markets.d.ts +7 -0
  214. package/build/types/src/utils/multicall.d.ts +1 -1
  215. package/build/types/src/utils/numbers.d.ts +6 -3
  216. package/build/types/src/utils/orderTransactions.d.ts +6 -4
  217. package/build/types/src/utils/positions.d.ts +30 -0
  218. package/build/types/src/utils/prices.d.ts +4 -0
  219. package/build/types/src/utils/swap/botanixStaking.d.ts +11 -0
  220. package/build/types/src/utils/swap/buildSwapStrategy.d.ts +22 -0
  221. package/build/types/src/utils/swap/externalSwapPath.d.ts +13 -0
  222. package/build/types/src/utils/swap/externalSwapQuoteByPath.d.ts +6 -0
  223. package/build/types/src/utils/swap/swapValues.d.ts +11 -4
  224. package/build/types/src/utils/trade/decrease.d.ts +77 -0
  225. package/build/types/src/utils/trade/{amounts.d.ts → increase.d.ts} +20 -2
  226. package/build/types/src/utils/twap/uiFeeReceiver.d.ts +7 -7
  227. package/package.json +2 -2
@@ -1,5 +1,4 @@
1
1
  {
2
- "address": "0x2A29D3a792000750807cc401806d6fd539928481",
3
2
  "abi": [
4
3
  {
5
4
  "inputs": [
@@ -765,357 +764,5 @@
765
764
  "stateMutability": "nonpayable",
766
765
  "type": "function"
767
766
  }
768
- ],
769
- "transactionHash": "0xf41d2b874807c8dea4d0b21d1215669c990495bda5cdfa8ef7bb822e6edf3043",
770
- "receipt": {
771
- "to": null,
772
- "from": "0xE7BfFf2aB721264887230037940490351700a068",
773
- "contractAddress": "0x2A29D3a792000750807cc401806d6fd539928481",
774
- "transactionIndex": 1,
775
- "gasUsed": "15199775",
776
- "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
777
- "blockHash": "0xc6e67e18e1c484c3ddd3cd5db795adc007a2633bf83bfc7d1c28ee352d90f9f6",
778
- "transactionHash": "0xf41d2b874807c8dea4d0b21d1215669c990495bda5cdfa8ef7bb822e6edf3043",
779
- "logs": [],
780
- "blockNumber": 168596066,
781
- "cumulativeGasUsed": "15199775",
782
- "status": 1,
783
- "byzantium": true
784
- },
785
- "args": [
786
- "0x3c3d99FD298f679DBC2CEcd132b4eC4d0F5e6e72",
787
- "GMX DAO",
788
- "GMX_DAO",
789
- 18
790
- ],
791
- "numDeployments": 1,
792
- "solcInputHash": "ddb2cd26020caa6335eda5082c5c80ae",
793
- "libraries": {},
794
- "devdoc": {
795
- "events": {
796
- "Approval(address,address,uint256)": {
797
- "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance."
798
- },
799
- "DelegateChanged(address,address,address)": {
800
- "details": "Emitted when an account changes their delegate."
801
- },
802
- "DelegateVotesChanged(address,uint256,uint256)": {
803
- "details": "Emitted when a token transfer or delegate change results in changes to a delegate's number of votes."
804
- },
805
- "EIP712DomainChanged()": {
806
- "details": "MAY be emitted to signal that the domain could have changed."
807
- },
808
- "Transfer(address,address,uint256)": {
809
- "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero."
810
- }
811
- },
812
- "kind": "dev",
813
- "methods": {
814
- "CLOCK_MODE()": {
815
- "details": "Description of the clock"
816
- },
817
- "DOMAIN_SEPARATOR()": {
818
- "details": "See {IERC20Permit-DOMAIN_SEPARATOR}."
819
- },
820
- "allowance(address,address)": {
821
- "details": "See {IERC20-allowance}."
822
- },
823
- "approve(address,uint256)": {
824
- "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address."
825
- },
826
- "balanceOf(address)": {
827
- "details": "See {IERC20-balanceOf}."
828
- },
829
- "checkpoints(address,uint32)": {
830
- "details": "Get the `pos`-th checkpoint for `account`."
831
- },
832
- "clock()": {
833
- "details": "Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting)."
834
- },
835
- "decimals()": {
836
- "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}."
837
- },
838
- "decreaseAllowance(address,uint256)": {
839
- "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`."
840
- },
841
- "delegate(address)": {
842
- "details": "Delegate votes from the sender to `delegatee`."
843
- },
844
- "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": {
845
- "details": "Delegates votes from signer to `delegatee`"
846
- },
847
- "delegates(address)": {
848
- "details": "Get the address `account` is currently delegating to."
849
- },
850
- "eip712Domain()": {
851
- "details": "See {EIP-5267}. _Available since v4.9._"
852
- },
853
- "getPastTotalSupply(uint256)": {
854
- "details": "Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances. It is NOT the sum of all the delegated votes! Requirements: - `timepoint` must be in the past"
855
- },
856
- "getPastVotes(address,uint256)": {
857
- "details": "Retrieve the number of votes for `account` at the end of `timepoint`. Requirements: - `timepoint` must be in the past"
858
- },
859
- "getVotes(address)": {
860
- "details": "Gets the current votes balance for `account`"
861
- },
862
- "increaseAllowance(address,uint256)": {
863
- "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address."
864
- },
865
- "name()": {
866
- "details": "Returns the name of the token."
867
- },
868
- "nonces(address)": {
869
- "details": "See {IERC20Permit-nonces}."
870
- },
871
- "numCheckpoints(address)": {
872
- "details": "Get number of checkpoints for `account`."
873
- },
874
- "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": {
875
- "details": "See {IERC20Permit-permit}."
876
- },
877
- "symbol()": {
878
- "details": "Returns the symbol of the token, usually a shorter version of the name."
879
- },
880
- "totalSupply()": {
881
- "details": "See {IERC20-totalSupply}."
882
- },
883
- "transfer(address,uint256)": {
884
- "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`."
885
- },
886
- "transferFrom(address,address,uint256)": {
887
- "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. NOTE: Does not update the allowance if the current allowance is the maximum `uint256`. Requirements: - `from` and `to` cannot be the zero address. - `from` must have a balance of at least `amount`. - the caller must have allowance for ``from``'s tokens of at least `amount`."
888
- }
889
- },
890
- "version": 1
891
- },
892
- "userdoc": {
893
- "kind": "user",
894
- "methods": {},
895
- "version": 1
896
- },
897
- "storageLayout": {
898
- "storage": [
899
- {
900
- "astId": 207,
901
- "contract": "contracts/gov/GovToken.sol:GovToken",
902
- "label": "_balances",
903
- "offset": 0,
904
- "slot": "0",
905
- "type": "t_mapping(t_address,t_uint256)"
906
- },
907
- {
908
- "astId": 213,
909
- "contract": "contracts/gov/GovToken.sol:GovToken",
910
- "label": "_allowances",
911
- "offset": 0,
912
- "slot": "1",
913
- "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))"
914
- },
915
- {
916
- "astId": 215,
917
- "contract": "contracts/gov/GovToken.sol:GovToken",
918
- "label": "_totalSupply",
919
- "offset": 0,
920
- "slot": "2",
921
- "type": "t_uint256"
922
- },
923
- {
924
- "astId": 217,
925
- "contract": "contracts/gov/GovToken.sol:GovToken",
926
- "label": "_name",
927
- "offset": 0,
928
- "slot": "3",
929
- "type": "t_string_storage"
930
- },
931
- {
932
- "astId": 219,
933
- "contract": "contracts/gov/GovToken.sol:GovToken",
934
- "label": "_symbol",
935
- "offset": 0,
936
- "slot": "4",
937
- "type": "t_string_storage"
938
- },
939
- {
940
- "astId": 3579,
941
- "contract": "contracts/gov/GovToken.sol:GovToken",
942
- "label": "_nameFallback",
943
- "offset": 0,
944
- "slot": "5",
945
- "type": "t_string_storage"
946
- },
947
- {
948
- "astId": 3581,
949
- "contract": "contracts/gov/GovToken.sol:GovToken",
950
- "label": "_versionFallback",
951
- "offset": 0,
952
- "slot": "6",
953
- "type": "t_string_storage"
954
- },
955
- {
956
- "astId": 879,
957
- "contract": "contracts/gov/GovToken.sol:GovToken",
958
- "label": "_nonces",
959
- "offset": 0,
960
- "slot": "7",
961
- "type": "t_mapping(t_address,t_struct(Counter)2557_storage)"
962
- },
963
- {
964
- "astId": 887,
965
- "contract": "contracts/gov/GovToken.sol:GovToken",
966
- "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT",
967
- "offset": 0,
968
- "slot": "8",
969
- "type": "t_bytes32"
970
- },
971
- {
972
- "astId": 1054,
973
- "contract": "contracts/gov/GovToken.sol:GovToken",
974
- "label": "_delegates",
975
- "offset": 0,
976
- "slot": "9",
977
- "type": "t_mapping(t_address,t_address)"
978
- },
979
- {
980
- "astId": 1060,
981
- "contract": "contracts/gov/GovToken.sol:GovToken",
982
- "label": "_checkpoints",
983
- "offset": 0,
984
- "slot": "10",
985
- "type": "t_mapping(t_address,t_array(t_struct(Checkpoint)1045_storage)dyn_storage)"
986
- },
987
- {
988
- "astId": 1064,
989
- "contract": "contracts/gov/GovToken.sol:GovToken",
990
- "label": "_totalSupplyCheckpoints",
991
- "offset": 0,
992
- "slot": "11",
993
- "type": "t_array(t_struct(Checkpoint)1045_storage)dyn_storage"
994
- },
995
- {
996
- "astId": 27701,
997
- "contract": "contracts/gov/GovToken.sol:GovToken",
998
- "label": "_decimals",
999
- "offset": 0,
1000
- "slot": "12",
1001
- "type": "t_uint8"
1002
- }
1003
- ],
1004
- "types": {
1005
- "t_address": {
1006
- "encoding": "inplace",
1007
- "label": "address",
1008
- "numberOfBytes": "20"
1009
- },
1010
- "t_array(t_struct(Checkpoint)1045_storage)dyn_storage": {
1011
- "base": "t_struct(Checkpoint)1045_storage",
1012
- "encoding": "dynamic_array",
1013
- "label": "struct ERC20Votes.Checkpoint[]",
1014
- "numberOfBytes": "32"
1015
- },
1016
- "t_bytes32": {
1017
- "encoding": "inplace",
1018
- "label": "bytes32",
1019
- "numberOfBytes": "32"
1020
- },
1021
- "t_mapping(t_address,t_address)": {
1022
- "encoding": "mapping",
1023
- "key": "t_address",
1024
- "label": "mapping(address => address)",
1025
- "numberOfBytes": "32",
1026
- "value": "t_address"
1027
- },
1028
- "t_mapping(t_address,t_array(t_struct(Checkpoint)1045_storage)dyn_storage)": {
1029
- "encoding": "mapping",
1030
- "key": "t_address",
1031
- "label": "mapping(address => struct ERC20Votes.Checkpoint[])",
1032
- "numberOfBytes": "32",
1033
- "value": "t_array(t_struct(Checkpoint)1045_storage)dyn_storage"
1034
- },
1035
- "t_mapping(t_address,t_mapping(t_address,t_uint256))": {
1036
- "encoding": "mapping",
1037
- "key": "t_address",
1038
- "label": "mapping(address => mapping(address => uint256))",
1039
- "numberOfBytes": "32",
1040
- "value": "t_mapping(t_address,t_uint256)"
1041
- },
1042
- "t_mapping(t_address,t_struct(Counter)2557_storage)": {
1043
- "encoding": "mapping",
1044
- "key": "t_address",
1045
- "label": "mapping(address => struct Counters.Counter)",
1046
- "numberOfBytes": "32",
1047
- "value": "t_struct(Counter)2557_storage"
1048
- },
1049
- "t_mapping(t_address,t_uint256)": {
1050
- "encoding": "mapping",
1051
- "key": "t_address",
1052
- "label": "mapping(address => uint256)",
1053
- "numberOfBytes": "32",
1054
- "value": "t_uint256"
1055
- },
1056
- "t_string_storage": {
1057
- "encoding": "bytes",
1058
- "label": "string",
1059
- "numberOfBytes": "32"
1060
- },
1061
- "t_struct(Checkpoint)1045_storage": {
1062
- "encoding": "inplace",
1063
- "label": "struct ERC20Votes.Checkpoint",
1064
- "members": [
1065
- {
1066
- "astId": 1042,
1067
- "contract": "contracts/gov/GovToken.sol:GovToken",
1068
- "label": "fromBlock",
1069
- "offset": 0,
1070
- "slot": "0",
1071
- "type": "t_uint32"
1072
- },
1073
- {
1074
- "astId": 1044,
1075
- "contract": "contracts/gov/GovToken.sol:GovToken",
1076
- "label": "votes",
1077
- "offset": 4,
1078
- "slot": "0",
1079
- "type": "t_uint224"
1080
- }
1081
- ],
1082
- "numberOfBytes": "32"
1083
- },
1084
- "t_struct(Counter)2557_storage": {
1085
- "encoding": "inplace",
1086
- "label": "struct Counters.Counter",
1087
- "members": [
1088
- {
1089
- "astId": 2556,
1090
- "contract": "contracts/gov/GovToken.sol:GovToken",
1091
- "label": "_value",
1092
- "offset": 0,
1093
- "slot": "0",
1094
- "type": "t_uint256"
1095
- }
1096
- ],
1097
- "numberOfBytes": "32"
1098
- },
1099
- "t_uint224": {
1100
- "encoding": "inplace",
1101
- "label": "uint224",
1102
- "numberOfBytes": "28"
1103
- },
1104
- "t_uint256": {
1105
- "encoding": "inplace",
1106
- "label": "uint256",
1107
- "numberOfBytes": "32"
1108
- },
1109
- "t_uint32": {
1110
- "encoding": "inplace",
1111
- "label": "uint32",
1112
- "numberOfBytes": "4"
1113
- },
1114
- "t_uint8": {
1115
- "encoding": "inplace",
1116
- "label": "uint8",
1117
- "numberOfBytes": "1"
1118
- }
1119
- }
1120
- }
767
+ ]
1121
768
  }