@gmx-io/sdk 0.2.0 → 1.0.0-alpha.2
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.
- package/README.md +28 -1
- package/build/cjs/scripts/prebuild/index.js +11 -0
- package/build/cjs/scripts/prebuild/prebuildKinkModelMarketRatesKeys.js +51 -0
- package/build/cjs/scripts/prebuild/prebuildMarketConfigKeys.js +25 -0
- package/build/cjs/scripts/prebuild/prebuildMarketValuesKeys.js +25 -0
- package/build/cjs/src/abis/CustomErrors.json +3254 -0
- package/build/cjs/src/abis/DataStore.json +1440 -0
- package/build/cjs/src/abis/ERC721.json +442 -0
- package/build/cjs/src/abis/EventEmitter.json +2065 -0
- package/build/cjs/src/abis/ExchangeRouter.json +1801 -0
- package/build/cjs/src/abis/GMT.json +522 -0
- package/build/cjs/src/abis/GlpManager.json +591 -0
- package/build/cjs/src/abis/GlvReader.json +1414 -0
- package/build/cjs/src/abis/GlvRouter.json +706 -0
- package/build/cjs/src/abis/GmxMigrator.json +657 -0
- package/build/cjs/src/abis/GovToken.json +1121 -0
- package/build/cjs/src/abis/MintableBaseToken.json +696 -0
- package/build/cjs/src/abis/Multicall.json +333 -0
- package/build/cjs/src/abis/OrderBook.json +1997 -0
- package/build/cjs/src/abis/OrderBookReader.json +111 -0
- package/build/cjs/src/abis/OrderExecutor.json +122 -0
- package/build/cjs/src/abis/PositionManager.json +1165 -0
- package/build/cjs/src/abis/PositionRouter.json +2030 -0
- package/build/cjs/src/abis/Reader.json +355 -0
- package/build/cjs/src/abis/ReaderV2.json +630 -0
- package/build/cjs/src/abis/ReferralStorage.json +507 -0
- package/build/cjs/src/abis/RewardReader.json +86 -0
- package/build/cjs/src/abis/RewardRouter.json +1024 -0
- package/build/cjs/src/abis/RewardTracker.json +918 -0
- package/build/cjs/src/abis/Router-v2.json +605 -0
- package/build/cjs/src/abis/Router.json +605 -0
- package/build/cjs/src/abis/SubaccountRouter.json +658 -0
- package/build/cjs/src/abis/SyntheticsReader.json +4706 -0
- package/build/cjs/src/abis/SyntheticsRouter.json +77 -0
- package/build/cjs/src/abis/Timelock.json +1737 -0
- package/build/cjs/src/abis/Token.json +345 -0
- package/build/cjs/src/abis/Treasury.json +411 -0
- package/build/cjs/src/abis/UniPool.json +89 -0
- package/build/cjs/src/abis/UniswapV2.json +1 -0
- package/build/cjs/src/abis/Vault.json +3220 -0
- package/build/cjs/src/abis/VaultReader.json +87 -0
- package/build/cjs/src/abis/VaultV2.json +3019 -0
- package/build/cjs/src/abis/VaultV2b.json +3220 -0
- package/build/cjs/src/abis/Vester.json +1031 -0
- package/build/cjs/src/abis/WETH.json +320 -0
- package/build/cjs/src/abis/YieldFarm.json +599 -0
- package/build/cjs/src/abis/YieldToken.json +560 -0
- package/build/cjs/src/abis/index.js +94 -0
- package/build/cjs/src/configs/__tests__/markets.spec.js +32 -0
- package/build/cjs/src/configs/__tests__/tokens.spec.js +40 -0
- package/build/cjs/src/configs/batch.js +42 -0
- package/build/cjs/src/configs/chains.js +98 -0
- package/build/cjs/src/configs/contracts.js +248 -0
- package/build/cjs/src/configs/dataStore.js +348 -0
- package/build/cjs/src/configs/factors.js +14 -0
- package/build/cjs/src/configs/markets.js +840 -0
- package/build/cjs/src/configs/oracleKeeper.js +45 -0
- package/build/cjs/src/configs/tokens.js +1635 -0
- package/build/cjs/src/index.js +75 -0
- package/build/cjs/src/modules/accounts/accounts.js +39 -0
- package/build/cjs/src/modules/accounts/accounts.spec.js +10 -0
- package/build/cjs/src/modules/base.js +19 -0
- package/build/cjs/src/modules/markets/index.js +334 -0
- package/build/cjs/src/modules/markets/markets.spec.js +40 -0
- package/build/cjs/src/modules/markets/query-builders.js +385 -0
- package/build/cjs/src/modules/markets/types.js +2 -0
- package/build/cjs/src/modules/oracle.js +45 -0
- package/build/cjs/src/modules/orders/helpers.js +225 -0
- package/build/cjs/src/modules/orders/helpers.spec.js +131 -0
- package/build/cjs/src/modules/orders/orders.js +293 -0
- package/build/cjs/src/modules/orders/orders.spec.js +19 -0
- package/build/cjs/src/modules/orders/transactions/cancelOrdersTxn.js +20 -0
- package/build/cjs/src/modules/orders/transactions/createDecreaseOrderTxn.js +104 -0
- package/build/cjs/src/modules/orders/transactions/createIncreaseOrderTxn.js +174 -0
- package/build/cjs/src/modules/orders/transactions/createSwapOrderTxn.js +84 -0
- package/build/cjs/src/modules/orders/transactions/createWrapOrUnwrapTxn.js +17 -0
- package/build/cjs/src/modules/orders/transactions/updateOrderTxn.js +51 -0
- package/build/cjs/src/modules/orders/utils.js +157 -0
- package/build/cjs/src/modules/positions/positions.js +501 -0
- package/build/cjs/src/modules/positions/positions.spec.js +28 -0
- package/build/cjs/src/modules/tokens/tokens.js +135 -0
- package/build/cjs/src/modules/tokens/tokens.spec.js +29 -0
- package/build/cjs/src/modules/trades/trades.js +266 -0
- package/build/cjs/src/modules/trades/trades.spec.js +17 -0
- package/build/cjs/src/modules/utils/utils.js +211 -0
- package/build/cjs/src/package.json +1 -0
- package/build/cjs/src/prebuilt/hashedKinkModelMarketRatesKeys.json +944 -0
- package/build/cjs/src/prebuilt/hashedMarketConfigKeys.json +5858 -0
- package/build/cjs/src/prebuilt/hashedMarketValuesKeys.json +1763 -0
- package/build/cjs/src/prebuilt/index.js +15 -0
- package/build/cjs/src/test/mock.js +246 -0
- package/build/cjs/src/types/common.js +2 -0
- package/build/cjs/src/types/fees.js +2 -0
- package/build/cjs/src/types/markets.js +2 -0
- package/build/cjs/src/types/orders.js +38 -0
- package/build/cjs/src/types/positions.js +2 -0
- package/build/cjs/src/types/referrals.js +12 -0
- package/build/cjs/src/types/sdk.js +2 -0
- package/build/cjs/src/types/sidecarOrders.js +2 -0
- package/build/cjs/src/types/tokens.js +2 -0
- package/build/cjs/src/types/trade.js +25 -0
- package/build/cjs/src/types/tradeHistory.js +11 -0
- package/build/cjs/src/utils/LruCache.js +49 -0
- package/build/cjs/src/utils/__tests__/LruCache.spec.js +45 -0
- package/build/cjs/src/utils/__tests__/bigmath.spec.js +40 -0
- package/build/cjs/src/utils/__tests__/fees.spec.js +64 -0
- package/build/cjs/src/utils/__tests__/hash.spec.js +43 -0
- package/build/cjs/src/utils/__tests__/markets.spec.js +267 -0
- package/build/cjs/src/utils/__tests__/numbers.spec.js +83 -0
- package/build/cjs/src/utils/__tests__/objects.spec.js +139 -0
- package/build/cjs/src/utils/__tests__/positions.spec.js +180 -0
- package/build/cjs/src/utils/__tests__/prices.spec.js +69 -0
- package/build/cjs/src/utils/__tests__/referrals.spec.js +20 -0
- package/build/cjs/src/utils/__tests__/subgraph.spec.js +161 -0
- package/build/cjs/src/utils/__tests__/tokens.spec.js +115 -0
- package/build/cjs/src/utils/__tests__/trade.spec.js +38 -0
- package/build/cjs/src/utils/bigmath.js +34 -0
- package/build/cjs/src/utils/buildUrl.js +12 -0
- package/build/cjs/src/utils/callContract.js +143 -0
- package/build/cjs/src/utils/common.js +14 -0
- package/build/cjs/src/utils/contracts.js +93 -0
- package/build/cjs/src/utils/fees/estimateOraclePriceCount.js +28 -0
- package/build/cjs/src/utils/fees/executionFee.js +113 -0
- package/build/cjs/src/utils/fees/executionFee.spec.js +66 -0
- package/build/cjs/src/utils/fees/getNaiveEstimatedGasBySwapCount.js +8 -0
- package/build/cjs/src/utils/fees/index.js +128 -0
- package/build/cjs/src/utils/fees/priceImpact.js +300 -0
- package/build/cjs/src/utils/graphqlFetcher.js +24 -0
- package/build/cjs/src/utils/hash.js +41 -0
- package/build/cjs/src/utils/marketKeysAndConfigs.js +262 -0
- package/build/cjs/src/utils/markets.js +169 -0
- package/build/cjs/src/utils/multicall.js +125 -0
- package/build/cjs/src/utils/numbers.js +73 -0
- package/build/cjs/src/utils/objects.js +47 -0
- package/build/cjs/src/utils/orders.js +210 -0
- package/build/cjs/src/utils/positions.js +145 -0
- package/build/cjs/src/utils/prices.js +141 -0
- package/build/cjs/src/utils/referrals.js +34 -0
- package/build/cjs/src/utils/simulateExecuteOrder.js +143 -0
- package/build/cjs/src/utils/subgraph.js +86 -0
- package/build/cjs/src/utils/swap/__tests__/buildMarketsAdjacencyGraph.spec.js +118 -0
- package/build/cjs/src/utils/swap/__tests__/findReachableTokens.spec.js +118 -0
- package/build/cjs/src/utils/swap/__tests__/findSwapPathsBetweenTokens.spec.js +150 -0
- package/build/cjs/src/utils/swap/__tests__/mockRouting.spec.js +429 -0
- package/build/cjs/src/utils/swap/__tests__/swapRouting.spec.js +617 -0
- package/build/cjs/src/utils/swap/__tests__/swapStats.spec.js +388 -0
- package/build/cjs/src/utils/swap/buildMarketsAdjacencyGraph.js +25 -0
- package/build/cjs/src/utils/swap/constants.js +5 -0
- package/build/cjs/src/utils/swap/findReachableTokens.js +37 -0
- package/build/cjs/src/utils/swap/findSwapPathsBetweenTokens.js +75 -0
- package/build/cjs/src/utils/swap/index.js +18 -0
- package/build/cjs/src/utils/swap/preparedSwapData.js +28 -0
- package/build/cjs/src/utils/swap/swapPath.js +132 -0
- package/build/cjs/src/utils/swap/swapRouting.js +359 -0
- package/build/cjs/src/utils/swap/swapStats.js +258 -0
- package/build/cjs/src/utils/swap/swapValues.js +190 -0
- package/build/cjs/src/utils/testUtil.js +22 -0
- package/build/cjs/src/utils/tokens.js +144 -0
- package/build/cjs/src/utils/trade/amounts.js +317 -0
- package/build/cjs/src/utils/trade/index.js +17 -0
- package/build/cjs/src/utils/trade/trade.js +61 -0
- package/build/cjs/src/utils/tradeHistory.js +137 -0
- package/build/cjs/tsconfig.cjs.tsbuildinfo +1 -0
- package/build/esm/src/abis/CustomErrors.json +3254 -0
- package/build/esm/src/abis/DataStore.json +1440 -0
- package/build/esm/src/abis/ERC721.json +442 -0
- package/build/esm/src/abis/EventEmitter.json +2065 -0
- package/build/esm/src/abis/ExchangeRouter.json +1801 -0
- package/build/esm/src/abis/GMT.json +522 -0
- package/build/esm/src/abis/GlpManager.json +591 -0
- package/build/esm/src/abis/GlvReader.json +1414 -0
- package/build/esm/src/abis/GlvRouter.json +706 -0
- package/build/esm/src/abis/GmxMigrator.json +657 -0
- package/build/esm/src/abis/GovToken.json +1121 -0
- package/build/esm/src/abis/MintableBaseToken.json +696 -0
- package/build/esm/src/abis/Multicall.json +333 -0
- package/build/esm/src/abis/OrderBook.json +1997 -0
- package/build/esm/src/abis/OrderBookReader.json +111 -0
- package/build/esm/src/abis/OrderExecutor.json +122 -0
- package/build/esm/src/abis/PositionManager.json +1165 -0
- package/build/esm/src/abis/PositionRouter.json +2030 -0
- package/build/esm/src/abis/Reader.json +355 -0
- package/build/esm/src/abis/ReaderV2.json +630 -0
- package/build/esm/src/abis/ReferralStorage.json +507 -0
- package/build/esm/src/abis/RewardReader.json +86 -0
- package/build/esm/src/abis/RewardRouter.json +1024 -0
- package/build/esm/src/abis/RewardTracker.json +918 -0
- package/build/esm/src/abis/Router-v2.json +605 -0
- package/build/esm/src/abis/Router.json +605 -0
- package/build/esm/src/abis/SubaccountRouter.json +658 -0
- package/build/esm/src/abis/SyntheticsReader.json +4706 -0
- package/build/esm/src/abis/SyntheticsRouter.json +77 -0
- package/build/esm/src/abis/Timelock.json +1737 -0
- package/build/esm/src/abis/Token.json +345 -0
- package/build/esm/src/abis/Treasury.json +411 -0
- package/build/esm/src/abis/UniPool.json +89 -0
- package/build/esm/src/abis/UniswapV2.json +1 -0
- package/build/esm/src/abis/Vault.json +3220 -0
- package/build/esm/src/abis/VaultReader.json +87 -0
- package/build/esm/src/abis/VaultV2.json +3019 -0
- package/build/esm/src/abis/VaultV2b.json +3220 -0
- package/build/esm/src/abis/Vester.json +1031 -0
- package/build/esm/src/abis/WETH.json +320 -0
- package/build/esm/src/abis/YieldFarm.json +599 -0
- package/build/esm/src/abis/YieldToken.json +560 -0
- package/build/esm/src/abis/index.js +88 -0
- package/build/esm/src/configs/__tests__/markets.spec.js +30 -0
- package/build/esm/src/configs/__tests__/tokens.spec.js +38 -0
- package/build/{src → esm/src}/configs/chains.js +1 -1
- package/build/{src → esm/src}/configs/contracts.js +10 -4
- package/build/{src → esm/src}/configs/factors.js +3 -1
- package/build/{src → esm/src}/configs/markets.js +92 -0
- package/build/esm/src/configs/oracleKeeper.js +36 -0
- package/build/{src → esm/src}/configs/tokens.js +154 -13
- package/build/{src → esm/src}/modules/accounts/accounts.js +1 -2
- package/build/{src → esm/src}/modules/markets/index.js +1 -2
- package/build/{src → esm/src}/modules/markets/query-builders.js +8 -10
- package/build/esm/src/modules/orders/helpers.js +220 -0
- package/build/esm/src/modules/orders/helpers.spec.js +106 -0
- package/build/{src → esm/src}/modules/orders/orders.js +20 -2
- package/build/{src → esm/src}/modules/orders/transactions/cancelOrdersTxn.js +3 -3
- package/build/{src → esm/src}/modules/orders/transactions/createDecreaseOrderTxn.js +5 -5
- package/build/{src → esm/src}/modules/orders/transactions/createIncreaseOrderTxn.js +8 -7
- package/build/{src → esm/src}/modules/orders/transactions/createSwapOrderTxn.js +5 -5
- package/build/{src → esm/src}/modules/orders/transactions/createWrapOrUnwrapTxn.js +3 -3
- package/build/{src → esm/src}/modules/orders/transactions/updateOrderTxn.js +4 -4
- package/build/{src → esm/src}/modules/orders/utils.js +4 -6
- package/build/{src → esm/src}/modules/positions/positions.js +11 -14
- package/build/{src → esm/src}/modules/tokens/tokens.js +4 -10
- package/build/{src → esm/src}/modules/trades/trades.js +27 -155
- package/build/{src → esm/src}/modules/utils/utils.js +27 -3
- package/build/esm/src/package.json +1 -0
- package/build/esm/src/prebuilt/hashedKinkModelMarketRatesKeys.json +944 -0
- package/build/esm/src/prebuilt/hashedMarketConfigKeys.json +5858 -0
- package/build/esm/src/prebuilt/hashedMarketValuesKeys.json +1763 -0
- package/build/{src → esm/src}/prebuilt/index.js +3 -7
- package/build/esm/src/test/mock.js +238 -0
- package/build/{src → esm/src}/types/orders.js +2 -0
- package/build/{src → esm/src}/types/trade.js +5 -0
- package/build/{src → esm/src}/utils/__tests__/markets.spec.js +4 -4
- package/build/esm/src/utils/__tests__/objects.spec.js +137 -0
- package/build/{src → esm/src}/utils/__tests__/prices.spec.js +16 -8
- package/build/{src → esm/src}/utils/__tests__/subgraph.spec.js +0 -4
- package/build/{src → esm/src}/utils/__tests__/tokens.spec.js +33 -3
- package/build/{src → esm/src}/utils/bigmath.js +3 -0
- package/build/{src → esm/src}/utils/fees/executionFee.js +3 -1
- package/build/esm/src/utils/fees/getNaiveEstimatedGasBySwapCount.js +4 -0
- package/build/{src → esm/src}/utils/fees/priceImpact.js +1 -1
- package/build/{src → esm/src}/utils/markets.js +0 -3
- package/build/{src → esm/src}/utils/multicall.js +5 -3
- package/build/{src → esm/src}/utils/numbers.js +5 -1
- package/build/esm/src/utils/objects.js +36 -0
- package/build/{src → esm/src}/utils/orders.js +42 -13
- package/build/esm/src/utils/prices.js +132 -0
- package/build/{src → esm/src}/utils/simulateExecuteOrder.js +14 -10
- package/build/{src → esm/src}/utils/subgraph.js +16 -6
- package/build/esm/src/utils/swap/__tests__/buildMarketsAdjacencyGraph.spec.js +116 -0
- package/build/esm/src/utils/swap/__tests__/findReachableTokens.spec.js +116 -0
- package/build/esm/src/utils/swap/__tests__/findSwapPathsBetweenTokens.spec.js +148 -0
- package/build/esm/src/utils/swap/__tests__/mockRouting.spec.js +427 -0
- package/build/esm/src/utils/swap/__tests__/swapRouting.spec.js +615 -0
- package/build/esm/src/utils/swap/__tests__/swapStats.spec.js +386 -0
- package/build/esm/src/utils/swap/buildMarketsAdjacencyGraph.js +21 -0
- package/build/esm/src/utils/swap/constants.js +2 -0
- package/build/esm/src/utils/swap/findReachableTokens.js +33 -0
- package/build/esm/src/utils/swap/findSwapPathsBetweenTokens.js +71 -0
- package/build/esm/src/utils/swap/index.js +2 -0
- package/build/esm/src/utils/swap/preparedSwapData.js +23 -0
- package/build/esm/src/utils/swap/swapPath.js +127 -0
- package/build/esm/src/utils/swap/swapRouting.js +341 -0
- package/build/{src/utils → esm/src/utils/swap}/swapStats.js +49 -7
- package/build/esm/src/utils/swap/swapValues.js +184 -0
- package/build/{src → esm/src}/utils/testUtil.js +1 -2
- package/build/esm/src/utils/tokens.js +127 -0
- package/build/esm/src/utils/trade/amounts.js +310 -0
- package/build/esm/src/utils/trade/index.js +1 -0
- package/build/{src/utils → esm/src/utils/trade}/trade.js +26 -4
- package/build/esm/src/utils/tradeHistory.js +132 -0
- package/build/esm/tsconfig.esm.tsbuildinfo +1 -0
- package/build/src/abis/index.d.ts +23 -0
- package/build/src/configs/__tests__/markets.spec.d.ts +1 -0
- package/build/src/configs/__tests__/tokens.spec.d.ts +1 -0
- package/build/src/configs/chains.d.ts +7 -22
- package/build/src/configs/contracts.d.ts +1 -220
- package/build/src/configs/factors.d.ts +3 -1
- package/build/src/configs/markets.d.ts +2 -1
- package/build/src/configs/oracleKeeper.d.ts +3 -0
- package/build/src/configs/tokens.d.ts +4 -4
- package/build/src/modules/markets/query-builders.d.ts +5 -4
- package/build/src/modules/oracle.d.ts +7 -3
- package/build/src/modules/orders/helpers.d.ts +50 -0
- package/build/src/modules/orders/helpers.spec.d.ts +1 -0
- package/build/src/modules/orders/orders.d.ts +6 -1
- package/build/src/modules/orders/transactions/createDecreaseOrderTxn.d.ts +1 -1
- package/build/src/modules/orders/transactions/createSwapOrderTxn.d.ts +1 -0
- package/build/src/modules/orders/transactions/updateOrderTxn.d.ts +2 -2
- package/build/src/modules/orders/utils.d.ts +5 -200
- package/build/src/modules/positions/positions.d.ts +1 -1
- package/build/src/modules/trades/trades.d.ts +2 -3
- package/build/src/modules/utils/utils.d.ts +4 -2
- package/build/src/prebuilt/index.d.ts +6 -2
- package/build/src/test/mock.d.ts +14 -0
- package/build/src/types/fees.d.ts +6 -0
- package/build/src/types/orders.d.ts +4 -3
- package/build/src/types/sdk.d.ts +4 -3
- package/build/src/types/tokens.d.ts +5 -0
- package/build/src/types/trade.d.ts +84 -9
- package/build/src/types/tradeHistory.d.ts +3 -3
- package/build/src/utils/bigmath.d.ts +1 -0
- package/build/src/utils/fees/executionFee.d.ts +1 -1
- package/build/src/utils/fees/getNaiveEstimatedGasBySwapCount.d.ts +2 -0
- package/build/src/utils/hash.d.ts +1 -1
- package/build/src/utils/multicall.d.ts +2 -1
- package/build/src/utils/numbers.d.ts +2 -0
- package/build/src/utils/objects.d.ts +6 -0
- package/build/src/utils/orders.d.ts +1 -0
- package/build/src/utils/positions.d.ts +1 -1
- package/build/src/utils/prices.d.ts +35 -1
- package/build/src/utils/subgraph.d.ts +7 -5
- package/build/src/utils/swap/__tests__/buildMarketsAdjacencyGraph.spec.d.ts +1 -0
- package/build/src/utils/swap/__tests__/findReachableTokens.spec.d.ts +1 -0
- package/build/src/utils/swap/__tests__/findSwapPathsBetweenTokens.spec.d.ts +1 -0
- package/build/src/utils/swap/__tests__/mockRouting.spec.d.ts +1 -0
- package/build/src/utils/swap/__tests__/swapRouting.spec.d.ts +1 -0
- package/build/src/utils/swap/__tests__/swapStats.spec.d.ts +1 -0
- package/build/src/utils/swap/buildMarketsAdjacencyGraph.d.ts +11 -0
- package/build/src/utils/swap/constants.d.ts +2 -0
- package/build/src/utils/swap/findReachableTokens.d.ts +2 -0
- package/build/src/utils/swap/findSwapPathsBetweenTokens.d.ts +3 -0
- package/build/src/utils/swap/index.d.ts +2 -0
- package/build/src/utils/swap/preparedSwapData.d.ts +14 -0
- package/build/src/utils/swap/swapPath.d.ts +23 -0
- package/build/src/utils/swap/swapRouting.d.ts +67 -0
- package/build/src/utils/{swapStats.d.ts → swap/swapStats.d.ts} +7 -2
- package/build/src/utils/swap/swapValues.d.ts +26 -0
- package/build/src/utils/testUtil.d.ts +2 -14560
- package/build/src/utils/tokens.d.ts +25 -1
- package/build/src/utils/trade/amounts.d.ts +70 -0
- package/build/src/utils/trade/index.d.ts +1 -0
- package/build/src/utils/{trade.d.ts → trade/trade.d.ts} +2 -1
- package/build/src/utils/tradeHistory.d.ts +7 -0
- package/package.json +43 -12
- package/build/src/abis/CustomErrors.json +0 -3254
- package/build/src/abis/DataStore.json +0 -1440
- package/build/src/abis/ERC721.json +0 -442
- package/build/src/abis/EventEmitter.json +0 -2065
- package/build/src/abis/ExchangeRouter.json +0 -1801
- package/build/src/abis/GMT.json +0 -522
- package/build/src/abis/GlpManager.json +0 -592
- package/build/src/abis/GlvReader.json +0 -1415
- package/build/src/abis/GlvRouter.json +0 -707
- package/build/src/abis/GmxMigrator.json +0 -657
- package/build/src/abis/GovToken.json +0 -1121
- package/build/src/abis/MintableBaseToken.json +0 -696
- package/build/src/abis/Multicall.json +0 -333
- package/build/src/abis/OrderBook.json +0 -1997
- package/build/src/abis/OrderBookReader.json +0 -111
- package/build/src/abis/OrderExecutor.json +0 -122
- package/build/src/abis/PositionManager.json +0 -1165
- package/build/src/abis/PositionRouter.json +0 -2030
- package/build/src/abis/Reader.json +0 -355
- package/build/src/abis/ReaderV2.json +0 -630
- package/build/src/abis/ReferralStorage.json +0 -507
- package/build/src/abis/RewardReader.json +0 -86
- package/build/src/abis/RewardRouter.json +0 -1024
- package/build/src/abis/RewardTracker.json +0 -918
- package/build/src/abis/Router-v2.json +0 -605
- package/build/src/abis/Router.json +0 -605
- package/build/src/abis/SubaccountRouter.json +0 -658
- package/build/src/abis/SyntheticsReader.json +0 -4709
- package/build/src/abis/SyntheticsRouter.json +0 -77
- package/build/src/abis/Timelock.json +0 -1737
- package/build/src/abis/Token.json +0 -345
- package/build/src/abis/Treasury.json +0 -411
- package/build/src/abis/UniPool.json +0 -89
- package/build/src/abis/UniswapV2.json +0 -1
- package/build/src/abis/Vault.json +0 -3220
- package/build/src/abis/VaultReader.json +0 -87
- package/build/src/abis/VaultV2.json +0 -3019
- package/build/src/abis/VaultV2b.json +0 -3220
- package/build/src/abis/Vester.json +0 -1031
- package/build/src/abis/WETH.json +0 -320
- package/build/src/abis/YieldFarm.json +0 -599
- package/build/src/abis/YieldToken.json +0 -560
- package/build/src/prebuilt/hashedKinkModelMarketRatesKeys.json +0 -840
- package/build/src/prebuilt/hashedMarketConfigKeys.json +0 -5208
- package/build/src/prebuilt/hashedMarketValuesKeys.json +0 -1568
- package/build/src/prebuilt/index.ts +0 -45
- package/build/src/utils/__tests__/objects.spec.js +0 -59
- package/build/src/utils/objects.js +0 -13
- package/build/src/utils/prices.js +0 -25
- package/build/src/utils/tokens.js +0 -68
- package/build/tsconfig.tsbuildinfo +0 -1
- package/build/{scripts → esm/scripts}/prebuild/index.js +2 -2
- package/build/{scripts → esm/scripts}/prebuild/prebuildKinkModelMarketRatesKeys.js +1 -1
- package/build/{scripts → esm/scripts}/prebuild/prebuildMarketConfigKeys.js +1 -1
- package/build/{scripts → esm/scripts}/prebuild/prebuildMarketValuesKeys.js +0 -0
- package/build/{src → esm/src}/configs/batch.js +0 -0
- package/build/{src → esm/src}/configs/dataStore.js +0 -0
- package/build/{src → esm/src}/index.js +2 -2
- package/build/{src → esm/src}/modules/accounts/accounts.spec.js +0 -0
- package/build/{src → esm/src}/modules/base.js +0 -0
- package/build/{src → esm/src}/modules/markets/markets.spec.js +2 -2
- package/build/{src → esm/src}/modules/markets/types.js +0 -0
- package/build/{src → esm/src}/modules/oracle.js +0 -0
- package/build/{src → esm/src}/modules/orders/orders.spec.js +0 -0
- package/build/{src → esm/src}/modules/positions/positions.spec.js +1 -1
- package/build/{src → esm/src}/modules/tokens/tokens.spec.js +1 -1
- package/build/{src → esm/src}/modules/trades/trades.spec.js +0 -0
- package/build/{src → esm/src}/types/common.js +0 -0
- package/build/{src → esm/src}/types/fees.js +0 -0
- package/build/{src → esm/src}/types/markets.js +0 -0
- package/build/{src → esm/src}/types/positions.js +0 -0
- package/build/{src → esm/src}/types/referrals.js +0 -0
- package/build/{src → esm/src}/types/sdk.js +0 -0
- package/build/{src → esm/src}/types/sidecarOrders.js +0 -0
- package/build/{src → esm/src}/types/tokens.js +0 -0
- package/build/{src → esm/src}/types/tradeHistory.js +0 -0
- package/build/{src → esm/src}/utils/LruCache.js +0 -0
- package/build/{src → esm/src}/utils/__tests__/LruCache.spec.js +0 -0
- package/build/{src → esm/src}/utils/__tests__/bigmath.spec.js +1 -1
- package/build/{src → esm/src}/utils/__tests__/fees.spec.js +1 -1
- package/build/{src → esm/src}/utils/__tests__/hash.spec.js +1 -1
- package/build/{src → esm/src}/utils/__tests__/numbers.spec.js +0 -0
- package/build/{src → esm/src}/utils/__tests__/positions.spec.js +0 -0
- package/build/{src → esm/src}/utils/__tests__/referrals.spec.js +1 -1
- package/build/{src → esm/src}/utils/__tests__/trade.spec.js +0 -0
- package/build/{src → esm/src}/utils/buildUrl.js +0 -0
- package/build/{src → esm/src}/utils/callContract.js +0 -0
- package/build/{src → esm/src}/utils/common.js +0 -0
- package/build/{src → esm/src}/utils/contracts.js +0 -0
- package/build/{src → esm/src}/utils/fees/estimateOraclePriceCount.js +0 -0
- package/build/{src → esm/src}/utils/fees/executionFee.spec.js +2 -2
- package/build/{src → esm/src}/utils/fees/index.js +0 -0
- package/build/{src → esm/src}/utils/graphqlFetcher.js +0 -0
- package/build/{src → esm/src}/utils/hash.js +0 -0
- package/build/{src → esm/src}/utils/marketKeysAndConfigs.js +1 -1
- package/build/{src → esm/src}/utils/positions.js +3 -3
- /package/build/{src → esm/src}/utils/referrals.js +0 -0
|
@@ -1,1801 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"address": "0x69C527fC77291722b52649E45c838e41be8Bf5d5",
|
|
3
|
-
"abi": [
|
|
4
|
-
{
|
|
5
|
-
"inputs": [
|
|
6
|
-
{
|
|
7
|
-
"internalType": "contract Router",
|
|
8
|
-
"name": "_router",
|
|
9
|
-
"type": "address"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"internalType": "contract RoleStore",
|
|
13
|
-
"name": "_roleStore",
|
|
14
|
-
"type": "address"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"internalType": "contract DataStore",
|
|
18
|
-
"name": "_dataStore",
|
|
19
|
-
"type": "address"
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
"internalType": "contract EventEmitter",
|
|
23
|
-
"name": "_eventEmitter",
|
|
24
|
-
"type": "address"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"internalType": "contract IDepositHandler",
|
|
28
|
-
"name": "_depositHandler",
|
|
29
|
-
"type": "address"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"internalType": "contract IWithdrawalHandler",
|
|
33
|
-
"name": "_withdrawalHandler",
|
|
34
|
-
"type": "address"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"internalType": "contract IShiftHandler",
|
|
38
|
-
"name": "_shiftHandler",
|
|
39
|
-
"type": "address"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"internalType": "contract IOrderHandler",
|
|
43
|
-
"name": "_orderHandler",
|
|
44
|
-
"type": "address"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"internalType": "contract IExternalHandler",
|
|
48
|
-
"name": "_externalHandler",
|
|
49
|
-
"type": "address"
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
"stateMutability": "nonpayable",
|
|
53
|
-
"type": "constructor"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"inputs": [
|
|
57
|
-
{
|
|
58
|
-
"internalType": "uint256",
|
|
59
|
-
"name": "adjustedClaimableAmount",
|
|
60
|
-
"type": "uint256"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"internalType": "uint256",
|
|
64
|
-
"name": "claimedAmount",
|
|
65
|
-
"type": "uint256"
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
"name": "CollateralAlreadyClaimed",
|
|
69
|
-
"type": "error"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"inputs": [
|
|
73
|
-
{
|
|
74
|
-
"internalType": "bytes32",
|
|
75
|
-
"name": "key",
|
|
76
|
-
"type": "bytes32"
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
"name": "DisabledFeature",
|
|
80
|
-
"type": "error"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"inputs": [
|
|
84
|
-
{
|
|
85
|
-
"internalType": "address",
|
|
86
|
-
"name": "market",
|
|
87
|
-
"type": "address"
|
|
88
|
-
}
|
|
89
|
-
],
|
|
90
|
-
"name": "DisabledMarket",
|
|
91
|
-
"type": "error"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"inputs": [
|
|
95
|
-
{
|
|
96
|
-
"internalType": "address",
|
|
97
|
-
"name": "market",
|
|
98
|
-
"type": "address"
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
"internalType": "address",
|
|
102
|
-
"name": "token",
|
|
103
|
-
"type": "address"
|
|
104
|
-
}
|
|
105
|
-
],
|
|
106
|
-
"name": "EmptyAddressInMarketTokenBalanceValidation",
|
|
107
|
-
"type": "error"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
"inputs": [],
|
|
111
|
-
"name": "EmptyDeposit",
|
|
112
|
-
"type": "error"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"inputs": [],
|
|
116
|
-
"name": "EmptyHoldingAddress",
|
|
117
|
-
"type": "error"
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
"inputs": [],
|
|
121
|
-
"name": "EmptyMarket",
|
|
122
|
-
"type": "error"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
"inputs": [],
|
|
126
|
-
"name": "EmptyOrder",
|
|
127
|
-
"type": "error"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"inputs": [],
|
|
131
|
-
"name": "EmptyReceiver",
|
|
132
|
-
"type": "error"
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"inputs": [
|
|
136
|
-
{
|
|
137
|
-
"internalType": "address",
|
|
138
|
-
"name": "token",
|
|
139
|
-
"type": "address"
|
|
140
|
-
}
|
|
141
|
-
],
|
|
142
|
-
"name": "EmptyTokenTranferGasLimit",
|
|
143
|
-
"type": "error"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
"inputs": [
|
|
147
|
-
{
|
|
148
|
-
"internalType": "uint256",
|
|
149
|
-
"name": "marketsLength",
|
|
150
|
-
"type": "uint256"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"internalType": "uint256",
|
|
154
|
-
"name": "tokensLength",
|
|
155
|
-
"type": "uint256"
|
|
156
|
-
}
|
|
157
|
-
],
|
|
158
|
-
"name": "InvalidClaimAffiliateRewardsInput",
|
|
159
|
-
"type": "error"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
"inputs": [
|
|
163
|
-
{
|
|
164
|
-
"internalType": "uint256",
|
|
165
|
-
"name": "marketsLength",
|
|
166
|
-
"type": "uint256"
|
|
167
|
-
},
|
|
168
|
-
{
|
|
169
|
-
"internalType": "uint256",
|
|
170
|
-
"name": "tokensLength",
|
|
171
|
-
"type": "uint256"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"internalType": "uint256",
|
|
175
|
-
"name": "timeKeysLength",
|
|
176
|
-
"type": "uint256"
|
|
177
|
-
}
|
|
178
|
-
],
|
|
179
|
-
"name": "InvalidClaimCollateralInput",
|
|
180
|
-
"type": "error"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"inputs": [
|
|
184
|
-
{
|
|
185
|
-
"internalType": "uint256",
|
|
186
|
-
"name": "marketsLength",
|
|
187
|
-
"type": "uint256"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"internalType": "uint256",
|
|
191
|
-
"name": "tokensLength",
|
|
192
|
-
"type": "uint256"
|
|
193
|
-
}
|
|
194
|
-
],
|
|
195
|
-
"name": "InvalidClaimFundingFeesInput",
|
|
196
|
-
"type": "error"
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"inputs": [
|
|
200
|
-
{
|
|
201
|
-
"internalType": "uint256",
|
|
202
|
-
"name": "marketsLength",
|
|
203
|
-
"type": "uint256"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
"internalType": "uint256",
|
|
207
|
-
"name": "tokensLength",
|
|
208
|
-
"type": "uint256"
|
|
209
|
-
}
|
|
210
|
-
],
|
|
211
|
-
"name": "InvalidClaimUiFeesInput",
|
|
212
|
-
"type": "error"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
"inputs": [
|
|
216
|
-
{
|
|
217
|
-
"internalType": "uint256",
|
|
218
|
-
"name": "value",
|
|
219
|
-
"type": "uint256"
|
|
220
|
-
}
|
|
221
|
-
],
|
|
222
|
-
"name": "InvalidClaimableFactor",
|
|
223
|
-
"type": "error"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"inputs": [
|
|
227
|
-
{
|
|
228
|
-
"internalType": "address",
|
|
229
|
-
"name": "market",
|
|
230
|
-
"type": "address"
|
|
231
|
-
},
|
|
232
|
-
{
|
|
233
|
-
"internalType": "address",
|
|
234
|
-
"name": "token",
|
|
235
|
-
"type": "address"
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
"internalType": "uint256",
|
|
239
|
-
"name": "balance",
|
|
240
|
-
"type": "uint256"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"internalType": "uint256",
|
|
244
|
-
"name": "expectedMinBalance",
|
|
245
|
-
"type": "uint256"
|
|
246
|
-
}
|
|
247
|
-
],
|
|
248
|
-
"name": "InvalidMarketTokenBalance",
|
|
249
|
-
"type": "error"
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
"inputs": [
|
|
253
|
-
{
|
|
254
|
-
"internalType": "address",
|
|
255
|
-
"name": "market",
|
|
256
|
-
"type": "address"
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
"internalType": "address",
|
|
260
|
-
"name": "token",
|
|
261
|
-
"type": "address"
|
|
262
|
-
},
|
|
263
|
-
{
|
|
264
|
-
"internalType": "uint256",
|
|
265
|
-
"name": "balance",
|
|
266
|
-
"type": "uint256"
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
"internalType": "uint256",
|
|
270
|
-
"name": "claimableFundingFeeAmount",
|
|
271
|
-
"type": "uint256"
|
|
272
|
-
}
|
|
273
|
-
],
|
|
274
|
-
"name": "InvalidMarketTokenBalanceForClaimableFunding",
|
|
275
|
-
"type": "error"
|
|
276
|
-
},
|
|
277
|
-
{
|
|
278
|
-
"inputs": [
|
|
279
|
-
{
|
|
280
|
-
"internalType": "address",
|
|
281
|
-
"name": "market",
|
|
282
|
-
"type": "address"
|
|
283
|
-
},
|
|
284
|
-
{
|
|
285
|
-
"internalType": "address",
|
|
286
|
-
"name": "token",
|
|
287
|
-
"type": "address"
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"internalType": "uint256",
|
|
291
|
-
"name": "balance",
|
|
292
|
-
"type": "uint256"
|
|
293
|
-
},
|
|
294
|
-
{
|
|
295
|
-
"internalType": "uint256",
|
|
296
|
-
"name": "collateralAmount",
|
|
297
|
-
"type": "uint256"
|
|
298
|
-
}
|
|
299
|
-
],
|
|
300
|
-
"name": "InvalidMarketTokenBalanceForCollateralAmount",
|
|
301
|
-
"type": "error"
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
"inputs": [
|
|
305
|
-
{
|
|
306
|
-
"internalType": "uint256",
|
|
307
|
-
"name": "uiFeeFactor",
|
|
308
|
-
"type": "uint256"
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
"internalType": "uint256",
|
|
312
|
-
"name": "maxUiFeeFactor",
|
|
313
|
-
"type": "uint256"
|
|
314
|
-
}
|
|
315
|
-
],
|
|
316
|
-
"name": "InvalidUiFeeFactor",
|
|
317
|
-
"type": "error"
|
|
318
|
-
},
|
|
319
|
-
{
|
|
320
|
-
"inputs": [
|
|
321
|
-
{
|
|
322
|
-
"internalType": "address",
|
|
323
|
-
"name": "token",
|
|
324
|
-
"type": "address"
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
"internalType": "address",
|
|
328
|
-
"name": "receiver",
|
|
329
|
-
"type": "address"
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
"internalType": "uint256",
|
|
333
|
-
"name": "amount",
|
|
334
|
-
"type": "uint256"
|
|
335
|
-
}
|
|
336
|
-
],
|
|
337
|
-
"name": "TokenTransferError",
|
|
338
|
-
"type": "error"
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
"inputs": [
|
|
342
|
-
{
|
|
343
|
-
"internalType": "address",
|
|
344
|
-
"name": "msgSender",
|
|
345
|
-
"type": "address"
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
"internalType": "string",
|
|
349
|
-
"name": "role",
|
|
350
|
-
"type": "string"
|
|
351
|
-
}
|
|
352
|
-
],
|
|
353
|
-
"name": "Unauthorized",
|
|
354
|
-
"type": "error"
|
|
355
|
-
},
|
|
356
|
-
{
|
|
357
|
-
"inputs": [
|
|
358
|
-
{
|
|
359
|
-
"internalType": "bytes32",
|
|
360
|
-
"name": "key",
|
|
361
|
-
"type": "bytes32"
|
|
362
|
-
}
|
|
363
|
-
],
|
|
364
|
-
"name": "cancelDeposit",
|
|
365
|
-
"outputs": [],
|
|
366
|
-
"stateMutability": "payable",
|
|
367
|
-
"type": "function"
|
|
368
|
-
},
|
|
369
|
-
{
|
|
370
|
-
"inputs": [
|
|
371
|
-
{
|
|
372
|
-
"internalType": "bytes32",
|
|
373
|
-
"name": "key",
|
|
374
|
-
"type": "bytes32"
|
|
375
|
-
}
|
|
376
|
-
],
|
|
377
|
-
"name": "cancelOrder",
|
|
378
|
-
"outputs": [],
|
|
379
|
-
"stateMutability": "payable",
|
|
380
|
-
"type": "function"
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
"inputs": [
|
|
384
|
-
{
|
|
385
|
-
"internalType": "bytes32",
|
|
386
|
-
"name": "key",
|
|
387
|
-
"type": "bytes32"
|
|
388
|
-
}
|
|
389
|
-
],
|
|
390
|
-
"name": "cancelShift",
|
|
391
|
-
"outputs": [],
|
|
392
|
-
"stateMutability": "payable",
|
|
393
|
-
"type": "function"
|
|
394
|
-
},
|
|
395
|
-
{
|
|
396
|
-
"inputs": [
|
|
397
|
-
{
|
|
398
|
-
"internalType": "bytes32",
|
|
399
|
-
"name": "key",
|
|
400
|
-
"type": "bytes32"
|
|
401
|
-
}
|
|
402
|
-
],
|
|
403
|
-
"name": "cancelWithdrawal",
|
|
404
|
-
"outputs": [],
|
|
405
|
-
"stateMutability": "payable",
|
|
406
|
-
"type": "function"
|
|
407
|
-
},
|
|
408
|
-
{
|
|
409
|
-
"inputs": [
|
|
410
|
-
{
|
|
411
|
-
"internalType": "address[]",
|
|
412
|
-
"name": "markets",
|
|
413
|
-
"type": "address[]"
|
|
414
|
-
},
|
|
415
|
-
{
|
|
416
|
-
"internalType": "address[]",
|
|
417
|
-
"name": "tokens",
|
|
418
|
-
"type": "address[]"
|
|
419
|
-
},
|
|
420
|
-
{
|
|
421
|
-
"internalType": "address",
|
|
422
|
-
"name": "receiver",
|
|
423
|
-
"type": "address"
|
|
424
|
-
}
|
|
425
|
-
],
|
|
426
|
-
"name": "claimAffiliateRewards",
|
|
427
|
-
"outputs": [
|
|
428
|
-
{
|
|
429
|
-
"internalType": "uint256[]",
|
|
430
|
-
"name": "",
|
|
431
|
-
"type": "uint256[]"
|
|
432
|
-
}
|
|
433
|
-
],
|
|
434
|
-
"stateMutability": "payable",
|
|
435
|
-
"type": "function"
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
"inputs": [
|
|
439
|
-
{
|
|
440
|
-
"internalType": "address[]",
|
|
441
|
-
"name": "markets",
|
|
442
|
-
"type": "address[]"
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
"internalType": "address[]",
|
|
446
|
-
"name": "tokens",
|
|
447
|
-
"type": "address[]"
|
|
448
|
-
},
|
|
449
|
-
{
|
|
450
|
-
"internalType": "uint256[]",
|
|
451
|
-
"name": "timeKeys",
|
|
452
|
-
"type": "uint256[]"
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
"internalType": "address",
|
|
456
|
-
"name": "receiver",
|
|
457
|
-
"type": "address"
|
|
458
|
-
}
|
|
459
|
-
],
|
|
460
|
-
"name": "claimCollateral",
|
|
461
|
-
"outputs": [
|
|
462
|
-
{
|
|
463
|
-
"internalType": "uint256[]",
|
|
464
|
-
"name": "",
|
|
465
|
-
"type": "uint256[]"
|
|
466
|
-
}
|
|
467
|
-
],
|
|
468
|
-
"stateMutability": "payable",
|
|
469
|
-
"type": "function"
|
|
470
|
-
},
|
|
471
|
-
{
|
|
472
|
-
"inputs": [
|
|
473
|
-
{
|
|
474
|
-
"internalType": "address[]",
|
|
475
|
-
"name": "markets",
|
|
476
|
-
"type": "address[]"
|
|
477
|
-
},
|
|
478
|
-
{
|
|
479
|
-
"internalType": "address[]",
|
|
480
|
-
"name": "tokens",
|
|
481
|
-
"type": "address[]"
|
|
482
|
-
},
|
|
483
|
-
{
|
|
484
|
-
"internalType": "address",
|
|
485
|
-
"name": "receiver",
|
|
486
|
-
"type": "address"
|
|
487
|
-
}
|
|
488
|
-
],
|
|
489
|
-
"name": "claimFundingFees",
|
|
490
|
-
"outputs": [
|
|
491
|
-
{
|
|
492
|
-
"internalType": "uint256[]",
|
|
493
|
-
"name": "",
|
|
494
|
-
"type": "uint256[]"
|
|
495
|
-
}
|
|
496
|
-
],
|
|
497
|
-
"stateMutability": "payable",
|
|
498
|
-
"type": "function"
|
|
499
|
-
},
|
|
500
|
-
{
|
|
501
|
-
"inputs": [
|
|
502
|
-
{
|
|
503
|
-
"internalType": "address[]",
|
|
504
|
-
"name": "markets",
|
|
505
|
-
"type": "address[]"
|
|
506
|
-
},
|
|
507
|
-
{
|
|
508
|
-
"internalType": "address[]",
|
|
509
|
-
"name": "tokens",
|
|
510
|
-
"type": "address[]"
|
|
511
|
-
},
|
|
512
|
-
{
|
|
513
|
-
"internalType": "address",
|
|
514
|
-
"name": "receiver",
|
|
515
|
-
"type": "address"
|
|
516
|
-
}
|
|
517
|
-
],
|
|
518
|
-
"name": "claimUiFees",
|
|
519
|
-
"outputs": [
|
|
520
|
-
{
|
|
521
|
-
"internalType": "uint256[]",
|
|
522
|
-
"name": "",
|
|
523
|
-
"type": "uint256[]"
|
|
524
|
-
}
|
|
525
|
-
],
|
|
526
|
-
"stateMutability": "payable",
|
|
527
|
-
"type": "function"
|
|
528
|
-
},
|
|
529
|
-
{
|
|
530
|
-
"inputs": [
|
|
531
|
-
{
|
|
532
|
-
"components": [
|
|
533
|
-
{
|
|
534
|
-
"internalType": "address",
|
|
535
|
-
"name": "receiver",
|
|
536
|
-
"type": "address"
|
|
537
|
-
},
|
|
538
|
-
{
|
|
539
|
-
"internalType": "address",
|
|
540
|
-
"name": "callbackContract",
|
|
541
|
-
"type": "address"
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
"internalType": "address",
|
|
545
|
-
"name": "uiFeeReceiver",
|
|
546
|
-
"type": "address"
|
|
547
|
-
},
|
|
548
|
-
{
|
|
549
|
-
"internalType": "address",
|
|
550
|
-
"name": "market",
|
|
551
|
-
"type": "address"
|
|
552
|
-
},
|
|
553
|
-
{
|
|
554
|
-
"internalType": "address",
|
|
555
|
-
"name": "initialLongToken",
|
|
556
|
-
"type": "address"
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
"internalType": "address",
|
|
560
|
-
"name": "initialShortToken",
|
|
561
|
-
"type": "address"
|
|
562
|
-
},
|
|
563
|
-
{
|
|
564
|
-
"internalType": "address[]",
|
|
565
|
-
"name": "longTokenSwapPath",
|
|
566
|
-
"type": "address[]"
|
|
567
|
-
},
|
|
568
|
-
{
|
|
569
|
-
"internalType": "address[]",
|
|
570
|
-
"name": "shortTokenSwapPath",
|
|
571
|
-
"type": "address[]"
|
|
572
|
-
},
|
|
573
|
-
{
|
|
574
|
-
"internalType": "uint256",
|
|
575
|
-
"name": "minMarketTokens",
|
|
576
|
-
"type": "uint256"
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
"internalType": "bool",
|
|
580
|
-
"name": "shouldUnwrapNativeToken",
|
|
581
|
-
"type": "bool"
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
"internalType": "uint256",
|
|
585
|
-
"name": "executionFee",
|
|
586
|
-
"type": "uint256"
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
"internalType": "uint256",
|
|
590
|
-
"name": "callbackGasLimit",
|
|
591
|
-
"type": "uint256"
|
|
592
|
-
}
|
|
593
|
-
],
|
|
594
|
-
"internalType": "struct DepositUtils.CreateDepositParams",
|
|
595
|
-
"name": "params",
|
|
596
|
-
"type": "tuple"
|
|
597
|
-
}
|
|
598
|
-
],
|
|
599
|
-
"name": "createDeposit",
|
|
600
|
-
"outputs": [
|
|
601
|
-
{
|
|
602
|
-
"internalType": "bytes32",
|
|
603
|
-
"name": "",
|
|
604
|
-
"type": "bytes32"
|
|
605
|
-
}
|
|
606
|
-
],
|
|
607
|
-
"stateMutability": "payable",
|
|
608
|
-
"type": "function"
|
|
609
|
-
},
|
|
610
|
-
{
|
|
611
|
-
"inputs": [
|
|
612
|
-
{
|
|
613
|
-
"components": [
|
|
614
|
-
{
|
|
615
|
-
"components": [
|
|
616
|
-
{
|
|
617
|
-
"internalType": "address",
|
|
618
|
-
"name": "receiver",
|
|
619
|
-
"type": "address"
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
"internalType": "address",
|
|
623
|
-
"name": "cancellationReceiver",
|
|
624
|
-
"type": "address"
|
|
625
|
-
},
|
|
626
|
-
{
|
|
627
|
-
"internalType": "address",
|
|
628
|
-
"name": "callbackContract",
|
|
629
|
-
"type": "address"
|
|
630
|
-
},
|
|
631
|
-
{
|
|
632
|
-
"internalType": "address",
|
|
633
|
-
"name": "uiFeeReceiver",
|
|
634
|
-
"type": "address"
|
|
635
|
-
},
|
|
636
|
-
{
|
|
637
|
-
"internalType": "address",
|
|
638
|
-
"name": "market",
|
|
639
|
-
"type": "address"
|
|
640
|
-
},
|
|
641
|
-
{
|
|
642
|
-
"internalType": "address",
|
|
643
|
-
"name": "initialCollateralToken",
|
|
644
|
-
"type": "address"
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
"internalType": "address[]",
|
|
648
|
-
"name": "swapPath",
|
|
649
|
-
"type": "address[]"
|
|
650
|
-
}
|
|
651
|
-
],
|
|
652
|
-
"internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses",
|
|
653
|
-
"name": "addresses",
|
|
654
|
-
"type": "tuple"
|
|
655
|
-
},
|
|
656
|
-
{
|
|
657
|
-
"components": [
|
|
658
|
-
{
|
|
659
|
-
"internalType": "uint256",
|
|
660
|
-
"name": "sizeDeltaUsd",
|
|
661
|
-
"type": "uint256"
|
|
662
|
-
},
|
|
663
|
-
{
|
|
664
|
-
"internalType": "uint256",
|
|
665
|
-
"name": "initialCollateralDeltaAmount",
|
|
666
|
-
"type": "uint256"
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
"internalType": "uint256",
|
|
670
|
-
"name": "triggerPrice",
|
|
671
|
-
"type": "uint256"
|
|
672
|
-
},
|
|
673
|
-
{
|
|
674
|
-
"internalType": "uint256",
|
|
675
|
-
"name": "acceptablePrice",
|
|
676
|
-
"type": "uint256"
|
|
677
|
-
},
|
|
678
|
-
{
|
|
679
|
-
"internalType": "uint256",
|
|
680
|
-
"name": "executionFee",
|
|
681
|
-
"type": "uint256"
|
|
682
|
-
},
|
|
683
|
-
{
|
|
684
|
-
"internalType": "uint256",
|
|
685
|
-
"name": "callbackGasLimit",
|
|
686
|
-
"type": "uint256"
|
|
687
|
-
},
|
|
688
|
-
{
|
|
689
|
-
"internalType": "uint256",
|
|
690
|
-
"name": "minOutputAmount",
|
|
691
|
-
"type": "uint256"
|
|
692
|
-
},
|
|
693
|
-
{
|
|
694
|
-
"internalType": "uint256",
|
|
695
|
-
"name": "validFromTime",
|
|
696
|
-
"type": "uint256"
|
|
697
|
-
}
|
|
698
|
-
],
|
|
699
|
-
"internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers",
|
|
700
|
-
"name": "numbers",
|
|
701
|
-
"type": "tuple"
|
|
702
|
-
},
|
|
703
|
-
{
|
|
704
|
-
"internalType": "enum Order.OrderType",
|
|
705
|
-
"name": "orderType",
|
|
706
|
-
"type": "uint8"
|
|
707
|
-
},
|
|
708
|
-
{
|
|
709
|
-
"internalType": "enum Order.DecreasePositionSwapType",
|
|
710
|
-
"name": "decreasePositionSwapType",
|
|
711
|
-
"type": "uint8"
|
|
712
|
-
},
|
|
713
|
-
{
|
|
714
|
-
"internalType": "bool",
|
|
715
|
-
"name": "isLong",
|
|
716
|
-
"type": "bool"
|
|
717
|
-
},
|
|
718
|
-
{
|
|
719
|
-
"internalType": "bool",
|
|
720
|
-
"name": "shouldUnwrapNativeToken",
|
|
721
|
-
"type": "bool"
|
|
722
|
-
},
|
|
723
|
-
{
|
|
724
|
-
"internalType": "bool",
|
|
725
|
-
"name": "autoCancel",
|
|
726
|
-
"type": "bool"
|
|
727
|
-
},
|
|
728
|
-
{
|
|
729
|
-
"internalType": "bytes32",
|
|
730
|
-
"name": "referralCode",
|
|
731
|
-
"type": "bytes32"
|
|
732
|
-
}
|
|
733
|
-
],
|
|
734
|
-
"internalType": "struct IBaseOrderUtils.CreateOrderParams",
|
|
735
|
-
"name": "params",
|
|
736
|
-
"type": "tuple"
|
|
737
|
-
}
|
|
738
|
-
],
|
|
739
|
-
"name": "createOrder",
|
|
740
|
-
"outputs": [
|
|
741
|
-
{
|
|
742
|
-
"internalType": "bytes32",
|
|
743
|
-
"name": "",
|
|
744
|
-
"type": "bytes32"
|
|
745
|
-
}
|
|
746
|
-
],
|
|
747
|
-
"stateMutability": "payable",
|
|
748
|
-
"type": "function"
|
|
749
|
-
},
|
|
750
|
-
{
|
|
751
|
-
"inputs": [
|
|
752
|
-
{
|
|
753
|
-
"components": [
|
|
754
|
-
{
|
|
755
|
-
"internalType": "address",
|
|
756
|
-
"name": "receiver",
|
|
757
|
-
"type": "address"
|
|
758
|
-
},
|
|
759
|
-
{
|
|
760
|
-
"internalType": "address",
|
|
761
|
-
"name": "callbackContract",
|
|
762
|
-
"type": "address"
|
|
763
|
-
},
|
|
764
|
-
{
|
|
765
|
-
"internalType": "address",
|
|
766
|
-
"name": "uiFeeReceiver",
|
|
767
|
-
"type": "address"
|
|
768
|
-
},
|
|
769
|
-
{
|
|
770
|
-
"internalType": "address",
|
|
771
|
-
"name": "fromMarket",
|
|
772
|
-
"type": "address"
|
|
773
|
-
},
|
|
774
|
-
{
|
|
775
|
-
"internalType": "address",
|
|
776
|
-
"name": "toMarket",
|
|
777
|
-
"type": "address"
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
"internalType": "uint256",
|
|
781
|
-
"name": "minMarketTokens",
|
|
782
|
-
"type": "uint256"
|
|
783
|
-
},
|
|
784
|
-
{
|
|
785
|
-
"internalType": "uint256",
|
|
786
|
-
"name": "executionFee",
|
|
787
|
-
"type": "uint256"
|
|
788
|
-
},
|
|
789
|
-
{
|
|
790
|
-
"internalType": "uint256",
|
|
791
|
-
"name": "callbackGasLimit",
|
|
792
|
-
"type": "uint256"
|
|
793
|
-
}
|
|
794
|
-
],
|
|
795
|
-
"internalType": "struct ShiftUtils.CreateShiftParams",
|
|
796
|
-
"name": "params",
|
|
797
|
-
"type": "tuple"
|
|
798
|
-
}
|
|
799
|
-
],
|
|
800
|
-
"name": "createShift",
|
|
801
|
-
"outputs": [
|
|
802
|
-
{
|
|
803
|
-
"internalType": "bytes32",
|
|
804
|
-
"name": "",
|
|
805
|
-
"type": "bytes32"
|
|
806
|
-
}
|
|
807
|
-
],
|
|
808
|
-
"stateMutability": "payable",
|
|
809
|
-
"type": "function"
|
|
810
|
-
},
|
|
811
|
-
{
|
|
812
|
-
"inputs": [
|
|
813
|
-
{
|
|
814
|
-
"components": [
|
|
815
|
-
{
|
|
816
|
-
"internalType": "address",
|
|
817
|
-
"name": "receiver",
|
|
818
|
-
"type": "address"
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
"internalType": "address",
|
|
822
|
-
"name": "callbackContract",
|
|
823
|
-
"type": "address"
|
|
824
|
-
},
|
|
825
|
-
{
|
|
826
|
-
"internalType": "address",
|
|
827
|
-
"name": "uiFeeReceiver",
|
|
828
|
-
"type": "address"
|
|
829
|
-
},
|
|
830
|
-
{
|
|
831
|
-
"internalType": "address",
|
|
832
|
-
"name": "market",
|
|
833
|
-
"type": "address"
|
|
834
|
-
},
|
|
835
|
-
{
|
|
836
|
-
"internalType": "address[]",
|
|
837
|
-
"name": "longTokenSwapPath",
|
|
838
|
-
"type": "address[]"
|
|
839
|
-
},
|
|
840
|
-
{
|
|
841
|
-
"internalType": "address[]",
|
|
842
|
-
"name": "shortTokenSwapPath",
|
|
843
|
-
"type": "address[]"
|
|
844
|
-
},
|
|
845
|
-
{
|
|
846
|
-
"internalType": "uint256",
|
|
847
|
-
"name": "minLongTokenAmount",
|
|
848
|
-
"type": "uint256"
|
|
849
|
-
},
|
|
850
|
-
{
|
|
851
|
-
"internalType": "uint256",
|
|
852
|
-
"name": "minShortTokenAmount",
|
|
853
|
-
"type": "uint256"
|
|
854
|
-
},
|
|
855
|
-
{
|
|
856
|
-
"internalType": "bool",
|
|
857
|
-
"name": "shouldUnwrapNativeToken",
|
|
858
|
-
"type": "bool"
|
|
859
|
-
},
|
|
860
|
-
{
|
|
861
|
-
"internalType": "uint256",
|
|
862
|
-
"name": "executionFee",
|
|
863
|
-
"type": "uint256"
|
|
864
|
-
},
|
|
865
|
-
{
|
|
866
|
-
"internalType": "uint256",
|
|
867
|
-
"name": "callbackGasLimit",
|
|
868
|
-
"type": "uint256"
|
|
869
|
-
}
|
|
870
|
-
],
|
|
871
|
-
"internalType": "struct WithdrawalUtils.CreateWithdrawalParams",
|
|
872
|
-
"name": "params",
|
|
873
|
-
"type": "tuple"
|
|
874
|
-
}
|
|
875
|
-
],
|
|
876
|
-
"name": "createWithdrawal",
|
|
877
|
-
"outputs": [
|
|
878
|
-
{
|
|
879
|
-
"internalType": "bytes32",
|
|
880
|
-
"name": "",
|
|
881
|
-
"type": "bytes32"
|
|
882
|
-
}
|
|
883
|
-
],
|
|
884
|
-
"stateMutability": "payable",
|
|
885
|
-
"type": "function"
|
|
886
|
-
},
|
|
887
|
-
{
|
|
888
|
-
"inputs": [],
|
|
889
|
-
"name": "dataStore",
|
|
890
|
-
"outputs": [
|
|
891
|
-
{
|
|
892
|
-
"internalType": "contract DataStore",
|
|
893
|
-
"name": "",
|
|
894
|
-
"type": "address"
|
|
895
|
-
}
|
|
896
|
-
],
|
|
897
|
-
"stateMutability": "view",
|
|
898
|
-
"type": "function"
|
|
899
|
-
},
|
|
900
|
-
{
|
|
901
|
-
"inputs": [],
|
|
902
|
-
"name": "depositHandler",
|
|
903
|
-
"outputs": [
|
|
904
|
-
{
|
|
905
|
-
"internalType": "contract IDepositHandler",
|
|
906
|
-
"name": "",
|
|
907
|
-
"type": "address"
|
|
908
|
-
}
|
|
909
|
-
],
|
|
910
|
-
"stateMutability": "view",
|
|
911
|
-
"type": "function"
|
|
912
|
-
},
|
|
913
|
-
{
|
|
914
|
-
"inputs": [],
|
|
915
|
-
"name": "eventEmitter",
|
|
916
|
-
"outputs": [
|
|
917
|
-
{
|
|
918
|
-
"internalType": "contract EventEmitter",
|
|
919
|
-
"name": "",
|
|
920
|
-
"type": "address"
|
|
921
|
-
}
|
|
922
|
-
],
|
|
923
|
-
"stateMutability": "view",
|
|
924
|
-
"type": "function"
|
|
925
|
-
},
|
|
926
|
-
{
|
|
927
|
-
"inputs": [
|
|
928
|
-
{
|
|
929
|
-
"components": [
|
|
930
|
-
{
|
|
931
|
-
"internalType": "address",
|
|
932
|
-
"name": "receiver",
|
|
933
|
-
"type": "address"
|
|
934
|
-
},
|
|
935
|
-
{
|
|
936
|
-
"internalType": "address",
|
|
937
|
-
"name": "callbackContract",
|
|
938
|
-
"type": "address"
|
|
939
|
-
},
|
|
940
|
-
{
|
|
941
|
-
"internalType": "address",
|
|
942
|
-
"name": "uiFeeReceiver",
|
|
943
|
-
"type": "address"
|
|
944
|
-
},
|
|
945
|
-
{
|
|
946
|
-
"internalType": "address",
|
|
947
|
-
"name": "market",
|
|
948
|
-
"type": "address"
|
|
949
|
-
},
|
|
950
|
-
{
|
|
951
|
-
"internalType": "address[]",
|
|
952
|
-
"name": "longTokenSwapPath",
|
|
953
|
-
"type": "address[]"
|
|
954
|
-
},
|
|
955
|
-
{
|
|
956
|
-
"internalType": "address[]",
|
|
957
|
-
"name": "shortTokenSwapPath",
|
|
958
|
-
"type": "address[]"
|
|
959
|
-
},
|
|
960
|
-
{
|
|
961
|
-
"internalType": "uint256",
|
|
962
|
-
"name": "minLongTokenAmount",
|
|
963
|
-
"type": "uint256"
|
|
964
|
-
},
|
|
965
|
-
{
|
|
966
|
-
"internalType": "uint256",
|
|
967
|
-
"name": "minShortTokenAmount",
|
|
968
|
-
"type": "uint256"
|
|
969
|
-
},
|
|
970
|
-
{
|
|
971
|
-
"internalType": "bool",
|
|
972
|
-
"name": "shouldUnwrapNativeToken",
|
|
973
|
-
"type": "bool"
|
|
974
|
-
},
|
|
975
|
-
{
|
|
976
|
-
"internalType": "uint256",
|
|
977
|
-
"name": "executionFee",
|
|
978
|
-
"type": "uint256"
|
|
979
|
-
},
|
|
980
|
-
{
|
|
981
|
-
"internalType": "uint256",
|
|
982
|
-
"name": "callbackGasLimit",
|
|
983
|
-
"type": "uint256"
|
|
984
|
-
}
|
|
985
|
-
],
|
|
986
|
-
"internalType": "struct WithdrawalUtils.CreateWithdrawalParams",
|
|
987
|
-
"name": "params",
|
|
988
|
-
"type": "tuple"
|
|
989
|
-
},
|
|
990
|
-
{
|
|
991
|
-
"components": [
|
|
992
|
-
{
|
|
993
|
-
"internalType": "address[]",
|
|
994
|
-
"name": "tokens",
|
|
995
|
-
"type": "address[]"
|
|
996
|
-
},
|
|
997
|
-
{
|
|
998
|
-
"internalType": "address[]",
|
|
999
|
-
"name": "providers",
|
|
1000
|
-
"type": "address[]"
|
|
1001
|
-
},
|
|
1002
|
-
{
|
|
1003
|
-
"internalType": "bytes[]",
|
|
1004
|
-
"name": "data",
|
|
1005
|
-
"type": "bytes[]"
|
|
1006
|
-
}
|
|
1007
|
-
],
|
|
1008
|
-
"internalType": "struct OracleUtils.SetPricesParams",
|
|
1009
|
-
"name": "oracleParams",
|
|
1010
|
-
"type": "tuple"
|
|
1011
|
-
}
|
|
1012
|
-
],
|
|
1013
|
-
"name": "executeAtomicWithdrawal",
|
|
1014
|
-
"outputs": [],
|
|
1015
|
-
"stateMutability": "payable",
|
|
1016
|
-
"type": "function"
|
|
1017
|
-
},
|
|
1018
|
-
{
|
|
1019
|
-
"inputs": [],
|
|
1020
|
-
"name": "externalHandler",
|
|
1021
|
-
"outputs": [
|
|
1022
|
-
{
|
|
1023
|
-
"internalType": "contract IExternalHandler",
|
|
1024
|
-
"name": "",
|
|
1025
|
-
"type": "address"
|
|
1026
|
-
}
|
|
1027
|
-
],
|
|
1028
|
-
"stateMutability": "view",
|
|
1029
|
-
"type": "function"
|
|
1030
|
-
},
|
|
1031
|
-
{
|
|
1032
|
-
"inputs": [
|
|
1033
|
-
{
|
|
1034
|
-
"internalType": "address[]",
|
|
1035
|
-
"name": "externalCallTargets",
|
|
1036
|
-
"type": "address[]"
|
|
1037
|
-
},
|
|
1038
|
-
{
|
|
1039
|
-
"internalType": "bytes[]",
|
|
1040
|
-
"name": "externalCallDataList",
|
|
1041
|
-
"type": "bytes[]"
|
|
1042
|
-
},
|
|
1043
|
-
{
|
|
1044
|
-
"internalType": "address[]",
|
|
1045
|
-
"name": "refundTokens",
|
|
1046
|
-
"type": "address[]"
|
|
1047
|
-
},
|
|
1048
|
-
{
|
|
1049
|
-
"internalType": "address[]",
|
|
1050
|
-
"name": "refundReceivers",
|
|
1051
|
-
"type": "address[]"
|
|
1052
|
-
}
|
|
1053
|
-
],
|
|
1054
|
-
"name": "makeExternalCalls",
|
|
1055
|
-
"outputs": [],
|
|
1056
|
-
"stateMutability": "nonpayable",
|
|
1057
|
-
"type": "function"
|
|
1058
|
-
},
|
|
1059
|
-
{
|
|
1060
|
-
"inputs": [
|
|
1061
|
-
{
|
|
1062
|
-
"internalType": "bytes[]",
|
|
1063
|
-
"name": "data",
|
|
1064
|
-
"type": "bytes[]"
|
|
1065
|
-
}
|
|
1066
|
-
],
|
|
1067
|
-
"name": "multicall",
|
|
1068
|
-
"outputs": [
|
|
1069
|
-
{
|
|
1070
|
-
"internalType": "bytes[]",
|
|
1071
|
-
"name": "results",
|
|
1072
|
-
"type": "bytes[]"
|
|
1073
|
-
}
|
|
1074
|
-
],
|
|
1075
|
-
"stateMutability": "payable",
|
|
1076
|
-
"type": "function"
|
|
1077
|
-
},
|
|
1078
|
-
{
|
|
1079
|
-
"inputs": [],
|
|
1080
|
-
"name": "orderHandler",
|
|
1081
|
-
"outputs": [
|
|
1082
|
-
{
|
|
1083
|
-
"internalType": "contract IOrderHandler",
|
|
1084
|
-
"name": "",
|
|
1085
|
-
"type": "address"
|
|
1086
|
-
}
|
|
1087
|
-
],
|
|
1088
|
-
"stateMutability": "view",
|
|
1089
|
-
"type": "function"
|
|
1090
|
-
},
|
|
1091
|
-
{
|
|
1092
|
-
"inputs": [],
|
|
1093
|
-
"name": "roleStore",
|
|
1094
|
-
"outputs": [
|
|
1095
|
-
{
|
|
1096
|
-
"internalType": "contract RoleStore",
|
|
1097
|
-
"name": "",
|
|
1098
|
-
"type": "address"
|
|
1099
|
-
}
|
|
1100
|
-
],
|
|
1101
|
-
"stateMutability": "view",
|
|
1102
|
-
"type": "function"
|
|
1103
|
-
},
|
|
1104
|
-
{
|
|
1105
|
-
"inputs": [],
|
|
1106
|
-
"name": "router",
|
|
1107
|
-
"outputs": [
|
|
1108
|
-
{
|
|
1109
|
-
"internalType": "contract Router",
|
|
1110
|
-
"name": "",
|
|
1111
|
-
"type": "address"
|
|
1112
|
-
}
|
|
1113
|
-
],
|
|
1114
|
-
"stateMutability": "view",
|
|
1115
|
-
"type": "function"
|
|
1116
|
-
},
|
|
1117
|
-
{
|
|
1118
|
-
"inputs": [
|
|
1119
|
-
{
|
|
1120
|
-
"internalType": "address",
|
|
1121
|
-
"name": "receiver",
|
|
1122
|
-
"type": "address"
|
|
1123
|
-
},
|
|
1124
|
-
{
|
|
1125
|
-
"internalType": "uint256",
|
|
1126
|
-
"name": "amount",
|
|
1127
|
-
"type": "uint256"
|
|
1128
|
-
}
|
|
1129
|
-
],
|
|
1130
|
-
"name": "sendNativeToken",
|
|
1131
|
-
"outputs": [],
|
|
1132
|
-
"stateMutability": "payable",
|
|
1133
|
-
"type": "function"
|
|
1134
|
-
},
|
|
1135
|
-
{
|
|
1136
|
-
"inputs": [
|
|
1137
|
-
{
|
|
1138
|
-
"internalType": "address",
|
|
1139
|
-
"name": "token",
|
|
1140
|
-
"type": "address"
|
|
1141
|
-
},
|
|
1142
|
-
{
|
|
1143
|
-
"internalType": "address",
|
|
1144
|
-
"name": "receiver",
|
|
1145
|
-
"type": "address"
|
|
1146
|
-
},
|
|
1147
|
-
{
|
|
1148
|
-
"internalType": "uint256",
|
|
1149
|
-
"name": "amount",
|
|
1150
|
-
"type": "uint256"
|
|
1151
|
-
}
|
|
1152
|
-
],
|
|
1153
|
-
"name": "sendTokens",
|
|
1154
|
-
"outputs": [],
|
|
1155
|
-
"stateMutability": "payable",
|
|
1156
|
-
"type": "function"
|
|
1157
|
-
},
|
|
1158
|
-
{
|
|
1159
|
-
"inputs": [
|
|
1160
|
-
{
|
|
1161
|
-
"internalType": "address",
|
|
1162
|
-
"name": "receiver",
|
|
1163
|
-
"type": "address"
|
|
1164
|
-
},
|
|
1165
|
-
{
|
|
1166
|
-
"internalType": "uint256",
|
|
1167
|
-
"name": "amount",
|
|
1168
|
-
"type": "uint256"
|
|
1169
|
-
}
|
|
1170
|
-
],
|
|
1171
|
-
"name": "sendWnt",
|
|
1172
|
-
"outputs": [],
|
|
1173
|
-
"stateMutability": "payable",
|
|
1174
|
-
"type": "function"
|
|
1175
|
-
},
|
|
1176
|
-
{
|
|
1177
|
-
"inputs": [
|
|
1178
|
-
{
|
|
1179
|
-
"internalType": "address",
|
|
1180
|
-
"name": "market",
|
|
1181
|
-
"type": "address"
|
|
1182
|
-
},
|
|
1183
|
-
{
|
|
1184
|
-
"internalType": "address",
|
|
1185
|
-
"name": "callbackContract",
|
|
1186
|
-
"type": "address"
|
|
1187
|
-
}
|
|
1188
|
-
],
|
|
1189
|
-
"name": "setSavedCallbackContract",
|
|
1190
|
-
"outputs": [],
|
|
1191
|
-
"stateMutability": "payable",
|
|
1192
|
-
"type": "function"
|
|
1193
|
-
},
|
|
1194
|
-
{
|
|
1195
|
-
"inputs": [
|
|
1196
|
-
{
|
|
1197
|
-
"internalType": "uint256",
|
|
1198
|
-
"name": "uiFeeFactor",
|
|
1199
|
-
"type": "uint256"
|
|
1200
|
-
}
|
|
1201
|
-
],
|
|
1202
|
-
"name": "setUiFeeFactor",
|
|
1203
|
-
"outputs": [],
|
|
1204
|
-
"stateMutability": "payable",
|
|
1205
|
-
"type": "function"
|
|
1206
|
-
},
|
|
1207
|
-
{
|
|
1208
|
-
"inputs": [],
|
|
1209
|
-
"name": "shiftHandler",
|
|
1210
|
-
"outputs": [
|
|
1211
|
-
{
|
|
1212
|
-
"internalType": "contract IShiftHandler",
|
|
1213
|
-
"name": "",
|
|
1214
|
-
"type": "address"
|
|
1215
|
-
}
|
|
1216
|
-
],
|
|
1217
|
-
"stateMutability": "view",
|
|
1218
|
-
"type": "function"
|
|
1219
|
-
},
|
|
1220
|
-
{
|
|
1221
|
-
"inputs": [
|
|
1222
|
-
{
|
|
1223
|
-
"internalType": "bytes32",
|
|
1224
|
-
"name": "key",
|
|
1225
|
-
"type": "bytes32"
|
|
1226
|
-
},
|
|
1227
|
-
{
|
|
1228
|
-
"components": [
|
|
1229
|
-
{
|
|
1230
|
-
"internalType": "address[]",
|
|
1231
|
-
"name": "primaryTokens",
|
|
1232
|
-
"type": "address[]"
|
|
1233
|
-
},
|
|
1234
|
-
{
|
|
1235
|
-
"components": [
|
|
1236
|
-
{
|
|
1237
|
-
"internalType": "uint256",
|
|
1238
|
-
"name": "min",
|
|
1239
|
-
"type": "uint256"
|
|
1240
|
-
},
|
|
1241
|
-
{
|
|
1242
|
-
"internalType": "uint256",
|
|
1243
|
-
"name": "max",
|
|
1244
|
-
"type": "uint256"
|
|
1245
|
-
}
|
|
1246
|
-
],
|
|
1247
|
-
"internalType": "struct Price.Props[]",
|
|
1248
|
-
"name": "primaryPrices",
|
|
1249
|
-
"type": "tuple[]"
|
|
1250
|
-
},
|
|
1251
|
-
{
|
|
1252
|
-
"internalType": "uint256",
|
|
1253
|
-
"name": "minTimestamp",
|
|
1254
|
-
"type": "uint256"
|
|
1255
|
-
},
|
|
1256
|
-
{
|
|
1257
|
-
"internalType": "uint256",
|
|
1258
|
-
"name": "maxTimestamp",
|
|
1259
|
-
"type": "uint256"
|
|
1260
|
-
}
|
|
1261
|
-
],
|
|
1262
|
-
"internalType": "struct OracleUtils.SimulatePricesParams",
|
|
1263
|
-
"name": "simulatedOracleParams",
|
|
1264
|
-
"type": "tuple"
|
|
1265
|
-
}
|
|
1266
|
-
],
|
|
1267
|
-
"name": "simulateExecuteDeposit",
|
|
1268
|
-
"outputs": [],
|
|
1269
|
-
"stateMutability": "payable",
|
|
1270
|
-
"type": "function"
|
|
1271
|
-
},
|
|
1272
|
-
{
|
|
1273
|
-
"inputs": [
|
|
1274
|
-
{
|
|
1275
|
-
"components": [
|
|
1276
|
-
{
|
|
1277
|
-
"internalType": "address[]",
|
|
1278
|
-
"name": "primaryTokens",
|
|
1279
|
-
"type": "address[]"
|
|
1280
|
-
},
|
|
1281
|
-
{
|
|
1282
|
-
"components": [
|
|
1283
|
-
{
|
|
1284
|
-
"internalType": "uint256",
|
|
1285
|
-
"name": "min",
|
|
1286
|
-
"type": "uint256"
|
|
1287
|
-
},
|
|
1288
|
-
{
|
|
1289
|
-
"internalType": "uint256",
|
|
1290
|
-
"name": "max",
|
|
1291
|
-
"type": "uint256"
|
|
1292
|
-
}
|
|
1293
|
-
],
|
|
1294
|
-
"internalType": "struct Price.Props[]",
|
|
1295
|
-
"name": "primaryPrices",
|
|
1296
|
-
"type": "tuple[]"
|
|
1297
|
-
},
|
|
1298
|
-
{
|
|
1299
|
-
"internalType": "uint256",
|
|
1300
|
-
"name": "minTimestamp",
|
|
1301
|
-
"type": "uint256"
|
|
1302
|
-
},
|
|
1303
|
-
{
|
|
1304
|
-
"internalType": "uint256",
|
|
1305
|
-
"name": "maxTimestamp",
|
|
1306
|
-
"type": "uint256"
|
|
1307
|
-
}
|
|
1308
|
-
],
|
|
1309
|
-
"internalType": "struct OracleUtils.SimulatePricesParams",
|
|
1310
|
-
"name": "simulatedOracleParams",
|
|
1311
|
-
"type": "tuple"
|
|
1312
|
-
}
|
|
1313
|
-
],
|
|
1314
|
-
"name": "simulateExecuteLatestDeposit",
|
|
1315
|
-
"outputs": [],
|
|
1316
|
-
"stateMutability": "payable",
|
|
1317
|
-
"type": "function"
|
|
1318
|
-
},
|
|
1319
|
-
{
|
|
1320
|
-
"inputs": [
|
|
1321
|
-
{
|
|
1322
|
-
"components": [
|
|
1323
|
-
{
|
|
1324
|
-
"internalType": "address[]",
|
|
1325
|
-
"name": "primaryTokens",
|
|
1326
|
-
"type": "address[]"
|
|
1327
|
-
},
|
|
1328
|
-
{
|
|
1329
|
-
"components": [
|
|
1330
|
-
{
|
|
1331
|
-
"internalType": "uint256",
|
|
1332
|
-
"name": "min",
|
|
1333
|
-
"type": "uint256"
|
|
1334
|
-
},
|
|
1335
|
-
{
|
|
1336
|
-
"internalType": "uint256",
|
|
1337
|
-
"name": "max",
|
|
1338
|
-
"type": "uint256"
|
|
1339
|
-
}
|
|
1340
|
-
],
|
|
1341
|
-
"internalType": "struct Price.Props[]",
|
|
1342
|
-
"name": "primaryPrices",
|
|
1343
|
-
"type": "tuple[]"
|
|
1344
|
-
},
|
|
1345
|
-
{
|
|
1346
|
-
"internalType": "uint256",
|
|
1347
|
-
"name": "minTimestamp",
|
|
1348
|
-
"type": "uint256"
|
|
1349
|
-
},
|
|
1350
|
-
{
|
|
1351
|
-
"internalType": "uint256",
|
|
1352
|
-
"name": "maxTimestamp",
|
|
1353
|
-
"type": "uint256"
|
|
1354
|
-
}
|
|
1355
|
-
],
|
|
1356
|
-
"internalType": "struct OracleUtils.SimulatePricesParams",
|
|
1357
|
-
"name": "simulatedOracleParams",
|
|
1358
|
-
"type": "tuple"
|
|
1359
|
-
}
|
|
1360
|
-
],
|
|
1361
|
-
"name": "simulateExecuteLatestOrder",
|
|
1362
|
-
"outputs": [],
|
|
1363
|
-
"stateMutability": "payable",
|
|
1364
|
-
"type": "function"
|
|
1365
|
-
},
|
|
1366
|
-
{
|
|
1367
|
-
"inputs": [
|
|
1368
|
-
{
|
|
1369
|
-
"components": [
|
|
1370
|
-
{
|
|
1371
|
-
"internalType": "address[]",
|
|
1372
|
-
"name": "primaryTokens",
|
|
1373
|
-
"type": "address[]"
|
|
1374
|
-
},
|
|
1375
|
-
{
|
|
1376
|
-
"components": [
|
|
1377
|
-
{
|
|
1378
|
-
"internalType": "uint256",
|
|
1379
|
-
"name": "min",
|
|
1380
|
-
"type": "uint256"
|
|
1381
|
-
},
|
|
1382
|
-
{
|
|
1383
|
-
"internalType": "uint256",
|
|
1384
|
-
"name": "max",
|
|
1385
|
-
"type": "uint256"
|
|
1386
|
-
}
|
|
1387
|
-
],
|
|
1388
|
-
"internalType": "struct Price.Props[]",
|
|
1389
|
-
"name": "primaryPrices",
|
|
1390
|
-
"type": "tuple[]"
|
|
1391
|
-
},
|
|
1392
|
-
{
|
|
1393
|
-
"internalType": "uint256",
|
|
1394
|
-
"name": "minTimestamp",
|
|
1395
|
-
"type": "uint256"
|
|
1396
|
-
},
|
|
1397
|
-
{
|
|
1398
|
-
"internalType": "uint256",
|
|
1399
|
-
"name": "maxTimestamp",
|
|
1400
|
-
"type": "uint256"
|
|
1401
|
-
}
|
|
1402
|
-
],
|
|
1403
|
-
"internalType": "struct OracleUtils.SimulatePricesParams",
|
|
1404
|
-
"name": "simulatedOracleParams",
|
|
1405
|
-
"type": "tuple"
|
|
1406
|
-
}
|
|
1407
|
-
],
|
|
1408
|
-
"name": "simulateExecuteLatestShift",
|
|
1409
|
-
"outputs": [],
|
|
1410
|
-
"stateMutability": "payable",
|
|
1411
|
-
"type": "function"
|
|
1412
|
-
},
|
|
1413
|
-
{
|
|
1414
|
-
"inputs": [
|
|
1415
|
-
{
|
|
1416
|
-
"components": [
|
|
1417
|
-
{
|
|
1418
|
-
"internalType": "address[]",
|
|
1419
|
-
"name": "primaryTokens",
|
|
1420
|
-
"type": "address[]"
|
|
1421
|
-
},
|
|
1422
|
-
{
|
|
1423
|
-
"components": [
|
|
1424
|
-
{
|
|
1425
|
-
"internalType": "uint256",
|
|
1426
|
-
"name": "min",
|
|
1427
|
-
"type": "uint256"
|
|
1428
|
-
},
|
|
1429
|
-
{
|
|
1430
|
-
"internalType": "uint256",
|
|
1431
|
-
"name": "max",
|
|
1432
|
-
"type": "uint256"
|
|
1433
|
-
}
|
|
1434
|
-
],
|
|
1435
|
-
"internalType": "struct Price.Props[]",
|
|
1436
|
-
"name": "primaryPrices",
|
|
1437
|
-
"type": "tuple[]"
|
|
1438
|
-
},
|
|
1439
|
-
{
|
|
1440
|
-
"internalType": "uint256",
|
|
1441
|
-
"name": "minTimestamp",
|
|
1442
|
-
"type": "uint256"
|
|
1443
|
-
},
|
|
1444
|
-
{
|
|
1445
|
-
"internalType": "uint256",
|
|
1446
|
-
"name": "maxTimestamp",
|
|
1447
|
-
"type": "uint256"
|
|
1448
|
-
}
|
|
1449
|
-
],
|
|
1450
|
-
"internalType": "struct OracleUtils.SimulatePricesParams",
|
|
1451
|
-
"name": "simulatedOracleParams",
|
|
1452
|
-
"type": "tuple"
|
|
1453
|
-
},
|
|
1454
|
-
{
|
|
1455
|
-
"internalType": "enum ISwapPricingUtils.SwapPricingType",
|
|
1456
|
-
"name": "swapPricingType",
|
|
1457
|
-
"type": "uint8"
|
|
1458
|
-
}
|
|
1459
|
-
],
|
|
1460
|
-
"name": "simulateExecuteLatestWithdrawal",
|
|
1461
|
-
"outputs": [],
|
|
1462
|
-
"stateMutability": "payable",
|
|
1463
|
-
"type": "function"
|
|
1464
|
-
},
|
|
1465
|
-
{
|
|
1466
|
-
"inputs": [
|
|
1467
|
-
{
|
|
1468
|
-
"internalType": "bytes32",
|
|
1469
|
-
"name": "key",
|
|
1470
|
-
"type": "bytes32"
|
|
1471
|
-
},
|
|
1472
|
-
{
|
|
1473
|
-
"components": [
|
|
1474
|
-
{
|
|
1475
|
-
"internalType": "address[]",
|
|
1476
|
-
"name": "primaryTokens",
|
|
1477
|
-
"type": "address[]"
|
|
1478
|
-
},
|
|
1479
|
-
{
|
|
1480
|
-
"components": [
|
|
1481
|
-
{
|
|
1482
|
-
"internalType": "uint256",
|
|
1483
|
-
"name": "min",
|
|
1484
|
-
"type": "uint256"
|
|
1485
|
-
},
|
|
1486
|
-
{
|
|
1487
|
-
"internalType": "uint256",
|
|
1488
|
-
"name": "max",
|
|
1489
|
-
"type": "uint256"
|
|
1490
|
-
}
|
|
1491
|
-
],
|
|
1492
|
-
"internalType": "struct Price.Props[]",
|
|
1493
|
-
"name": "primaryPrices",
|
|
1494
|
-
"type": "tuple[]"
|
|
1495
|
-
},
|
|
1496
|
-
{
|
|
1497
|
-
"internalType": "uint256",
|
|
1498
|
-
"name": "minTimestamp",
|
|
1499
|
-
"type": "uint256"
|
|
1500
|
-
},
|
|
1501
|
-
{
|
|
1502
|
-
"internalType": "uint256",
|
|
1503
|
-
"name": "maxTimestamp",
|
|
1504
|
-
"type": "uint256"
|
|
1505
|
-
}
|
|
1506
|
-
],
|
|
1507
|
-
"internalType": "struct OracleUtils.SimulatePricesParams",
|
|
1508
|
-
"name": "simulatedOracleParams",
|
|
1509
|
-
"type": "tuple"
|
|
1510
|
-
}
|
|
1511
|
-
],
|
|
1512
|
-
"name": "simulateExecuteOrder",
|
|
1513
|
-
"outputs": [],
|
|
1514
|
-
"stateMutability": "payable",
|
|
1515
|
-
"type": "function"
|
|
1516
|
-
},
|
|
1517
|
-
{
|
|
1518
|
-
"inputs": [
|
|
1519
|
-
{
|
|
1520
|
-
"internalType": "bytes32",
|
|
1521
|
-
"name": "key",
|
|
1522
|
-
"type": "bytes32"
|
|
1523
|
-
},
|
|
1524
|
-
{
|
|
1525
|
-
"components": [
|
|
1526
|
-
{
|
|
1527
|
-
"internalType": "address[]",
|
|
1528
|
-
"name": "primaryTokens",
|
|
1529
|
-
"type": "address[]"
|
|
1530
|
-
},
|
|
1531
|
-
{
|
|
1532
|
-
"components": [
|
|
1533
|
-
{
|
|
1534
|
-
"internalType": "uint256",
|
|
1535
|
-
"name": "min",
|
|
1536
|
-
"type": "uint256"
|
|
1537
|
-
},
|
|
1538
|
-
{
|
|
1539
|
-
"internalType": "uint256",
|
|
1540
|
-
"name": "max",
|
|
1541
|
-
"type": "uint256"
|
|
1542
|
-
}
|
|
1543
|
-
],
|
|
1544
|
-
"internalType": "struct Price.Props[]",
|
|
1545
|
-
"name": "primaryPrices",
|
|
1546
|
-
"type": "tuple[]"
|
|
1547
|
-
},
|
|
1548
|
-
{
|
|
1549
|
-
"internalType": "uint256",
|
|
1550
|
-
"name": "minTimestamp",
|
|
1551
|
-
"type": "uint256"
|
|
1552
|
-
},
|
|
1553
|
-
{
|
|
1554
|
-
"internalType": "uint256",
|
|
1555
|
-
"name": "maxTimestamp",
|
|
1556
|
-
"type": "uint256"
|
|
1557
|
-
}
|
|
1558
|
-
],
|
|
1559
|
-
"internalType": "struct OracleUtils.SimulatePricesParams",
|
|
1560
|
-
"name": "simulatedOracleParams",
|
|
1561
|
-
"type": "tuple"
|
|
1562
|
-
}
|
|
1563
|
-
],
|
|
1564
|
-
"name": "simulateExecuteShift",
|
|
1565
|
-
"outputs": [],
|
|
1566
|
-
"stateMutability": "payable",
|
|
1567
|
-
"type": "function"
|
|
1568
|
-
},
|
|
1569
|
-
{
|
|
1570
|
-
"inputs": [
|
|
1571
|
-
{
|
|
1572
|
-
"internalType": "bytes32",
|
|
1573
|
-
"name": "key",
|
|
1574
|
-
"type": "bytes32"
|
|
1575
|
-
},
|
|
1576
|
-
{
|
|
1577
|
-
"components": [
|
|
1578
|
-
{
|
|
1579
|
-
"internalType": "address[]",
|
|
1580
|
-
"name": "primaryTokens",
|
|
1581
|
-
"type": "address[]"
|
|
1582
|
-
},
|
|
1583
|
-
{
|
|
1584
|
-
"components": [
|
|
1585
|
-
{
|
|
1586
|
-
"internalType": "uint256",
|
|
1587
|
-
"name": "min",
|
|
1588
|
-
"type": "uint256"
|
|
1589
|
-
},
|
|
1590
|
-
{
|
|
1591
|
-
"internalType": "uint256",
|
|
1592
|
-
"name": "max",
|
|
1593
|
-
"type": "uint256"
|
|
1594
|
-
}
|
|
1595
|
-
],
|
|
1596
|
-
"internalType": "struct Price.Props[]",
|
|
1597
|
-
"name": "primaryPrices",
|
|
1598
|
-
"type": "tuple[]"
|
|
1599
|
-
},
|
|
1600
|
-
{
|
|
1601
|
-
"internalType": "uint256",
|
|
1602
|
-
"name": "minTimestamp",
|
|
1603
|
-
"type": "uint256"
|
|
1604
|
-
},
|
|
1605
|
-
{
|
|
1606
|
-
"internalType": "uint256",
|
|
1607
|
-
"name": "maxTimestamp",
|
|
1608
|
-
"type": "uint256"
|
|
1609
|
-
}
|
|
1610
|
-
],
|
|
1611
|
-
"internalType": "struct OracleUtils.SimulatePricesParams",
|
|
1612
|
-
"name": "simulatedOracleParams",
|
|
1613
|
-
"type": "tuple"
|
|
1614
|
-
},
|
|
1615
|
-
{
|
|
1616
|
-
"internalType": "enum ISwapPricingUtils.SwapPricingType",
|
|
1617
|
-
"name": "swapPricingType",
|
|
1618
|
-
"type": "uint8"
|
|
1619
|
-
}
|
|
1620
|
-
],
|
|
1621
|
-
"name": "simulateExecuteWithdrawal",
|
|
1622
|
-
"outputs": [],
|
|
1623
|
-
"stateMutability": "payable",
|
|
1624
|
-
"type": "function"
|
|
1625
|
-
},
|
|
1626
|
-
{
|
|
1627
|
-
"inputs": [
|
|
1628
|
-
{
|
|
1629
|
-
"internalType": "bytes32",
|
|
1630
|
-
"name": "key",
|
|
1631
|
-
"type": "bytes32"
|
|
1632
|
-
},
|
|
1633
|
-
{
|
|
1634
|
-
"internalType": "uint256",
|
|
1635
|
-
"name": "sizeDeltaUsd",
|
|
1636
|
-
"type": "uint256"
|
|
1637
|
-
},
|
|
1638
|
-
{
|
|
1639
|
-
"internalType": "uint256",
|
|
1640
|
-
"name": "acceptablePrice",
|
|
1641
|
-
"type": "uint256"
|
|
1642
|
-
},
|
|
1643
|
-
{
|
|
1644
|
-
"internalType": "uint256",
|
|
1645
|
-
"name": "triggerPrice",
|
|
1646
|
-
"type": "uint256"
|
|
1647
|
-
},
|
|
1648
|
-
{
|
|
1649
|
-
"internalType": "uint256",
|
|
1650
|
-
"name": "minOutputAmount",
|
|
1651
|
-
"type": "uint256"
|
|
1652
|
-
},
|
|
1653
|
-
{
|
|
1654
|
-
"internalType": "uint256",
|
|
1655
|
-
"name": "validFromTime",
|
|
1656
|
-
"type": "uint256"
|
|
1657
|
-
},
|
|
1658
|
-
{
|
|
1659
|
-
"internalType": "bool",
|
|
1660
|
-
"name": "autoCancel",
|
|
1661
|
-
"type": "bool"
|
|
1662
|
-
}
|
|
1663
|
-
],
|
|
1664
|
-
"name": "updateOrder",
|
|
1665
|
-
"outputs": [],
|
|
1666
|
-
"stateMutability": "payable",
|
|
1667
|
-
"type": "function"
|
|
1668
|
-
},
|
|
1669
|
-
{
|
|
1670
|
-
"inputs": [],
|
|
1671
|
-
"name": "withdrawalHandler",
|
|
1672
|
-
"outputs": [
|
|
1673
|
-
{
|
|
1674
|
-
"internalType": "contract IWithdrawalHandler",
|
|
1675
|
-
"name": "",
|
|
1676
|
-
"type": "address"
|
|
1677
|
-
}
|
|
1678
|
-
],
|
|
1679
|
-
"stateMutability": "view",
|
|
1680
|
-
"type": "function"
|
|
1681
|
-
}
|
|
1682
|
-
],
|
|
1683
|
-
"transactionHash": "0x723bba33993a46238da285f8900a6c411564432b8af409c3dc8d3b1f6d5c7167",
|
|
1684
|
-
"receipt": {
|
|
1685
|
-
"to": null,
|
|
1686
|
-
"from": "0xE7BfFf2aB721264887230037940490351700a068",
|
|
1687
|
-
"contractAddress": "0x69C527fC77291722b52649E45c838e41be8Bf5d5",
|
|
1688
|
-
"transactionIndex": 6,
|
|
1689
|
-
"gasUsed": "6362339",
|
|
1690
|
-
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
1691
|
-
"blockHash": "0xd18c90532e420963f4dc93793b032a792fdde7171138710bc41c4088e2aa5d59",
|
|
1692
|
-
"transactionHash": "0x723bba33993a46238da285f8900a6c411564432b8af409c3dc8d3b1f6d5c7167",
|
|
1693
|
-
"logs": [],
|
|
1694
|
-
"blockNumber": 222747030,
|
|
1695
|
-
"cumulativeGasUsed": "6942059",
|
|
1696
|
-
"status": 1,
|
|
1697
|
-
"byzantium": true
|
|
1698
|
-
},
|
|
1699
|
-
"args": [
|
|
1700
|
-
"0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6",
|
|
1701
|
-
"0x3c3d99FD298f679DBC2CEcd132b4eC4d0F5e6e72",
|
|
1702
|
-
"0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8",
|
|
1703
|
-
"0xC8ee91A54287DB53897056e12D9819156D3822Fb",
|
|
1704
|
-
"0x321f3739983CC3E911fd67a83d1ee76238894Bd0",
|
|
1705
|
-
"0xA19fA3F0D8E7b7A8963420De504b624167e709B2",
|
|
1706
|
-
"0xEa90EC1228F7D1b3D47D84d1c9D46dBDFEfF7709",
|
|
1707
|
-
"0xB0Fc2a48b873da40e7bc25658e5E6137616AC2Ee",
|
|
1708
|
-
"0x389CEf541397e872dC04421f166B5Bc2E0b374a5"
|
|
1709
|
-
],
|
|
1710
|
-
"numDeployments": 6,
|
|
1711
|
-
"solcInputHash": "292dd15f99d7c1e4e4b27476672071d7",
|
|
1712
|
-
"libraries": {
|
|
1713
|
-
"CallbackUtils": "0x501e34E31f1594ffbd3D0C17634D6de6C6C5c7A3",
|
|
1714
|
-
"DepositStoreUtils": "0x3063A99D2df2A871068D47041eB8d089E5DE1Cdc",
|
|
1715
|
-
"FeeUtils": "0x7Fd8d13A778a22F5c2acB67226A193C7d0b0a336",
|
|
1716
|
-
"MarketEventUtils": "0x1F493E17bcF5390d3e5E49eE0bce17d4d068f90b",
|
|
1717
|
-
"MarketStoreUtils": "0xbbf05cF8e1c6548092A6a02c4c5330E76BF0fE2D",
|
|
1718
|
-
"OrderStoreUtils": "0x67040c411C1b3195361801E9Ad8a91D1Fe9C0BC2",
|
|
1719
|
-
"ReferralUtils": "0x27346Fdab142e2b8B6C6d2ecFe73e75B5e249A57",
|
|
1720
|
-
"ShiftStoreUtils": "0xCfad9CB2a681b63884AEf98af28458692137c9E3",
|
|
1721
|
-
"WithdrawalStoreUtils": "0xD521Cb31B14bB9F70D9a59b47D8763336CAD0395"
|
|
1722
|
-
},
|
|
1723
|
-
"devdoc": {
|
|
1724
|
-
"details": "Router for exchange functions, supports functions which require token transfers from the user IMPORTANT: PayableMulticall uses delegatecall, msg.value will be the same for each delegatecall extra care should be taken when using msg.value in any of the functions in this contract To avoid front-running issues, most actions require two steps to execute: - User sends transaction with request details, e.g. deposit / withdraw liquidity, swap, increase / decrease position - Keepers listen for the transactions, include the prices for the request then send a transaction to execute the request Prices are provided by an off-chain oracle system: - Oracle keepers continually check the latest blocks - When there is a new block, oracle keepers fetch the latest prices from reference exchanges - Oracle keepers then sign the median price for each token together with the block hash - Oracle keepers then send the data and signature to archive nodes - Archive nodes display this information for anyone to query Example: - Block 100 is finalized on the blockchain - Oracle keepers observe this block - Oracle keepers pull the latest prices from reference exchanges, token A: price 20,000, token B: price 80,000 - Oracle keepers sign [chainId, blockhash(100), 20,000], [chainId, blockhash(100), 80,000] - If in block 100, there was a market order to open a long position for token A, the market order would have a block number of 100 - The prices signed at block 100 can be used to execute this order - Order keepers would bundle the signature and price data for token A then execute the order",
|
|
1725
|
-
"kind": "dev",
|
|
1726
|
-
"methods": {
|
|
1727
|
-
"cancelOrder(bytes32)": {
|
|
1728
|
-
"details": "Cancels the given order. The `cancelOrder()` feature must be enabled for the given order type. The caller must be the owner of the order, and the order must not be a market order. The order is cancelled by calling the `cancelOrder()` function in the `OrderUtils` contract. This function also records the starting gas amount and the reason for cancellation, which is passed to the `cancelOrder()` function.",
|
|
1729
|
-
"params": {
|
|
1730
|
-
"key": "The unique ID of the order to be cancelled"
|
|
1731
|
-
}
|
|
1732
|
-
},
|
|
1733
|
-
"claimAffiliateRewards(address[],address[],address)": {
|
|
1734
|
-
"details": "Claims affiliate rewards for the given markets and tokens on behalf of the caller, and sends the rewards to the specified receiver. The length of the `markets` and `tokens` arrays must be the same. For each market-token pair, the `claimAffiliateReward()` function in the `ReferralUtils` contract is called to claim the rewards for the caller.",
|
|
1735
|
-
"params": {
|
|
1736
|
-
"markets": "An array of market addresses",
|
|
1737
|
-
"receiver": "The address to which the claimed rewards should be sent",
|
|
1738
|
-
"tokens": "An array of token addresses, corresponding to the given markets"
|
|
1739
|
-
}
|
|
1740
|
-
},
|
|
1741
|
-
"claimFundingFees(address[],address[],address)": {
|
|
1742
|
-
"details": "Claims funding fees for the given markets and tokens on behalf of the caller, and sends the fees to the specified receiver. The length of the `markets` and `tokens` arrays must be the same. For each market-token pair, the `claimFundingFees()` function in the `MarketUtils` contract is called to claim the fees for the caller.",
|
|
1743
|
-
"params": {
|
|
1744
|
-
"markets": "An array of market addresses",
|
|
1745
|
-
"receiver": "The address to which the claimed fees should be sent",
|
|
1746
|
-
"tokens": "An array of token addresses, corresponding to the given markets"
|
|
1747
|
-
}
|
|
1748
|
-
},
|
|
1749
|
-
"createDeposit((address,address,address,address,address,address,address[],address[],uint256,bool,uint256,uint256))": {
|
|
1750
|
-
"details": "Creates a new deposit with the given long token, short token, long token amount, short token amount, and deposit parameters. The deposit is created by transferring the specified amounts of long and short tokens from the caller's account to the deposit store, and then calling the `createDeposit()` function on the deposit handler contract.",
|
|
1751
|
-
"params": {
|
|
1752
|
-
"params": "The deposit parameters, as specified in the `DepositUtils.CreateDepositParams` struct"
|
|
1753
|
-
},
|
|
1754
|
-
"returns": {
|
|
1755
|
-
"_0": "The unique ID of the newly created deposit"
|
|
1756
|
-
}
|
|
1757
|
-
},
|
|
1758
|
-
"createOrder(((address,address,address,address,address,address,address[]),(uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint8,uint8,bool,bool,bool,bytes32))": {
|
|
1759
|
-
"details": "Creates a new order with the given amount, order parameters. The order is created by transferring the specified amount of collateral tokens from the caller's account to the order store, and then calling the `createOrder()` function on the order handler contract. The referral code is also set on the caller's account using the referral storage contract."
|
|
1760
|
-
},
|
|
1761
|
-
"multicall(bytes[])": {
|
|
1762
|
-
"details": "Receives and executes a batch of function calls on this contract."
|
|
1763
|
-
},
|
|
1764
|
-
"updateOrder(bytes32,uint256,uint256,uint256,uint256,bool)": {
|
|
1765
|
-
"details": "Updates the given order with the specified size delta, acceptable price, and trigger price. The `updateOrder()` feature must be enabled for the given order type. The caller must be the owner of the order, and the order must not be a market order. The size delta, trigger price, and acceptable price are updated on the order, and the order is unfrozen. Any additional WNT that is transferred to the contract is added to the order's execution fee. The updated order is then saved in the order store, and an `OrderUpdated` event is emitted.",
|
|
1766
|
-
"params": {
|
|
1767
|
-
"acceptablePrice": "The new acceptable price for the order",
|
|
1768
|
-
"key": "The unique ID of the order to be updated",
|
|
1769
|
-
"sizeDeltaUsd": "The new size delta for the order",
|
|
1770
|
-
"triggerPrice": "The new trigger price for the order"
|
|
1771
|
-
}
|
|
1772
|
-
}
|
|
1773
|
-
},
|
|
1774
|
-
"title": "ExchangeRouter",
|
|
1775
|
-
"version": 1
|
|
1776
|
-
},
|
|
1777
|
-
"userdoc": {
|
|
1778
|
-
"kind": "user",
|
|
1779
|
-
"methods": {},
|
|
1780
|
-
"version": 1
|
|
1781
|
-
},
|
|
1782
|
-
"storageLayout": {
|
|
1783
|
-
"storage": [
|
|
1784
|
-
{
|
|
1785
|
-
"astId": 115,
|
|
1786
|
-
"contract": "contracts/router/ExchangeRouter.sol:ExchangeRouter",
|
|
1787
|
-
"label": "_status",
|
|
1788
|
-
"offset": 0,
|
|
1789
|
-
"slot": "0",
|
|
1790
|
-
"type": "t_uint256"
|
|
1791
|
-
}
|
|
1792
|
-
],
|
|
1793
|
-
"types": {
|
|
1794
|
-
"t_uint256": {
|
|
1795
|
-
"encoding": "inplace",
|
|
1796
|
-
"label": "uint256",
|
|
1797
|
-
"numberOfBytes": "32"
|
|
1798
|
-
}
|
|
1799
|
-
}
|
|
1800
|
-
}
|
|
1801
|
-
}
|