diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ArbitrumNodeInterface.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ArbitrumNodeInterface.json new file mode 100644 index 00000000..a6ccbc18 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ArbitrumNodeInterface.json @@ -0,0 +1,105 @@ +{ + "abi": [ + { + "inputs": [ + { "internalType": "uint64", "name": "size", "type": "uint64" }, + { "internalType": "uint64", "name": "leaf", "type": "uint64" } + ], + "name": "constructOutboxProof", + "outputs": [ + { "internalType": "bytes32", "name": "send", "type": "bytes32" }, + { "internalType": "bytes32", "name": "root", "type": "bytes32" }, + { "internalType": "bytes32[]", "name": "proof", "type": "bytes32[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "sender", "type": "address" }, + { "internalType": "uint256", "name": "deposit", "type": "uint256" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "l2CallValue", "type": "uint256" }, + { "internalType": "address", "name": "excessFeeRefundAddress", "type": "address" }, + { "internalType": "address", "name": "callValueRefundAddress", "type": "address" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "estimateRetryableTicket", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "uint64", "name": "blockNum", "type": "uint64" }], + "name": "findBatchContainingBlock", + "outputs": [{ "internalType": "uint64", "name": "batch", "type": "uint64" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "bool", "name": "contractCreation", "type": "bool" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "gasEstimateComponents", + "outputs": [ + { "internalType": "uint64", "name": "gasEstimate", "type": "uint64" }, + { "internalType": "uint64", "name": "gasEstimateForL1", "type": "uint64" }, + { "internalType": "uint256", "name": "baseFee", "type": "uint256" }, + { "internalType": "uint256", "name": "l1BaseFeeEstimate", "type": "uint256" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "bool", "name": "contractCreation", "type": "bool" }, + { "internalType": "bytes", "name": "data", "type": "bytes" } + ], + "name": "gasEstimateL1Component", + "outputs": [ + { "internalType": "uint64", "name": "gasEstimateForL1", "type": "uint64" }, + { "internalType": "uint256", "name": "baseFee", "type": "uint256" }, + { "internalType": "uint256", "name": "l1BaseFeeEstimate", "type": "uint256" } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [{ "internalType": "bytes32", "name": "blockHash", "type": "bytes32" }], + "name": "getL1Confirmations", + "outputs": [{ "internalType": "uint64", "name": "confirmations", "type": "uint64" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "batchNum", "type": "uint256" }, + { "internalType": "uint64", "name": "index", "type": "uint64" } + ], + "name": "legacyLookupMessageBatchProof", + "outputs": [ + { "internalType": "bytes32[]", "name": "proof", "type": "bytes32[]" }, + { "internalType": "uint256", "name": "path", "type": "uint256" }, + { "internalType": "address", "name": "l2Sender", "type": "address" }, + { "internalType": "address", "name": "l1Dest", "type": "address" }, + { "internalType": "uint256", "name": "l2Block", "type": "uint256" }, + { "internalType": "uint256", "name": "l1Block", "type": "uint256" }, + { "internalType": "uint256", "name": "timestamp", "type": "uint256" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" }, + { "internalType": "bytes", "name": "calldataForL1", "type": "bytes" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "nitroGenesisBlock", + "outputs": [{ "internalType": "uint256", "name": "number", "type": "uint256" }], + "stateMutability": "pure", + "type": "function" + } + ] +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ClaimHandler.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ClaimHandler.json new file mode 100644 index 00000000..b38721ec --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ClaimHandler.json @@ -0,0 +1,424 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "contract RoleStore", + "name": "_roleStore", + "type": "address" + }, + { + "internalType": "contract DataStore", + "name": "_dataStore", + "type": "address" + }, + { + "internalType": "contract EventEmitter", + "name": "_eventEmitter", + "type": "address" + }, + { + "internalType": "contract ClaimVault", + "name": "_claimVault", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "DisabledFeature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "existingDistributionId", + "type": "uint256" + } + ], + "name": "DuplicateClaimTerms", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyAccount", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyAmount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyClaimableAmount", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "InsufficientFunds", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "recoveredSigner", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedSigner", + "type": "address" + } + ], + "name": "InvalidClaimTermsSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expectedSigner", + "type": "address" + } + ], + "name": "InvalidClaimTermsSignatureForContract", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "InvalidParams", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + }, + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "distributionId", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "termsSignature", + "type": "bytes" + } + ], + "internalType": "struct ClaimHandler.ClaimParam[]", + "name": "params", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "claimFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "claimVault", + "outputs": [ + { + "internalType": "contract ClaimVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "distributionId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "internalType": "struct ClaimHandler.DepositParam[]", + "name": "params", + "type": "tuple[]" + } + ], + "name": "depositFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "eventEmitter", + "outputs": [ + { + "internalType": "contract EventEmitter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256[]", + "name": "distributionIds", + "type": "uint256[]" + } + ], + "name": "getClaimableAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getTotalClaimableAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "distributionId", + "type": "uint256" + } + ], + "name": "removeTerms", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "distributionId", + "type": "uint256" + }, + { + "internalType": "string", + "name": "terms", + "type": "string" + } + ], + "name": "setTerms", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "distributionId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "fromAccount", + "type": "address" + }, + { + "internalType": "address", + "name": "toAccount", + "type": "address" + } + ], + "internalType": "struct ClaimHandler.TransferClaimParam[]", + "name": "params", + "type": "tuple[]" + } + ], + "name": "transferClaim", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "distributionId", + "type": "uint256" + } + ], + "internalType": "struct ClaimHandler.WithdrawParam[]", + "name": "params", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "withdrawFunds", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/CustomErrors.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/CustomErrors.json index 42f81d52..0124d633 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/CustomErrors.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/CustomErrors.json @@ -1,7 +1,4 @@ { - "_format": "hh-sol-artifact-1", - "contractName": "Errors", - "sourceName": "contracts/error/Errors.sol", "abi": [ { "inputs": [], @@ -76,6 +73,27 @@ "name": "ArrayOutOfBoundsUint256", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "buybackToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "availableFeeAmount", + "type": "uint256" + } + ], + "name": "AvailableFeeAmountIsZero", + "type": "error" + }, { "inputs": [ { @@ -92,6 +110,27 @@ "name": "BlockNumbersNotSorted", "type": "error" }, + { + "inputs": [], + "name": "BridgeOutNotSupportedDuringShift", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "buybackToken", + "type": "address" + } + ], + "name": "BuybackAndFeeTokenAreEqual", + "type": "error" + }, { "inputs": [ { @@ -171,6 +210,11 @@ "name": "ConfigValueExceedsAllowedRange", "type": "error" }, + { + "inputs": [], + "name": "DataListLengthExceeded", + "type": "error" + }, { "inputs": [ { @@ -182,6 +226,22 @@ "name": "DataStreamIdAlreadyExistsForToken", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "DeadlinePassed", + "type": "error" + }, { "inputs": [ { @@ -215,6 +275,17 @@ "name": "DisabledMarket", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "existingDistributionId", + "type": "uint256" + } + ], + "name": "DuplicateClaimTerms", + "type": "error" + }, { "inputs": [ { @@ -242,6 +313,17 @@ "name": "DuplicatedMarketInSwapPath", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EdgeDataStreamIdAlreadyExistsForToken", + "type": "error" + }, { "inputs": [], "name": "EmptyAccount", @@ -265,7 +347,7 @@ }, { "inputs": [], - "name": "EmptyChainlinkPaymentToken", + "name": "EmptyAmount", "type": "error" }, { @@ -290,6 +372,22 @@ "name": "EmptyChainlinkPriceFeedMultiplier", "type": "error" }, + { + "inputs": [], + "name": "EmptyClaimFeesMarket", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyClaimableAmount", + "type": "error" + }, { "inputs": [ { @@ -327,6 +425,11 @@ "name": "EmptyDepositAmountsAfterSwap", "type": "error" }, + { + "inputs": [], + "name": "EmptyFundingAccount", + "type": "error" + }, { "inputs": [ { @@ -378,11 +481,54 @@ "name": "EmptyMarket", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + } + ], + "name": "EmptyMarketPrice", + "type": "error" + }, { "inputs": [], "name": "EmptyMarketTokenSupply", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyMultichainTransferInAmount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyMultichainTransferOutAmount", + "type": "error" + }, { "inputs": [], "name": "EmptyOrder", @@ -393,6 +539,11 @@ "name": "EmptyPosition", "type": "error" }, + { + "inputs": [], + "name": "EmptyPositionImpactWithdrawalAmount", + "type": "error" + }, { "inputs": [ { @@ -409,6 +560,16 @@ "name": "EmptyReceiver", "type": "error" }, + { + "inputs": [], + "name": "EmptyReduceLentAmount", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyRelayFeeAddress", + "type": "error" + }, { "inputs": [], "name": "EmptyShift", @@ -424,6 +585,16 @@ "name": "EmptySizeDeltaInTokens", "type": "error" }, + { + "inputs": [], + "name": "EmptyTarget", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyToken", + "type": "error" + }, { "inputs": [ { @@ -455,6 +626,17 @@ "name": "EndOfOracleSimulation", "type": "error" }, + { + "inputs": [ + { + "internalType": "string", + "name": "key", + "type": "string" + } + ], + "name": "EventItemNotFound", + "type": "error" + }, { "inputs": [ { @@ -949,6 +1131,32 @@ "name": "GmMinPricesNotSorted", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "buybackToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "outputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + } + ], + "name": "InsufficientBuybackOutputAmount", + "type": "error" + }, { "inputs": [ { @@ -1029,6 +1237,33 @@ "name": "InsufficientExecutionGasForErrorHandling", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeProvided", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "feeRequired", + "type": "uint256" + } + ], + "name": "InsufficientFee", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "InsufficientFunds", + "type": "error" + }, { "inputs": [ { @@ -1045,6 +1280,22 @@ "name": "InsufficientFundsToPayForCosts", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minHandleExecutionErrorGas", + "type": "uint256" + } + ], + "name": "InsufficientGasForAutoCancellation", + "type": "error" + }, { "inputs": [ { @@ -1061,6 +1312,22 @@ "name": "InsufficientGasForCancellation", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "estimatedGasLimit", + "type": "uint256" + } + ], + "name": "InsufficientGasLeft", + "type": "error" + }, { "inputs": [ { @@ -1093,6 +1360,27 @@ "name": "InsufficientHandleExecutionErrorGas", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "withdrawalAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "poolValue", + "type": "uint256" + }, + { + "internalType": "int256", + "name": "totalPendingImpactAmount", + "type": "int256" + } + ], + "name": "InsufficientImpactPoolValueForWithdrawal", + "type": "error" + }, { "inputs": [ { @@ -1109,6 +1397,32 @@ "name": "InsufficientMarketTokens", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InsufficientMultichainBalance", + "type": "error" + }, { "inputs": [ { @@ -1141,6 +1455,22 @@ "name": "InsufficientPoolAmount", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requiredRelayFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "availableFeeAmount", + "type": "uint256" + } + ], + "name": "InsufficientRelayFee", + "type": "error" + }, { "inputs": [ { @@ -1189,22 +1519,6 @@ "name": "InsufficientSwapOutputAmount", "type": "error" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "wntAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "executionFee", - "type": "uint256" - } - ], - "name": "InsufficientWntAmount", - "type": "error" - }, { "inputs": [ { @@ -1280,6 +1594,44 @@ "name": "InvalidBlockRangeSet", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "InvalidBridgeOutToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "buybackToken", + "type": "address" + } + ], + "name": "InvalidBuybackToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "cancellationReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedCancellationReceiver", + "type": "address" + } + ], + "name": "InvalidCancellationReceiverForSubaccountOrder", + "type": "error" + }, { "inputs": [ { @@ -1330,23 +1682,34 @@ "type": "uint256" } ], - "name": "InvalidClaimFeesInput", + "name": "InvalidClaimFundingFeesInput", "type": "error" }, { "inputs": [ { - "internalType": "uint256", - "name": "marketsLength", - "type": "uint256" + "internalType": "address", + "name": "recoveredSigner", + "type": "address" }, { - "internalType": "uint256", - "name": "tokensLength", - "type": "uint256" + "internalType": "address", + "name": "expectedSigner", + "type": "address" } ], - "name": "InvalidClaimFundingFeesInput", + "name": "InvalidClaimTermsSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "expectedSigner", + "type": "address" + } + ], + "name": "InvalidClaimTermsSignatureForContract", "type": "error" }, { @@ -1376,6 +1739,17 @@ "name": "InvalidClaimableFactor", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "InvalidClaimableReductionFactor", + "type": "error" + }, { "inputs": [ { @@ -1392,6 +1766,17 @@ "name": "InvalidCollateralTokenForMarket", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "InvalidContributorToken", + "type": "error" + }, { "inputs": [ { @@ -1455,6 +1840,22 @@ "name": "InvalidDataStreamPrices", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "spreadReductionFactor", + "type": "uint256" + } + ], + "name": "InvalidDataStreamSpreadReductionFactor", + "type": "error" + }, { "inputs": [ { @@ -1482,6 +1883,118 @@ "name": "InvalidDecreasePositionSwapType", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "bid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ask", + "type": "uint256" + } + ], + "name": "InvalidEdgeDataStreamBidAsk", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "int256", + "name": "expo", + "type": "int256" + } + ], + "name": "InvalidEdgeDataStreamExpo", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "bid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "ask", + "type": "uint256" + } + ], + "name": "InvalidEdgeDataStreamPrices", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "recoverError", + "type": "uint256" + } + ], + "name": "InvalidEdgeSignature", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidEdgeSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "eid", + "type": "uint256" + } + ], + "name": "InvalidEid", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minExecutionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxExecutionFee", + "type": "uint256" + } + ], + "name": "InvalidExecutionFee", + "type": "error" + }, { "inputs": [ { @@ -1525,6 +2038,22 @@ "name": "InvalidExternalCallTarget", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sendTokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sendAmountsLength", + "type": "uint256" + } + ], + "name": "InvalidExternalCalls", + "type": "error" + }, { "inputs": [ { @@ -1697,6 +2226,22 @@ "name": "InvalidGmSignerMinMaxPrice", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "InvalidHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitializer", + "type": "error" + }, { "inputs": [ { @@ -1839,6 +2384,28 @@ "name": "InvalidMinMaxForPrice", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "endpoint", + "type": "address" + } + ], + "name": "InvalidMultichainEndpoint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "provider", + "type": "address" + } + ], + "name": "InvalidMultichainProvider", + "type": "error" + }, { "inputs": [ { @@ -1913,7 +2480,7 @@ "inputs": [ { "internalType": "address", - "name": "receiver", + "name": "signer", "type": "address" } ], @@ -1962,6 +2529,33 @@ "name": "InvalidOutputToken", "type": "error" }, + { + "inputs": [ + { + "internalType": "string", + "name": "reason", + "type": "string" + } + ], + "name": "InvalidParams", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedSpender", + "type": "address" + } + ], + "name": "InvalidPermitSpender", + "type": "error" + }, { "inputs": [ { @@ -1984,6 +2578,22 @@ "name": "InvalidPoolValueForWithdrawal", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "distributionAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "positionImpactPoolAmount", + "type": "uint256" + } + ], + "name": "InvalidPositionImpactPoolDistributionRate", + "type": "error" + }, { "inputs": [ { @@ -2086,6 +2696,75 @@ "name": "InvalidReceiverForSubaccountOrder", "type": "error" }, + { + "inputs": [ + { + "internalType": "string", + "name": "signatureType", + "type": "string" + }, + { + "internalType": "address", + "name": "recovered", + "type": "address" + }, + { + "internalType": "address", + "name": "recoveredFromMinified", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedSigner", + "type": "address" + } + ], + "name": "InvalidRecoveredSigner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountsLength", + "type": "uint256" + } + ], + "name": "InvalidSetContributorPaymentInput", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amountsLength", + "type": "uint256" + } + ], + "name": "InvalidSetMaxTotalContributorTokenAmountInput", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "signatureType", + "type": "string" + } + ], + "name": "InvalidSignature", + "type": "error" + }, { "inputs": [ { @@ -2102,6 +2781,49 @@ "name": "InvalidSizeDeltaForAdl", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "name": "InvalidSrcChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "name": "InvalidSubaccountApprovalDesChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "storedNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + } + ], + "name": "InvalidSubaccountApprovalNonce", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidSubaccountApprovalSubaccount", + "type": "error" + }, { "inputs": [ { @@ -2156,6 +2878,17 @@ "name": "InvalidTimelockDelay", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "InvalidToken", + "type": "error" + }, { "inputs": [ { @@ -2172,6 +2905,16 @@ "name": "InvalidTokenIn", "type": "error" }, + { + "inputs": [], + "name": "InvalidTransferRequestsLength", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTrustedSignerAddress", + "type": "error" + }, { "inputs": [ { @@ -2188,6 +2931,28 @@ "name": "InvalidUiFeeFactor", "type": "error" }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "digest", + "type": "bytes32" + } + ], + "name": "InvalidUserDigest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "version", + "type": "uint256" + } + ], + "name": "InvalidVersion", + "type": "error" + }, { "inputs": [ { @@ -2289,6 +3054,27 @@ "name": "MaxAutoCancelOrdersExceeded", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "priceTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "buybackMaxPriceAge", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + } + ], + "name": "MaxBuybackPriceAgeExceeded", + "type": "error" + }, { "inputs": [ { @@ -2305,6 +3091,22 @@ "name": "MaxCallbackGasLimitExceeded", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "dataLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxDataLength", + "type": "uint256" + } + ], + "name": "MaxDataListLengthExceeded", + "type": "error" + }, { "inputs": [ { @@ -2321,6 +3123,27 @@ "name": "MaxFundingFactorPerSecondLimitExceeded", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "poolUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxLendableUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lentUsd", + "type": "uint256" + } + ], + "name": "MaxLendableFactorForWithdrawalsExceeded", + "type": "error" + }, { "inputs": [ { @@ -2427,6 +3250,22 @@ "name": "MaxRefPriceDeviationExceeded", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeUsd", + "type": "uint256" + } + ], + "name": "MaxRelayFeeSwapForSubaccountExceeded", + "type": "error" + }, { "inputs": [ { @@ -2496,6 +3335,49 @@ "name": "MaxTotalCallbackGasLimitForAutoCancelOrdersExceeded", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "totalAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTotalAmount", + "type": "uint256" + } + ], + "name": "MaxTotalContributorTokenAmountExceeded", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "interval", + "type": "uint256" + } + ], + "name": "MinContributorPaymentIntervalBelowAllowedRange", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "minPaymentInterval", + "type": "uint256" + } + ], + "name": "MinContributorPaymentIntervalNotYetPassed", + "type": "error" + }, { "inputs": [ { @@ -2618,6 +3500,11 @@ "name": "NonAtomicOracleProvider", "type": "error" }, + { + "inputs": [], + "name": "NonEmptyExternalCallsForSubaccountOrder", + "type": "error" + }, { "inputs": [ { @@ -2640,8 +3527,18 @@ "name": "OpenInterestCannotBeUpdatedForSwapOnlyMarket", "type": "error" }, + { + "inputs": [], + "name": "OraclePriceOutdated", + "type": "error" + }, { "inputs": [ + { + "internalType": "address", + "name": "oracle", + "type": "address" + }, { "internalType": "address", "name": "token", @@ -2651,6 +3548,22 @@ "name": "OracleProviderAlreadyExistsForToken", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + } + ], + "name": "OracleProviderMinChangeDelayNotYetPassed", + "type": "error" + }, { "inputs": [ { @@ -2742,6 +3655,22 @@ "name": "OrderTypeCannotBeCreated", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + } + ], + "name": "OrderValidFromTimeNotReached", + "type": "error" + }, { "inputs": [ { @@ -2875,6 +3804,38 @@ "name": "PriceImpactLargerThanOrderSize", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "lentAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "totalReductionAmount", + "type": "uint256" + } + ], + "name": "ReductionExceedsLentAmount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "calldataLength", + "type": "uint256" + } + ], + "name": "RelayCalldataTooLong", + "type": "error" + }, + { + "inputs": [], + "name": "RelayEmptyBatch", + "type": "error" + }, { "inputs": [ { @@ -2977,6 +3938,59 @@ "name": "SignalTimeNotYetPassed", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "SubaccountApprovalDeadlinePassed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + } + ], + "name": "SubaccountApprovalExpired", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "integrationId", + "type": "bytes32" + } + ], + "name": "SubaccountIntegrationIdDisabled", + "type": "error" + }, { "inputs": [ { @@ -3025,6 +4039,76 @@ "name": "SwapsNotAllowedForAtomicWithdrawal", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "marketsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "parametersLength", + "type": "uint256" + } + ], + "name": "SyncConfigInvalidInputLengths", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "marketFromData", + "type": "address" + } + ], + "name": "SyncConfigInvalidMarketFromData", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + } + ], + "name": "SyncConfigUpdatesDisabledForMarket", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "string", + "name": "parameter", + "type": "string" + } + ], + "name": "SyncConfigUpdatesDisabledForMarketParameter", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "parameter", + "type": "string" + } + ], + "name": "SyncConfigUpdatesDisabledForParameter", + "type": "error" + }, { "inputs": [], "name": "ThereMustBeAtLeastOneRoleAdmin", @@ -3035,6 +4119,11 @@ "name": "ThereMustBeAtLeastOneTimelockMultiSig", "type": "error" }, + { + "inputs": [], + "name": "TokenPermitsNotAllowedForMultichain", + "type": "error" + }, { "inputs": [ { @@ -3056,6 +4145,17 @@ "name": "TokenTransferError", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "length", + "type": "uint256" + } + ], + "name": "Uint256AsBytesLengthExceeds32Bytes", + "type": "error" + }, { "inputs": [], "name": "UnableToGetBorrowingFactorEmptyPoolUsd", @@ -3098,6 +4198,16 @@ "name": "UnableToGetOppositeToken", "type": "error" }, + { + "inputs": [], + "name": "UnableToPayOrderFee", + "type": "error" + }, + { + "inputs": [], + "name": "UnableToPayOrderFeeFromCollateral", + "type": "error" + }, { "inputs": [ { @@ -3162,6 +4272,38 @@ "name": "UnexpectedPositionState", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnexpectedRelayFeeToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnexpectedRelayFeeTokenAfterSwap", + "type": "error" + }, { "inputs": [ { @@ -3178,6 +4320,17 @@ "name": "UnexpectedTokenForVirtualInventory", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "orderType", + "type": "uint256" + } + ], + "name": "UnexpectedValidFromTime", + "type": "error" + }, { "inputs": [ { @@ -3189,6 +4342,33 @@ "name": "UnsupportedOrderType", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "orderType", + "type": "uint256" + } + ], + "name": "UnsupportedOrderTypeForAutoCancellation", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnsupportedRelayFeeToken", + "type": "error" + }, { "inputs": [ { @@ -3248,7 +4428,5 @@ "name": "WithdrawalNotFound", "type": "error" } - ], - "linkReferences": {}, - "deployedLinkReferences": {} + ] } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/DataStore.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/DataStore.json index ed8b75aa..af4759dd 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/DataStore.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/DataStore.json @@ -1,7 +1,4 @@ { - "_format": "hh-sol-artifact-1", - "contractName": "DataStore", - "sourceName": "contracts/data/DataStore.sol", "abi": [ { "inputs": [ @@ -204,6 +201,30 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "applyDeltaToUint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1434,7 +1455,5 @@ "stateMutability": "view", "type": "function" } - ], - "linkReferences": {}, - "deployedLinkReferences": {} + ] } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ERC20PermitInterface.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ERC20PermitInterface.json new file mode 100644 index 00000000..d7396d02 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ERC20PermitInterface.json @@ -0,0 +1,118 @@ +{ + "abi": [ + { + "inputs": [], + "name": "PERMIT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + } + ] +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/EventEmitter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/EventEmitter.json index 66eb0781..db462aed 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/EventEmitter.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/EventEmitter.json @@ -1,7 +1,4 @@ { - "_format": "hh-sol-artifact-1", - "contractName": "EventEmitter", - "sourceName": "contracts/event/EventEmitter.sol", "abi": [ { "inputs": [ @@ -2059,7 +2056,5 @@ "stateMutability": "view", "type": "function" } - ], - "linkReferences": {}, - "deployedLinkReferences": {} + ] } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ExchangeRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ExchangeRouter.json index 20265119..34c56df3 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ExchangeRouter.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ExchangeRouter.json @@ -1,5 +1,4 @@ { - "address": "0x69C527fC77291722b52649E45c838e41be8Bf5d5", "abi": [ { "inputs": [ @@ -142,22 +141,6 @@ "name": "EmptyTokenTranferGasLimit", "type": "error" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "marketsLength", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokensLength", - "type": "uint256" - } - ], - "name": "InvalidClaimAffiliateRewardsInput", - "type": "error" - }, { "inputs": [ { @@ -179,38 +162,6 @@ "name": "InvalidClaimCollateralInput", "type": "error" }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "marketsLength", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokensLength", - "type": "uint256" - } - ], - "name": "InvalidClaimFundingFeesInput", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "marketsLength", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "tokensLength", - "type": "uint256" - } - ], - "name": "InvalidClaimUiFeesInput", - "type": "error" - }, { "inputs": [ { @@ -353,6 +304,25 @@ "name": "Unauthorized", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, { "inputs": [ { @@ -531,44 +501,51 @@ { "components": [ { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "initialLongToken", - "type": "address" - }, - { - "internalType": "address", - "name": "initialShortToken", - "type": "address" - }, - { - "internalType": "address[]", - "name": "longTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "shortTokenSwapPath", - "type": "address[]" + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialLongToken", + "type": "address" + }, + { + "internalType": "address", + "name": "initialShortToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IDepositUtils.CreateDepositParamsAddresses", + "name": "addresses", + "type": "tuple" }, { "internalType": "uint256", @@ -589,9 +566,14 @@ "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" } ], - "internalType": "struct DepositUtils.CreateDepositParams", + "internalType": "struct IDepositUtils.CreateDepositParams", "name": "params", "type": "tuple" } @@ -729,6 +711,11 @@ "internalType": "bytes32", "name": "referralCode", "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" } ], "internalType": "struct IBaseOrderUtils.CreateOrderParams", @@ -752,29 +739,36 @@ { "components": [ { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "fromMarket", - "type": "address" - }, - { - "internalType": "address", - "name": "toMarket", - "type": "address" + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "fromMarket", + "type": "address" + }, + { + "internalType": "address", + "name": "toMarket", + "type": "address" + } + ], + "internalType": "struct IShiftUtils.CreateShiftParamsAddresses", + "name": "addresses", + "type": "tuple" }, { "internalType": "uint256", @@ -790,9 +784,14 @@ "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" } ], - "internalType": "struct ShiftUtils.CreateShiftParams", + "internalType": "struct IShiftUtils.CreateShiftParams", "name": "params", "type": "tuple" } @@ -813,34 +812,41 @@ { "components": [ { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address[]", - "name": "longTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "shortTokenSwapPath", - "type": "address[]" + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IWithdrawalUtils.CreateWithdrawalParamsAddresses", + "name": "addresses", + "type": "tuple" }, { "internalType": "uint256", @@ -866,9 +872,14 @@ "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" } ], - "internalType": "struct WithdrawalUtils.CreateWithdrawalParams", + "internalType": "struct IWithdrawalUtils.CreateWithdrawalParams", "name": "params", "type": "tuple" } @@ -928,34 +939,41 @@ { "components": [ { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address[]", - "name": "longTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "shortTokenSwapPath", - "type": "address[]" + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IWithdrawalUtils.CreateWithdrawalParamsAddresses", + "name": "addresses", + "type": "tuple" }, { "internalType": "uint256", @@ -981,9 +999,14 @@ "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" } ], - "internalType": "struct WithdrawalUtils.CreateWithdrawalParams", + "internalType": "struct IWithdrawalUtils.CreateWithdrawalParams", "name": "params", "type": "tuple" }, @@ -1053,7 +1076,7 @@ ], "name": "makeExternalCalls", "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { @@ -1679,123 +1702,5 @@ "stateMutability": "view", "type": "function" } - ], - "transactionHash": "0x723bba33993a46238da285f8900a6c411564432b8af409c3dc8d3b1f6d5c7167", - "receipt": { - "to": null, - "from": "0xE7BfFf2aB721264887230037940490351700a068", - "contractAddress": "0x69C527fC77291722b52649E45c838e41be8Bf5d5", - "transactionIndex": 6, - "gasUsed": "6362339", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xd18c90532e420963f4dc93793b032a792fdde7171138710bc41c4088e2aa5d59", - "transactionHash": "0x723bba33993a46238da285f8900a6c411564432b8af409c3dc8d3b1f6d5c7167", - "logs": [], - "blockNumber": 222747030, - "cumulativeGasUsed": "6942059", - "status": 1, - "byzantium": true - }, - "args": [ - "0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6", - "0x3c3d99FD298f679DBC2CEcd132b4eC4d0F5e6e72", - "0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8", - "0xC8ee91A54287DB53897056e12D9819156D3822Fb", - "0x321f3739983CC3E911fd67a83d1ee76238894Bd0", - "0xA19fA3F0D8E7b7A8963420De504b624167e709B2", - "0xEa90EC1228F7D1b3D47D84d1c9D46dBDFEfF7709", - "0xB0Fc2a48b873da40e7bc25658e5E6137616AC2Ee", - "0x389CEf541397e872dC04421f166B5Bc2E0b374a5" - ], - "numDeployments": 6, - "solcInputHash": "292dd15f99d7c1e4e4b27476672071d7", - "libraries": { - "CallbackUtils": "0x501e34E31f1594ffbd3D0C17634D6de6C6C5c7A3", - "DepositStoreUtils": "0x3063A99D2df2A871068D47041eB8d089E5DE1Cdc", - "FeeUtils": "0x7Fd8d13A778a22F5c2acB67226A193C7d0b0a336", - "MarketEventUtils": "0x1F493E17bcF5390d3e5E49eE0bce17d4d068f90b", - "MarketStoreUtils": "0xbbf05cF8e1c6548092A6a02c4c5330E76BF0fE2D", - "OrderStoreUtils": "0x67040c411C1b3195361801E9Ad8a91D1Fe9C0BC2", - "ReferralUtils": "0x27346Fdab142e2b8B6C6d2ecFe73e75B5e249A57", - "ShiftStoreUtils": "0xCfad9CB2a681b63884AEf98af28458692137c9E3", - "WithdrawalStoreUtils": "0xD521Cb31B14bB9F70D9a59b47D8763336CAD0395" - }, - "devdoc": { - "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", - "kind": "dev", - "methods": { - "cancelOrder(bytes32)": { - "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.", - "params": { - "key": "The unique ID of the order to be cancelled" - } - }, - "claimAffiliateRewards(address[],address[],address)": { - "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.", - "params": { - "markets": "An array of market addresses", - "receiver": "The address to which the claimed rewards should be sent", - "tokens": "An array of token addresses, corresponding to the given markets" - } - }, - "claimFundingFees(address[],address[],address)": { - "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.", - "params": { - "markets": "An array of market addresses", - "receiver": "The address to which the claimed fees should be sent", - "tokens": "An array of token addresses, corresponding to the given markets" - } - }, - "createDeposit((address,address,address,address,address,address,address[],address[],uint256,bool,uint256,uint256))": { - "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.", - "params": { - "params": "The deposit parameters, as specified in the `DepositUtils.CreateDepositParams` struct" - }, - "returns": { - "_0": "The unique ID of the newly created deposit" - } - }, - "createOrder(((address,address,address,address,address,address,address[]),(uint256,uint256,uint256,uint256,uint256,uint256,uint256),uint8,uint8,bool,bool,bool,bytes32))": { - "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." - }, - "multicall(bytes[])": { - "details": "Receives and executes a batch of function calls on this contract." - }, - "updateOrder(bytes32,uint256,uint256,uint256,uint256,bool)": { - "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.", - "params": { - "acceptablePrice": "The new acceptable price for the order", - "key": "The unique ID of the order to be updated", - "sizeDeltaUsd": "The new size delta for the order", - "triggerPrice": "The new trigger price for the order" - } - } - }, - "title": "ExchangeRouter", - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 115, - "contract": "contracts/router/ExchangeRouter.sol:ExchangeRouter", - "label": "_status", - "offset": 0, - "slot": "0", - "type": "t_uint256" - } - ], - "types": { - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GelatoRelayRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GelatoRelayRouter.json new file mode 100644 index 00000000..081aa5dd --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GelatoRelayRouter.json @@ -0,0 +1,1579 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "contract Router", + "name": "_router", + "type": "address" + }, + { + "internalType": "contract RoleStore", + "name": "_roleStore", + "type": "address" + }, + { + "internalType": "contract DataStore", + "name": "_dataStore", + "type": "address" + }, + { + "internalType": "contract EventEmitter", + "name": "_eventEmitter", + "type": "address" + }, + { + "internalType": "contract IOracle", + "name": "_oracle", + "type": "address" + }, + { + "internalType": "contract IOrderHandler", + "name": "_orderHandler", + "type": "address" + }, + { + "internalType": "contract OrderVault", + "name": "_orderVault", + "type": "address" + }, + { + "internalType": "contract ISwapHandler", + "name": "_swapHandler", + "type": "address" + }, + { + "internalType": "contract IExternalHandler", + "name": "_externalHandler", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "DeadlinePassed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "DisabledFeature", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyOrder", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyTokenTranferGasLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requiredRelayFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "availableFeeAmount", + "type": "uint256" + } + ], + "name": "InsufficientRelayFee", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sendTokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sendAmountsLength", + "type": "uint256" + } + ], + "name": "InvalidExternalCalls", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedSpender", + "type": "address" + } + ], + "name": "InvalidPermitSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "name": "InvalidSrcChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "digest", + "type": "bytes32" + } + ], + "name": "InvalidUserDigest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeUsd", + "type": "uint256" + } + ], + "name": "MaxRelayFeeSwapForSubaccountExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NonEmptyExternalCallsForSubaccountOrder", + "type": "error" + }, + { + "inputs": [], + "name": "RelayEmptyBatch", + "type": "error" + }, + { + "inputs": [], + "name": "TokenPermitsNotAllowedForMultichain", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + }, + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnexpectedRelayFeeToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnsupportedRelayFeeToken", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "cancellationReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialCollateralToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "swapPath", + "type": "address[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialCollateralDeltaAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers", + "name": "numbers", + "type": "tuple" + }, + { + "internalType": "enum Order.OrderType", + "name": "orderType", + "type": "uint8" + }, + { + "internalType": "enum Order.DecreasePositionSwapType", + "name": "decreasePositionSwapType", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "referralCode", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParams[]", + "name": "createOrderParamsList", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFeeIncrease", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.UpdateOrderParams[]", + "name": "updateOrderParamsList", + "type": "tuple[]" + }, + { + "internalType": "bytes32[]", + "name": "cancelOrderKeys", + "type": "bytes32[]" + } + ], + "internalType": "struct IRelayUtils.BatchParams", + "name": "params", + "type": "tuple" + } + ], + "name": "batch", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "cancelOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "cancellationReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialCollateralToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "swapPath", + "type": "address[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialCollateralDeltaAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers", + "name": "numbers", + "type": "tuple" + }, + { + "internalType": "enum Order.OrderType", + "name": "orderType", + "type": "uint8" + }, + { + "internalType": "enum Order.DecreasePositionSwapType", + "name": "decreasePositionSwapType", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "referralCode", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParams", + "name": "params", + "type": "tuple" + } + ], + "name": "createOrder", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "digests", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eventEmitter", + "outputs": [ + { + "internalType": "contract EventEmitter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalHandler", + "outputs": [ + { + "internalType": "contract IExternalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract IOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderHandler", + "outputs": [ + { + "internalType": "contract IOrderHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderVault", + "outputs": [ + { + "internalType": "contract OrderVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendNativeToken", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendWnt", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "swapHandler", + "outputs": [ + { + "internalType": "contract ISwapHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFeeIncrease", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.UpdateOrderParams", + "name": "params", + "type": "tuple" + } + ], + "name": "updateOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvReader.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvReader.json index ab67f5cd..e2228298 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvReader.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvReader.json @@ -1,1415 +1,1471 @@ { - "_format": "hh-sol-artifact-1", - "contractName": "GlvReader", - "sourceName": "contracts/reader/GlvReader.sol", - "abi": [ - { - "inputs": [], - "name": "EmptyMarketTokenSupply", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - } - ], - "name": "GlvNegativeMarketPoolValue", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getAccountGlvDeposits", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "initialLongToken", - "type": "address" - }, - { - "internalType": "address", - "name": "initialShortToken", - "type": "address" - }, - { - "internalType": "address[]", - "name": "longTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "shortTokenSwapPath", - "type": "address[]" - } - ], - "internalType": "struct GlvDeposit.Addresses", - "name": "addresses", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "marketTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "initialLongTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "initialShortTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minGlvTokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "updatedAtTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "executionFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "callbackGasLimit", - "type": "uint256" - } - ], - "internalType": "struct GlvDeposit.Numbers", - "name": "numbers", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "bool", - "name": "shouldUnwrapNativeToken", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isMarketTokenDeposit", - "type": "bool" - } - ], - "internalType": "struct GlvDeposit.Flags", - "name": "flags", - "type": "tuple" - } - ], - "internalType": "struct GlvDeposit.Props[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getAccountGlvWithdrawals", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address[]", - "name": "longTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "shortTokenSwapPath", - "type": "address[]" - } - ], - "internalType": "struct GlvWithdrawal.Addresses", - "name": "addresses", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "glvTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minLongTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minShortTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "updatedAtTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "executionFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "callbackGasLimit", - "type": "uint256" - } - ], - "internalType": "struct GlvWithdrawal.Numbers", - "name": "numbers", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "bool", - "name": "shouldUnwrapNativeToken", - "type": "bool" - } - ], - "internalType": "struct GlvWithdrawal.Flags", - "name": "flags", - "type": "tuple" - } - ], - "internalType": "struct GlvWithdrawal.Props[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "address", - "name": "glv", - "type": "address" - } - ], - "name": "getGlv", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "glvToken", - "type": "address" - }, - { - "internalType": "address", - "name": "longToken", - "type": "address" - }, - { - "internalType": "address", - "name": "shortToken", - "type": "address" - } - ], - "internalType": "struct Glv.Props", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "getGlvBySalt", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "glvToken", - "type": "address" - }, - { - "internalType": "address", - "name": "longToken", - "type": "address" - }, - { - "internalType": "address", - "name": "shortToken", - "type": "address" - } - ], - "internalType": "struct Glv.Props", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - } - ], - "name": "getGlvDeposit", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "initialLongToken", - "type": "address" - }, - { - "internalType": "address", - "name": "initialShortToken", - "type": "address" - }, - { - "internalType": "address[]", - "name": "longTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "shortTokenSwapPath", - "type": "address[]" - } - ], - "internalType": "struct GlvDeposit.Addresses", - "name": "addresses", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "marketTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "initialLongTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "initialShortTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minGlvTokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "updatedAtTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "executionFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "callbackGasLimit", - "type": "uint256" - } - ], - "internalType": "struct GlvDeposit.Numbers", - "name": "numbers", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "bool", - "name": "shouldUnwrapNativeToken", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isMarketTokenDeposit", - "type": "bool" - } - ], - "internalType": "struct GlvDeposit.Flags", - "name": "flags", - "type": "tuple" - } - ], - "internalType": "struct GlvDeposit.Props", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getGlvDeposits", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "initialLongToken", - "type": "address" - }, - { - "internalType": "address", - "name": "initialShortToken", - "type": "address" - }, - { - "internalType": "address[]", - "name": "longTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "shortTokenSwapPath", - "type": "address[]" - } - ], - "internalType": "struct GlvDeposit.Addresses", - "name": "addresses", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "marketTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "initialLongTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "initialShortTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minGlvTokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "updatedAtTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "executionFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "callbackGasLimit", - "type": "uint256" - } - ], - "internalType": "struct GlvDeposit.Numbers", - "name": "numbers", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "bool", - "name": "shouldUnwrapNativeToken", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isMarketTokenDeposit", - "type": "bool" - } - ], - "internalType": "struct GlvDeposit.Flags", - "name": "flags", - "type": "tuple" - } - ], - "internalType": "struct GlvDeposit.Props[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "address", - "name": "glv", - "type": "address" - } - ], - "name": "getGlvInfo", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "glvToken", - "type": "address" - }, - { - "internalType": "address", - "name": "longToken", - "type": "address" - }, - { - "internalType": "address", - "name": "shortToken", - "type": "address" - } - ], - "internalType": "struct Glv.Props", - "name": "glv", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "markets", - "type": "address[]" - } - ], - "internalType": "struct GlvReader.GlvInfo", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getGlvInfoList", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "glvToken", - "type": "address" - }, - { - "internalType": "address", - "name": "longToken", - "type": "address" - }, - { - "internalType": "address", - "name": "shortToken", - "type": "address" - } - ], - "internalType": "struct Glv.Props", - "name": "glv", - "type": "tuple" - }, - { - "internalType": "address[]", - "name": "markets", - "type": "address[]" - } - ], - "internalType": "struct GlvReader.GlvInfo[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - } - ], - "name": "getGlvShift", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "address", - "name": "fromMarket", - "type": "address" - }, - { - "internalType": "address", - "name": "toMarket", - "type": "address" - } - ], - "internalType": "struct GlvShift.Addresses", - "name": "addresses", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "marketTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minMarketTokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "updatedAtTime", - "type": "uint256" - } - ], - "internalType": "struct GlvShift.Numbers", - "name": "numbers", - "type": "tuple" - } - ], - "internalType": "struct GlvShift.Props", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getGlvShifts", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "address", - "name": "fromMarket", - "type": "address" - }, - { - "internalType": "address", - "name": "toMarket", - "type": "address" - } - ], - "internalType": "struct GlvShift.Addresses", - "name": "addresses", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "marketTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minMarketTokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "updatedAtTime", - "type": "uint256" - } - ], - "internalType": "struct GlvShift.Numbers", - "name": "numbers", - "type": "tuple" - } - ], - "internalType": "struct GlvShift.Props[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "address[]", - "name": "marketAddresses", - "type": "address[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "internalType": "struct Price.Props[]", - "name": "indexTokenPrices", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "internalType": "struct Price.Props", - "name": "longTokenPrice", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "internalType": "struct Price.Props", - "name": "shortTokenPrice", - "type": "tuple" - }, - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "bool", - "name": "maximize", - "type": "bool" - } - ], - "name": "getGlvTokenPrice", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "address[]", - "name": "marketAddresses", - "type": "address[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "internalType": "struct Price.Props[]", - "name": "indexTokenPrices", - "type": "tuple[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "internalType": "struct Price.Props", - "name": "longTokenPrice", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "internalType": "struct Price.Props", - "name": "shortTokenPrice", - "type": "tuple" - }, - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "bool", - "name": "maximize", - "type": "bool" - } - ], - "name": "getGlvValue", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - } - ], - "name": "getGlvWithdrawal", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address[]", - "name": "longTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "shortTokenSwapPath", - "type": "address[]" - } - ], - "internalType": "struct GlvWithdrawal.Addresses", - "name": "addresses", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "glvTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minLongTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minShortTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "updatedAtTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "executionFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "callbackGasLimit", - "type": "uint256" - } - ], - "internalType": "struct GlvWithdrawal.Numbers", - "name": "numbers", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "bool", - "name": "shouldUnwrapNativeToken", - "type": "bool" - } - ], - "internalType": "struct GlvWithdrawal.Flags", - "name": "flags", - "type": "tuple" - } - ], - "internalType": "struct GlvWithdrawal.Props", - "name": "", - "type": "tuple" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getGlvWithdrawals", - "outputs": [ - { - "components": [ - { - "components": [ - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address[]", - "name": "longTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "shortTokenSwapPath", - "type": "address[]" - } - ], - "internalType": "struct GlvWithdrawal.Addresses", - "name": "addresses", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "glvTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minLongTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minShortTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "updatedAtTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "executionFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "callbackGasLimit", - "type": "uint256" - } - ], - "internalType": "struct GlvWithdrawal.Numbers", - "name": "numbers", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "bool", - "name": "shouldUnwrapNativeToken", - "type": "bool" - } - ], - "internalType": "struct GlvWithdrawal.Flags", - "name": "flags", - "type": "tuple" - } - ], - "internalType": "struct GlvWithdrawal.Props[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "contract DataStore", - "name": "dataStore", - "type": "address" - }, - { - "internalType": "uint256", - "name": "start", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "end", - "type": "uint256" - } - ], - "name": "getGlvs", - "outputs": [ - { - "components": [ - { - "internalType": "address", - "name": "glvToken", - "type": "address" - }, - { - "internalType": "address", - "name": "longToken", - "type": "address" - }, - { - "internalType": "address", - "name": "shortToken", - "type": "address" - } - ], - "internalType": "struct Glv.Props[]", - "name": "", - "type": "tuple[]" - } - ], - "stateMutability": "view", - "type": "function" - } - ] - } - \ No newline at end of file + "abi": [ + { + "inputs": [], + "name": "EmptyMarketTokenSupply", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + } + ], + "name": "GlvNegativeMarketPoolValue", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getAccountGlvDeposits", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialLongToken", + "type": "address" + }, + { + "internalType": "address", + "name": "initialShortToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct GlvDeposit.Addresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "marketTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialLongTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialShortTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minGlvTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "updatedAtTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "internalType": "struct GlvDeposit.Numbers", + "name": "numbers", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isMarketTokenDeposit", + "type": "bool" + } + ], + "internalType": "struct GlvDeposit.Flags", + "name": "flags", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct GlvDeposit.Props[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getAccountGlvWithdrawals", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct GlvWithdrawal.Addresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "glvTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minLongTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShortTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "updatedAtTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "internalType": "struct GlvWithdrawal.Numbers", + "name": "numbers", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + } + ], + "internalType": "struct GlvWithdrawal.Flags", + "name": "flags", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct GlvWithdrawal.Props[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "address", + "name": "glv", + "type": "address" + } + ], + "name": "getGlv", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "glvToken", + "type": "address" + }, + { + "internalType": "address", + "name": "longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "shortToken", + "type": "address" + } + ], + "internalType": "struct Glv.Props", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "getGlvBySalt", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "glvToken", + "type": "address" + }, + { + "internalType": "address", + "name": "longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "shortToken", + "type": "address" + } + ], + "internalType": "struct Glv.Props", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getGlvDeposit", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialLongToken", + "type": "address" + }, + { + "internalType": "address", + "name": "initialShortToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct GlvDeposit.Addresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "marketTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialLongTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialShortTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minGlvTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "updatedAtTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "internalType": "struct GlvDeposit.Numbers", + "name": "numbers", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isMarketTokenDeposit", + "type": "bool" + } + ], + "internalType": "struct GlvDeposit.Flags", + "name": "flags", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct GlvDeposit.Props", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getGlvDeposits", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialLongToken", + "type": "address" + }, + { + "internalType": "address", + "name": "initialShortToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct GlvDeposit.Addresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "marketTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialLongTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialShortTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minGlvTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "updatedAtTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "internalType": "struct GlvDeposit.Numbers", + "name": "numbers", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isMarketTokenDeposit", + "type": "bool" + } + ], + "internalType": "struct GlvDeposit.Flags", + "name": "flags", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct GlvDeposit.Props[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "address", + "name": "glv", + "type": "address" + } + ], + "name": "getGlvInfo", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glvToken", + "type": "address" + }, + { + "internalType": "address", + "name": "longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "shortToken", + "type": "address" + } + ], + "internalType": "struct Glv.Props", + "name": "glv", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "markets", + "type": "address[]" + } + ], + "internalType": "struct GlvReader.GlvInfo", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getGlvInfoList", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glvToken", + "type": "address" + }, + { + "internalType": "address", + "name": "longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "shortToken", + "type": "address" + } + ], + "internalType": "struct Glv.Props", + "name": "glv", + "type": "tuple" + }, + { + "internalType": "address[]", + "name": "markets", + "type": "address[]" + } + ], + "internalType": "struct GlvReader.GlvInfo[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getGlvShift", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address", + "name": "fromMarket", + "type": "address" + }, + { + "internalType": "address", + "name": "toMarket", + "type": "address" + } + ], + "internalType": "struct GlvShift.Addresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "marketTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minMarketTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "updatedAtTime", + "type": "uint256" + } + ], + "internalType": "struct GlvShift.Numbers", + "name": "numbers", + "type": "tuple" + } + ], + "internalType": "struct GlvShift.Props", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getGlvShifts", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address", + "name": "fromMarket", + "type": "address" + }, + { + "internalType": "address", + "name": "toMarket", + "type": "address" + } + ], + "internalType": "struct GlvShift.Addresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "marketTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minMarketTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "updatedAtTime", + "type": "uint256" + } + ], + "internalType": "struct GlvShift.Numbers", + "name": "numbers", + "type": "tuple" + } + ], + "internalType": "struct GlvShift.Props[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "address[]", + "name": "marketAddresses", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props[]", + "name": "indexTokenPrices", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props", + "name": "longTokenPrice", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props", + "name": "shortTokenPrice", + "type": "tuple" + }, + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "bool", + "name": "maximize", + "type": "bool" + } + ], + "name": "getGlvTokenPrice", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "address[]", + "name": "marketAddresses", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props[]", + "name": "indexTokenPrices", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props", + "name": "longTokenPrice", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props", + "name": "shortTokenPrice", + "type": "tuple" + }, + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "bool", + "name": "maximize", + "type": "bool" + } + ], + "name": "getGlvValue", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "getGlvWithdrawal", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct GlvWithdrawal.Addresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "glvTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minLongTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShortTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "updatedAtTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "internalType": "struct GlvWithdrawal.Numbers", + "name": "numbers", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + } + ], + "internalType": "struct GlvWithdrawal.Flags", + "name": "flags", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct GlvWithdrawal.Props", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getGlvWithdrawals", + "outputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct GlvWithdrawal.Addresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "glvTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minLongTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShortTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "updatedAtTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "internalType": "struct GlvWithdrawal.Numbers", + "name": "numbers", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + } + ], + "internalType": "struct GlvWithdrawal.Flags", + "name": "flags", + "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct GlvWithdrawal.Props[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "uint256", + "name": "start", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "end", + "type": "uint256" + } + ], + "name": "getGlvs", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "glvToken", + "type": "address" + }, + { + "internalType": "address", + "name": "longToken", + "type": "address" + }, + { + "internalType": "address", + "name": "shortToken", + "type": "address" + } + ], + "internalType": "struct Glv.Props[]", + "name": "", + "type": "tuple[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvRouter.json index 1862af97..f8a34452 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvRouter.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GlvRouter.json @@ -1,707 +1,764 @@ { - "_format": "hh-sol-artifact-1", - "contractName": "GlvRouter", - "sourceName": "contracts/router/GlvRouter.sol", - "abi": [ - { - "inputs": [ - { - "internalType": "contract Router", - "name": "_router", - "type": "address" - }, - { - "internalType": "contract RoleStore", - "name": "_roleStore", - "type": "address" - }, - { - "internalType": "contract DataStore", - "name": "_dataStore", - "type": "address" - }, - { - "internalType": "contract EventEmitter", - "name": "_eventEmitter", - "type": "address" - }, - { - "internalType": "contract IGlvHandler", - "name": "_glvHandler", - "type": "address" - }, - { - "internalType": "contract IExternalHandler", - "name": "_externalHandler", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "inputs": [], - "name": "EmptyGlvDeposit", - "type": "error" - }, - { - "inputs": [], - "name": "EmptyGlvWithdrawal", - "type": "error" - }, - { - "inputs": [], - "name": "EmptyHoldingAddress", - "type": "error" - }, - { - "inputs": [], - "name": "EmptyReceiver", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - } - ], - "name": "EmptyTokenTranferGasLimit", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "msgSender", - "type": "address" - } - ], - "name": "InvalidNativeTokenSender", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "TokenTransferError", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "msgSender", - "type": "address" - }, - { - "internalType": "string", - "name": "role", - "type": "string" - } - ], - "name": "Unauthorized", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - } - ], - "name": "cancelGlvDeposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - } - ], - "name": "cancelGlvWithdrawal", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "initialLongToken", - "type": "address" - }, - { - "internalType": "address", - "name": "initialShortToken", - "type": "address" - }, - { - "internalType": "address[]", - "name": "longTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "shortTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "minGlvTokens", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "executionFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "callbackGasLimit", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "shouldUnwrapNativeToken", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isMarketTokenDeposit", - "type": "bool" - } - ], - "internalType": "struct GlvDepositUtils.CreateGlvDepositParams", - "name": "params", - "type": "tuple" - } - ], - "name": "createGlvDeposit", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "glv", - "type": "address" - }, - { - "internalType": "address[]", - "name": "longTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "shortTokenSwapPath", - "type": "address[]" - }, - { - "internalType": "uint256", - "name": "minLongTokenAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minShortTokenAmount", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "shouldUnwrapNativeToken", - "type": "bool" - }, - { - "internalType": "uint256", - "name": "executionFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "callbackGasLimit", - "type": "uint256" - } - ], - "internalType": "struct GlvWithdrawalUtils.CreateGlvWithdrawalParams", - "name": "params", - "type": "tuple" - } - ], - "name": "createGlvWithdrawal", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "dataStore", - "outputs": [ - { - "internalType": "contract DataStore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "eventEmitter", - "outputs": [ - { - "internalType": "contract EventEmitter", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "externalHandler", - "outputs": [ - { - "internalType": "contract IExternalHandler", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "glvHandler", - "outputs": [ - { - "internalType": "contract IGlvHandler", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address[]", - "name": "externalCallTargets", - "type": "address[]" - }, - { - "internalType": "bytes[]", - "name": "externalCallDataList", - "type": "bytes[]" - }, - { - "internalType": "address[]", - "name": "refundTokens", - "type": "address[]" - }, - { - "internalType": "address[]", - "name": "refundReceivers", - "type": "address[]" - } - ], - "name": "makeExternalCalls", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes[]", - "name": "data", - "type": "bytes[]" - } - ], - "name": "multicall", - "outputs": [ - { - "internalType": "bytes[]", - "name": "results", - "type": "bytes[]" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "roleStore", - "outputs": [ - { - "internalType": "contract RoleStore", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "router", - "outputs": [ - { - "internalType": "contract Router", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "sendNativeToken", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "token", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "sendTokens", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "sendWnt", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "address[]", - "name": "primaryTokens", - "type": "address[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "internalType": "struct Price.Props[]", - "name": "primaryPrices", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "minTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxTimestamp", - "type": "uint256" - } - ], - "internalType": "struct OracleUtils.SimulatePricesParams", - "name": "simulatedOracleParams", - "type": "tuple" - } - ], - "name": "simulateExecuteGlvDeposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "key", - "type": "bytes32" - }, - { - "components": [ - { - "internalType": "address[]", - "name": "primaryTokens", - "type": "address[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "internalType": "struct Price.Props[]", - "name": "primaryPrices", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "minTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxTimestamp", - "type": "uint256" - } - ], - "internalType": "struct OracleUtils.SimulatePricesParams", - "name": "simulatedOracleParams", - "type": "tuple" - } - ], - "name": "simulateExecuteGlvWithdrawal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address[]", - "name": "primaryTokens", - "type": "address[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "internalType": "struct Price.Props[]", - "name": "primaryPrices", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "minTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxTimestamp", - "type": "uint256" - } - ], - "internalType": "struct OracleUtils.SimulatePricesParams", - "name": "simulatedOracleParams", - "type": "tuple" - } - ], - "name": "simulateExecuteLatestGlvDeposit", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "address[]", - "name": "primaryTokens", - "type": "address[]" - }, - { - "components": [ - { - "internalType": "uint256", - "name": "min", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "max", - "type": "uint256" - } - ], - "internalType": "struct Price.Props[]", - "name": "primaryPrices", - "type": "tuple[]" - }, - { - "internalType": "uint256", - "name": "minTimestamp", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxTimestamp", - "type": "uint256" - } - ], - "internalType": "struct OracleUtils.SimulatePricesParams", - "name": "simulatedOracleParams", - "type": "tuple" - } - ], - "name": "simulateExecuteLatestGlvWithdrawal", - "outputs": [], - "stateMutability": "payable", - "type": "function" - }, - { - "stateMutability": "payable", - "type": "receive" - } - ] - } - \ No newline at end of file + "abi": [ + { + "inputs": [ + { + "internalType": "contract Router", + "name": "_router", + "type": "address" + }, + { + "internalType": "contract RoleStore", + "name": "_roleStore", + "type": "address" + }, + { + "internalType": "contract DataStore", + "name": "_dataStore", + "type": "address" + }, + { + "internalType": "contract EventEmitter", + "name": "_eventEmitter", + "type": "address" + }, + { + "internalType": "contract IGlvDepositHandler", + "name": "_glvDepositHandler", + "type": "address" + }, + { + "internalType": "contract IGlvWithdrawalHandler", + "name": "_glvWithdrawalHandler", + "type": "address" + }, + { + "internalType": "contract IExternalHandler", + "name": "_externalHandler", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "EmptyGlvDeposit", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyGlvWithdrawal", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyTokenTranferGasLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + } + ], + "name": "InvalidNativeTokenSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + }, + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "cancelGlvDeposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "cancelGlvWithdrawal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "initialLongToken", + "type": "address" + }, + { + "internalType": "address", + "name": "initialShortToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IGlvDepositUtils.CreateGlvDepositParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "minGlvTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isMarketTokenDeposit", + "type": "bool" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IGlvDepositUtils.CreateGlvDepositParams", + "name": "params", + "type": "tuple" + } + ], + "name": "createGlvDeposit", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IGlvWithdrawalUtils.CreateGlvWithdrawalParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "minLongTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShortTokenAmount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IGlvWithdrawalUtils.CreateGlvWithdrawalParams", + "name": "params", + "type": "tuple" + } + ], + "name": "createGlvWithdrawal", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eventEmitter", + "outputs": [ + { + "internalType": "contract EventEmitter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalHandler", + "outputs": [ + { + "internalType": "contract IExternalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "glvDepositHandler", + "outputs": [ + { + "internalType": "contract IGlvDepositHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "glvWithdrawalHandler", + "outputs": [ + { + "internalType": "contract IGlvWithdrawalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "name": "makeExternalCalls", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendNativeToken", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendWnt", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "primaryTokens", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props[]", + "name": "primaryPrices", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "minTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTimestamp", + "type": "uint256" + } + ], + "internalType": "struct OracleUtils.SimulatePricesParams", + "name": "simulatedOracleParams", + "type": "tuple" + } + ], + "name": "simulateExecuteGlvDeposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "primaryTokens", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props[]", + "name": "primaryPrices", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "minTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTimestamp", + "type": "uint256" + } + ], + "internalType": "struct OracleUtils.SimulatePricesParams", + "name": "simulatedOracleParams", + "type": "tuple" + } + ], + "name": "simulateExecuteGlvWithdrawal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address[]", + "name": "primaryTokens", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props[]", + "name": "primaryPrices", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "minTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTimestamp", + "type": "uint256" + } + ], + "internalType": "struct OracleUtils.SimulatePricesParams", + "name": "simulatedOracleParams", + "type": "tuple" + } + ], + "name": "simulateExecuteLatestGlvDeposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address[]", + "name": "primaryTokens", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props[]", + "name": "primaryPrices", + "type": "tuple[]" + }, + { + "internalType": "uint256", + "name": "minTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxTimestamp", + "type": "uint256" + } + ], + "internalType": "struct OracleUtils.SimulatePricesParams", + "name": "simulatedOracleParams", + "type": "tuple" + } + ], + "name": "simulateExecuteLatestGlvWithdrawal", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GovToken.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GovToken.json index 003eeaee..88796b13 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GovToken.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/GovToken.json @@ -1,5 +1,4 @@ { - "address": "0x2A29D3a792000750807cc401806d6fd539928481", "abi": [ { "inputs": [ @@ -765,357 +764,5 @@ "stateMutability": "nonpayable", "type": "function" } - ], - "transactionHash": "0xf41d2b874807c8dea4d0b21d1215669c990495bda5cdfa8ef7bb822e6edf3043", - "receipt": { - "to": null, - "from": "0xE7BfFf2aB721264887230037940490351700a068", - "contractAddress": "0x2A29D3a792000750807cc401806d6fd539928481", - "transactionIndex": 1, - "gasUsed": "15199775", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc6e67e18e1c484c3ddd3cd5db795adc007a2633bf83bfc7d1c28ee352d90f9f6", - "transactionHash": "0xf41d2b874807c8dea4d0b21d1215669c990495bda5cdfa8ef7bb822e6edf3043", - "logs": [], - "blockNumber": 168596066, - "cumulativeGasUsed": "15199775", - "status": 1, - "byzantium": true - }, - "args": [ - "0x3c3d99FD298f679DBC2CEcd132b4eC4d0F5e6e72", - "GMX DAO", - "GMX_DAO", - 18 - ], - "numDeployments": 1, - "solcInputHash": "ddb2cd26020caa6335eda5082c5c80ae", - "libraries": {}, - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "DelegateChanged(address,address,address)": { - "details": "Emitted when an account changes their delegate." - }, - "DelegateVotesChanged(address,uint256,uint256)": { - "details": "Emitted when a token transfer or delegate change results in changes to a delegate's number of votes." - }, - "EIP712DomainChanged()": { - "details": "MAY be emitted to signal that the domain could have changed." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": { - "CLOCK_MODE()": { - "details": "Description of the clock" - }, - "DOMAIN_SEPARATOR()": { - "details": "See {IERC20Permit-DOMAIN_SEPARATOR}." - }, - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "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." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "checkpoints(address,uint32)": { - "details": "Get the `pos`-th checkpoint for `account`." - }, - "clock()": { - "details": "Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting)." - }, - "decimals()": { - "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}." - }, - "decreaseAllowance(address,uint256)": { - "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`." - }, - "delegate(address)": { - "details": "Delegate votes from the sender to `delegatee`." - }, - "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": { - "details": "Delegates votes from signer to `delegatee`" - }, - "delegates(address)": { - "details": "Get the address `account` is currently delegating to." - }, - "eip712Domain()": { - "details": "See {EIP-5267}. _Available since v4.9._" - }, - "getPastTotalSupply(uint256)": { - "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" - }, - "getPastVotes(address,uint256)": { - "details": "Retrieve the number of votes for `account` at the end of `timepoint`. Requirements: - `timepoint` must be in the past" - }, - "getVotes(address)": { - "details": "Gets the current votes balance for `account`" - }, - "increaseAllowance(address,uint256)": { - "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." - }, - "name()": { - "details": "Returns the name of the token." - }, - "nonces(address)": { - "details": "See {IERC20Permit-nonces}." - }, - "numCheckpoints(address)": { - "details": "Get number of checkpoints for `account`." - }, - "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": { - "details": "See {IERC20Permit-permit}." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - }, - "transferFrom(address,address,uint256)": { - "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`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 207, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 213, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 215, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 217, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 219, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - }, - { - "astId": 3579, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_nameFallback", - "offset": 0, - "slot": "5", - "type": "t_string_storage" - }, - { - "astId": 3581, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_versionFallback", - "offset": 0, - "slot": "6", - "type": "t_string_storage" - }, - { - "astId": 879, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_nonces", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_address,t_struct(Counter)2557_storage)" - }, - { - "astId": 887, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", - "offset": 0, - "slot": "8", - "type": "t_bytes32" - }, - { - "astId": 1054, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_delegates", - "offset": 0, - "slot": "9", - "type": "t_mapping(t_address,t_address)" - }, - { - "astId": 1060, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_checkpoints", - "offset": 0, - "slot": "10", - "type": "t_mapping(t_address,t_array(t_struct(Checkpoint)1045_storage)dyn_storage)" - }, - { - "astId": 1064, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_totalSupplyCheckpoints", - "offset": 0, - "slot": "11", - "type": "t_array(t_struct(Checkpoint)1045_storage)dyn_storage" - }, - { - "astId": 27701, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_decimals", - "offset": 0, - "slot": "12", - "type": "t_uint8" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_array(t_struct(Checkpoint)1045_storage)dyn_storage": { - "base": "t_struct(Checkpoint)1045_storage", - "encoding": "dynamic_array", - "label": "struct ERC20Votes.Checkpoint[]", - "numberOfBytes": "32" - }, - "t_bytes32": { - "encoding": "inplace", - "label": "bytes32", - "numberOfBytes": "32" - }, - "t_mapping(t_address,t_address)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => address)", - "numberOfBytes": "32", - "value": "t_address" - }, - "t_mapping(t_address,t_array(t_struct(Checkpoint)1045_storage)dyn_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct ERC20Votes.Checkpoint[])", - "numberOfBytes": "32", - "value": "t_array(t_struct(Checkpoint)1045_storage)dyn_storage" - }, - "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_struct(Counter)2557_storage)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => struct Counters.Counter)", - "numberOfBytes": "32", - "value": "t_struct(Counter)2557_storage" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_struct(Checkpoint)1045_storage": { - "encoding": "inplace", - "label": "struct ERC20Votes.Checkpoint", - "members": [ - { - "astId": 1042, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "fromBlock", - "offset": 0, - "slot": "0", - "type": "t_uint32" - }, - { - "astId": 1044, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "votes", - "offset": 4, - "slot": "0", - "type": "t_uint224" - } - ], - "numberOfBytes": "32" - }, - "t_struct(Counter)2557_storage": { - "encoding": "inplace", - "label": "struct Counters.Counter", - "members": [ - { - "astId": 2556, - "contract": "contracts/gov/GovToken.sol:GovToken", - "label": "_value", - "offset": 0, - "slot": "0", - "type": "t_uint256" - } - ], - "numberOfBytes": "32" - }, - "t_uint224": { - "encoding": "inplace", - "label": "uint224", - "numberOfBytes": "28" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint32": { - "encoding": "inplace", - "label": "uint32", - "numberOfBytes": "4" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file + ] +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/LayerZeroProvider.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/LayerZeroProvider.json new file mode 100644 index 00000000..288d23a3 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/LayerZeroProvider.json @@ -0,0 +1,372 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "_dataStore", + "type": "address" + }, + { + "internalType": "contract RoleStore", + "name": "_roleStore", + "type": "address" + }, + { + "internalType": "contract EventEmitter", + "name": "_eventEmitter", + "type": "address" + }, + { + "internalType": "contract MultichainVault", + "name": "_multichainVault", + "type": "address" + }, + { + "internalType": "contract IMultichainGmRouter", + "name": "_multichainGmRouter", + "type": "address" + }, + { + "internalType": "contract IMultichainGlvRouter", + "name": "_multichainGlvRouter", + "type": "address" + }, + { + "internalType": "contract IMultichainOrderRouter", + "name": "_multichainOrderRouter", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "EmptyHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyTokenTranferGasLimit", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyWithdrawalAmount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "gas", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "estimatedGasLimit", + "type": "uint256" + } + ], + "name": "InsufficientGasLeft", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "InvalidBridgeOutToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "eid", + "type": "uint256" + } + ], + "name": "InvalidEid", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + }, + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct IRelayUtils.BridgeOutParams", + "name": "params", + "type": "tuple" + } + ], + "name": "bridgeOut", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eventEmitter", + "outputs": [ + { + "internalType": "contract EventEmitter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "message", + "type": "bytes" + }, + { + "internalType": "address", + "name": "", + "type": "address" + }, + { + "internalType": "bytes", + "name": "", + "type": "bytes" + } + ], + "name": "lzCompose", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "multichainGlvRouter", + "outputs": [ + { + "internalType": "contract IMultichainGlvRouter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "multichainGmRouter", + "outputs": [ + { + "internalType": "contract IMultichainGmRouter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "multichainOrderRouter", + "outputs": [ + { + "internalType": "contract IMultichainOrderRouter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "multichainVault", + "outputs": [ + { + "internalType": "contract MultichainVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "withdrawTokens", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Multicall.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Multicall.json index da2ad0a4..df416504 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Multicall.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/Multicall.json @@ -1,7 +1,4 @@ { - "_format": "hh-sol-artifact-1", - "contractName": "Multicall2", - "sourceName": "contracts/mock/Multicall2.sol", "abi": [ { "inputs": [ @@ -18,7 +15,7 @@ "type": "bytes" } ], - "internalType": "struct Multicall2.Call[]", + "internalType": "struct Multicall3.Call[]", "name": "calls", "type": "tuple[]" } @@ -36,7 +33,108 @@ "type": "bytes[]" } ], - "stateMutability": "nonpayable", + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowFailure", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + } + ], + "internalType": "struct Multicall3.Call3[]", + "name": "calls", + "type": "tuple[]" + } + ], + "name": "aggregate3", + "outputs": [ + { + "components": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "internalType": "struct Multicall3.Result[]", + "name": "returnData", + "type": "tuple[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "target", + "type": "address" + }, + { + "internalType": "bool", + "name": "allowFailure", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "callData", + "type": "bytes" + } + ], + "internalType": "struct Multicall3.Call3Value[]", + "name": "calls", + "type": "tuple[]" + } + ], + "name": "aggregate3Value", + "outputs": [ + { + "components": [ + { + "internalType": "bool", + "name": "success", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "returnData", + "type": "bytes" + } + ], + "internalType": "struct Multicall3.Result[]", + "name": "returnData", + "type": "tuple[]" + } + ], + "stateMutability": "payable", "type": "function" }, { @@ -54,7 +152,7 @@ "type": "bytes" } ], - "internalType": "struct Multicall2.Call[]", + "internalType": "struct Multicall3.Call[]", "name": "calls", "type": "tuple[]" } @@ -84,12 +182,25 @@ "type": "bytes" } ], - "internalType": "struct Multicall2.Result[]", + "internalType": "struct Multicall3.Result[]", "name": "returnData", "type": "tuple[]" } ], - "stateMutability": "nonpayable", + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "getBasefee", + "outputs": [ + { + "internalType": "uint256", + "name": "basefee", + "type": "uint256" + } + ], + "stateMutability": "view", "type": "function" }, { @@ -126,12 +237,12 @@ }, { "inputs": [], - "name": "getCurrentBlockCoinbase", + "name": "getChainId", "outputs": [ { - "internalType": "address", - "name": "coinbase", - "type": "address" + "internalType": "uint256", + "name": "chainid", + "type": "uint256" } ], "stateMutability": "view", @@ -139,12 +250,12 @@ }, { "inputs": [], - "name": "getCurrentBlockDifficulty", + "name": "getCurrentBlockCoinbase", "outputs": [ { - "internalType": "uint256", - "name": "difficulty", - "type": "uint256" + "internalType": "address", + "name": "coinbase", + "type": "address" } ], "stateMutability": "view", @@ -195,19 +306,6 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "getL1BlockNumber", - "outputs": [ - { - "internalType": "uint256", - "name": "l1BlockNumber", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], "name": "getLastBlockHash", @@ -241,7 +339,7 @@ "type": "bytes" } ], - "internalType": "struct Multicall2.Call[]", + "internalType": "struct Multicall3.Call[]", "name": "calls", "type": "tuple[]" } @@ -261,12 +359,12 @@ "type": "bytes" } ], - "internalType": "struct Multicall2.Result[]", + "internalType": "struct Multicall3.Result[]", "name": "returnData", "type": "tuple[]" } ], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" }, { @@ -289,7 +387,7 @@ "type": "bytes" } ], - "internalType": "struct Multicall2.Call[]", + "internalType": "struct Multicall3.Call[]", "name": "calls", "type": "tuple[]" } @@ -319,15 +417,13 @@ "type": "bytes" } ], - "internalType": "struct Multicall2.Result[]", + "internalType": "struct Multicall3.Result[]", "name": "returnData", "type": "tuple[]" } ], - "stateMutability": "nonpayable", + "stateMutability": "payable", "type": "function" } - ], - "linkReferences": {}, - "deployedLinkReferences": {} -} + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainClaimsRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainClaimsRouter.json new file mode 100644 index 00000000..9f8fff6d --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainClaimsRouter.json @@ -0,0 +1,1266 @@ +{ + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "contract Router", + "name": "router", + "type": "address" + }, + { + "internalType": "contract RoleStore", + "name": "roleStore", + "type": "address" + }, + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "contract EventEmitter", + "name": "eventEmitter", + "type": "address" + }, + { + "internalType": "contract IOracle", + "name": "oracle", + "type": "address" + }, + { + "internalType": "contract OrderVault", + "name": "orderVault", + "type": "address" + }, + { + "internalType": "contract IOrderHandler", + "name": "orderHandler", + "type": "address" + }, + { + "internalType": "contract ISwapHandler", + "name": "swapHandler", + "type": "address" + }, + { + "internalType": "contract IExternalHandler", + "name": "externalHandler", + "type": "address" + }, + { + "internalType": "contract MultichainVault", + "name": "multichainVault", + "type": "address" + } + ], + "internalType": "struct MultichainRouter.BaseConstructorParams", + "name": "params", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "adjustedClaimableAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimedAmount", + "type": "uint256" + } + ], + "name": "CollateralAlreadyClaimed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "DeadlinePassed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "DisabledFeature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + } + ], + "name": "DisabledMarket", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyAddressInMarketTokenBalanceValidation", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyMarket", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyTokenTranferGasLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requiredRelayFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "availableFeeAmount", + "type": "uint256" + } + ], + "name": "InsufficientRelayFee", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "marketsLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "tokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "timeKeysLength", + "type": "uint256" + } + ], + "name": "InvalidClaimCollateralInput", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "InvalidClaimableFactor", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sendTokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sendAmountsLength", + "type": "uint256" + } + ], + "name": "InvalidExternalCalls", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "expectedMinBalance", + "type": "uint256" + } + ], + "name": "InvalidMarketTokenBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "claimableFundingFeeAmount", + "type": "uint256" + } + ], + "name": "InvalidMarketTokenBalanceForClaimableFunding", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collateralAmount", + "type": "uint256" + } + ], + "name": "InvalidMarketTokenBalanceForCollateralAmount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedSpender", + "type": "address" + } + ], + "name": "InvalidPermitSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "name": "InvalidSrcChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "digest", + "type": "bytes32" + } + ], + "name": "InvalidUserDigest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeUsd", + "type": "uint256" + } + ], + "name": "MaxRelayFeeSwapForSubaccountExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NonEmptyExternalCallsForSubaccountOrder", + "type": "error" + }, + { + "inputs": [], + "name": "TokenPermitsNotAllowedForMultichain", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnexpectedRelayFeeToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnsupportedRelayFeeToken", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "markets", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "claimAffiliateRewards", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "markets", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "timeKeys", + "type": "uint256[]" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "claimCollateral", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "markets", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "claimFundingFees", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "digests", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eventEmitter", + "outputs": [ + { + "internalType": "contract EventEmitter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalHandler", + "outputs": [ + { + "internalType": "contract IExternalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "multichainVault", + "outputs": [ + { + "internalType": "contract MultichainVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract IOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderHandler", + "outputs": [ + { + "internalType": "contract IOrderHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderVault", + "outputs": [ + { + "internalType": "contract OrderVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendNativeToken", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendWnt", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "swapHandler", + "outputs": [ + { + "internalType": "contract ISwapHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainGlvRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainGlvRouter.json new file mode 100644 index 00000000..96c32a3d --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainGlvRouter.json @@ -0,0 +1,1150 @@ +{ + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "contract Router", + "name": "router", + "type": "address" + }, + { + "internalType": "contract RoleStore", + "name": "roleStore", + "type": "address" + }, + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "contract EventEmitter", + "name": "eventEmitter", + "type": "address" + }, + { + "internalType": "contract IOracle", + "name": "oracle", + "type": "address" + }, + { + "internalType": "contract OrderVault", + "name": "orderVault", + "type": "address" + }, + { + "internalType": "contract IOrderHandler", + "name": "orderHandler", + "type": "address" + }, + { + "internalType": "contract ISwapHandler", + "name": "swapHandler", + "type": "address" + }, + { + "internalType": "contract IExternalHandler", + "name": "externalHandler", + "type": "address" + }, + { + "internalType": "contract MultichainVault", + "name": "multichainVault", + "type": "address" + } + ], + "internalType": "struct MultichainRouter.BaseConstructorParams", + "name": "params", + "type": "tuple" + }, + { + "internalType": "contract IGlvDepositHandler", + "name": "_glvDepositHandler", + "type": "address" + }, + { + "internalType": "contract IGlvWithdrawalHandler", + "name": "_glvWithdrawalHandler", + "type": "address" + }, + { + "internalType": "contract GlvVault", + "name": "_glvVault", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "DeadlinePassed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "DisabledFeature", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyTokenTranferGasLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requiredRelayFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "availableFeeAmount", + "type": "uint256" + } + ], + "name": "InsufficientRelayFee", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sendTokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sendAmountsLength", + "type": "uint256" + } + ], + "name": "InvalidExternalCalls", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedSpender", + "type": "address" + } + ], + "name": "InvalidPermitSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "name": "InvalidSrcChainId", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTransferRequestsLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "digest", + "type": "bytes32" + } + ], + "name": "InvalidUserDigest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeUsd", + "type": "uint256" + } + ], + "name": "MaxRelayFeeSwapForSubaccountExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NonEmptyExternalCallsForSubaccountOrder", + "type": "error" + }, + { + "inputs": [], + "name": "TokenPermitsNotAllowedForMultichain", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnexpectedRelayFeeToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnsupportedRelayFeeToken", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "receivers", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "internalType": "struct IRelayUtils.TransferRequests", + "name": "transferRequests", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "initialLongToken", + "type": "address" + }, + { + "internalType": "address", + "name": "initialShortToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IGlvDepositUtils.CreateGlvDepositParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "minGlvTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isMarketTokenDeposit", + "type": "bool" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IGlvDepositUtils.CreateGlvDepositParams", + "name": "params", + "type": "tuple" + } + ], + "name": "createGlvDeposit", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "receivers", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "internalType": "struct IRelayUtils.TransferRequests", + "name": "transferRequests", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "glv", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IGlvWithdrawalUtils.CreateGlvWithdrawalParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "minLongTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShortTokenAmount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IGlvWithdrawalUtils.CreateGlvWithdrawalParams", + "name": "params", + "type": "tuple" + } + ], + "name": "createGlvWithdrawal", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "digests", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eventEmitter", + "outputs": [ + { + "internalType": "contract EventEmitter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalHandler", + "outputs": [ + { + "internalType": "contract IExternalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "glvDepositHandler", + "outputs": [ + { + "internalType": "contract IGlvDepositHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "glvVault", + "outputs": [ + { + "internalType": "contract GlvVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "glvWithdrawalHandler", + "outputs": [ + { + "internalType": "contract IGlvWithdrawalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "multichainVault", + "outputs": [ + { + "internalType": "contract MultichainVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract IOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderHandler", + "outputs": [ + { + "internalType": "contract IOrderHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderVault", + "outputs": [ + { + "internalType": "contract OrderVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendNativeToken", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendWnt", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "swapHandler", + "outputs": [ + { + "internalType": "contract ISwapHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainGmRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainGmRouter.json new file mode 100644 index 00000000..b758655f --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainGmRouter.json @@ -0,0 +1,1449 @@ +{ + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "contract Router", + "name": "router", + "type": "address" + }, + { + "internalType": "contract RoleStore", + "name": "roleStore", + "type": "address" + }, + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "contract EventEmitter", + "name": "eventEmitter", + "type": "address" + }, + { + "internalType": "contract IOracle", + "name": "oracle", + "type": "address" + }, + { + "internalType": "contract OrderVault", + "name": "orderVault", + "type": "address" + }, + { + "internalType": "contract IOrderHandler", + "name": "orderHandler", + "type": "address" + }, + { + "internalType": "contract ISwapHandler", + "name": "swapHandler", + "type": "address" + }, + { + "internalType": "contract IExternalHandler", + "name": "externalHandler", + "type": "address" + }, + { + "internalType": "contract MultichainVault", + "name": "multichainVault", + "type": "address" + } + ], + "internalType": "struct MultichainRouter.BaseConstructorParams", + "name": "params", + "type": "tuple" + }, + { + "internalType": "contract DepositVault", + "name": "_depositVault", + "type": "address" + }, + { + "internalType": "contract IDepositHandler", + "name": "_depositHandler", + "type": "address" + }, + { + "internalType": "contract WithdrawalVault", + "name": "_withdrawalVault", + "type": "address" + }, + { + "internalType": "contract IWithdrawalHandler", + "name": "_withdrawalHandler", + "type": "address" + }, + { + "internalType": "contract ShiftVault", + "name": "_shiftVault", + "type": "address" + }, + { + "internalType": "contract IShiftHandler", + "name": "_shiftHandler", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "DeadlinePassed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "DisabledFeature", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyTokenTranferGasLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requiredRelayFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "availableFeeAmount", + "type": "uint256" + } + ], + "name": "InsufficientRelayFee", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sendTokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sendAmountsLength", + "type": "uint256" + } + ], + "name": "InvalidExternalCalls", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedSpender", + "type": "address" + } + ], + "name": "InvalidPermitSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "name": "InvalidSrcChainId", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidTransferRequestsLength", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "digest", + "type": "bytes32" + } + ], + "name": "InvalidUserDigest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeUsd", + "type": "uint256" + } + ], + "name": "MaxRelayFeeSwapForSubaccountExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NonEmptyExternalCallsForSubaccountOrder", + "type": "error" + }, + { + "inputs": [], + "name": "TokenPermitsNotAllowedForMultichain", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnexpectedRelayFeeToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnsupportedRelayFeeToken", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "receivers", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "internalType": "struct IRelayUtils.TransferRequests", + "name": "transferRequests", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialLongToken", + "type": "address" + }, + { + "internalType": "address", + "name": "initialShortToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IDepositUtils.CreateDepositParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "minMarketTokens", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IDepositUtils.CreateDepositParams", + "name": "params", + "type": "tuple" + } + ], + "name": "createDeposit", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "receivers", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "internalType": "struct IRelayUtils.TransferRequests", + "name": "transferRequests", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "fromMarket", + "type": "address" + }, + { + "internalType": "address", + "name": "toMarket", + "type": "address" + } + ], + "internalType": "struct IShiftUtils.CreateShiftParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "minMarketTokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IShiftUtils.CreateShiftParams", + "name": "params", + "type": "tuple" + } + ], + "name": "createShift", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "receivers", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "amounts", + "type": "uint256[]" + } + ], + "internalType": "struct IRelayUtils.TransferRequests", + "name": "transferRequests", + "type": "tuple" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address[]", + "name": "longTokenSwapPath", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "shortTokenSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IWithdrawalUtils.CreateWithdrawalParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "minLongTokenAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minShortTokenAmount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IWithdrawalUtils.CreateWithdrawalParams", + "name": "params", + "type": "tuple" + } + ], + "name": "createWithdrawal", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositHandler", + "outputs": [ + { + "internalType": "contract IDepositHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "depositVault", + "outputs": [ + { + "internalType": "contract DepositVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "digests", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eventEmitter", + "outputs": [ + { + "internalType": "contract EventEmitter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalHandler", + "outputs": [ + { + "internalType": "contract IExternalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "multichainVault", + "outputs": [ + { + "internalType": "contract MultichainVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract IOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderHandler", + "outputs": [ + { + "internalType": "contract IOrderHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderVault", + "outputs": [ + { + "internalType": "contract OrderVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendNativeToken", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendWnt", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "shiftHandler", + "outputs": [ + { + "internalType": "contract IShiftHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "shiftVault", + "outputs": [ + { + "internalType": "contract ShiftVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "swapHandler", + "outputs": [ + { + "internalType": "contract ISwapHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawalHandler", + "outputs": [ + { + "internalType": "contract IWithdrawalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "withdrawalVault", + "outputs": [ + { + "internalType": "contract WithdrawalVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainOrderRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainOrderRouter.json new file mode 100644 index 00000000..ab2e009b --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainOrderRouter.json @@ -0,0 +1,1820 @@ +{ + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "contract Router", + "name": "router", + "type": "address" + }, + { + "internalType": "contract RoleStore", + "name": "roleStore", + "type": "address" + }, + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "contract EventEmitter", + "name": "eventEmitter", + "type": "address" + }, + { + "internalType": "contract IOracle", + "name": "oracle", + "type": "address" + }, + { + "internalType": "contract OrderVault", + "name": "orderVault", + "type": "address" + }, + { + "internalType": "contract IOrderHandler", + "name": "orderHandler", + "type": "address" + }, + { + "internalType": "contract ISwapHandler", + "name": "swapHandler", + "type": "address" + }, + { + "internalType": "contract IExternalHandler", + "name": "externalHandler", + "type": "address" + }, + { + "internalType": "contract MultichainVault", + "name": "multichainVault", + "type": "address" + } + ], + "internalType": "struct MultichainRouter.BaseConstructorParams", + "name": "params", + "type": "tuple" + }, + { + "internalType": "contract IReferralStorage", + "name": "_referralStorage", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "DeadlinePassed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "DisabledFeature", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyOrder", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyTokenTranferGasLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requiredRelayFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "availableFeeAmount", + "type": "uint256" + } + ], + "name": "InsufficientRelayFee", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sendTokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sendAmountsLength", + "type": "uint256" + } + ], + "name": "InvalidExternalCalls", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedSpender", + "type": "address" + } + ], + "name": "InvalidPermitSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "name": "InvalidSrcChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "digest", + "type": "bytes32" + } + ], + "name": "InvalidUserDigest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeUsd", + "type": "uint256" + } + ], + "name": "MaxRelayFeeSwapForSubaccountExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NonEmptyExternalCallsForSubaccountOrder", + "type": "error" + }, + { + "inputs": [], + "name": "RelayEmptyBatch", + "type": "error" + }, + { + "inputs": [], + "name": "TokenPermitsNotAllowedForMultichain", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + }, + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnexpectedRelayFeeToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnsupportedRelayFeeToken", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "components": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "cancellationReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialCollateralToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "swapPath", + "type": "address[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialCollateralDeltaAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers", + "name": "numbers", + "type": "tuple" + }, + { + "internalType": "enum Order.OrderType", + "name": "orderType", + "type": "uint8" + }, + { + "internalType": "enum Order.DecreasePositionSwapType", + "name": "decreasePositionSwapType", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "referralCode", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParams[]", + "name": "createOrderParamsList", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFeeIncrease", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.UpdateOrderParams[]", + "name": "updateOrderParamsList", + "type": "tuple[]" + }, + { + "internalType": "bytes32[]", + "name": "cancelOrderKeys", + "type": "bytes32[]" + } + ], + "internalType": "struct IRelayUtils.BatchParams", + "name": "params", + "type": "tuple" + } + ], + "name": "batch", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "cancelOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "cancellationReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialCollateralToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "swapPath", + "type": "address[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialCollateralDeltaAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers", + "name": "numbers", + "type": "tuple" + }, + { + "internalType": "enum Order.OrderType", + "name": "orderType", + "type": "uint8" + }, + { + "internalType": "enum Order.DecreasePositionSwapType", + "name": "decreasePositionSwapType", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "referralCode", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParams", + "name": "params", + "type": "tuple" + } + ], + "name": "createOrder", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "digests", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eventEmitter", + "outputs": [ + { + "internalType": "contract EventEmitter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalHandler", + "outputs": [ + { + "internalType": "contract IExternalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "multichainVault", + "outputs": [ + { + "internalType": "contract MultichainVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract IOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderHandler", + "outputs": [ + { + "internalType": "contract IOrderHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderVault", + "outputs": [ + { + "internalType": "contract OrderVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "referralStorage", + "outputs": [ + { + "internalType": "contract IReferralStorage", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendNativeToken", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendWnt", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "referralCode", + "type": "bytes32" + } + ], + "name": "setTraderReferralCode", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "swapHandler", + "outputs": [ + { + "internalType": "contract ISwapHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFeeIncrease", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.UpdateOrderParams", + "name": "params", + "type": "tuple" + } + ], + "name": "updateOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainSubaccountRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainSubaccountRouter.json new file mode 100644 index 00000000..9b23af0f --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainSubaccountRouter.json @@ -0,0 +1,2069 @@ +{ + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "contract Router", + "name": "router", + "type": "address" + }, + { + "internalType": "contract RoleStore", + "name": "roleStore", + "type": "address" + }, + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "contract EventEmitter", + "name": "eventEmitter", + "type": "address" + }, + { + "internalType": "contract IOracle", + "name": "oracle", + "type": "address" + }, + { + "internalType": "contract OrderVault", + "name": "orderVault", + "type": "address" + }, + { + "internalType": "contract IOrderHandler", + "name": "orderHandler", + "type": "address" + }, + { + "internalType": "contract ISwapHandler", + "name": "swapHandler", + "type": "address" + }, + { + "internalType": "contract IExternalHandler", + "name": "externalHandler", + "type": "address" + }, + { + "internalType": "contract MultichainVault", + "name": "multichainVault", + "type": "address" + } + ], + "internalType": "struct MultichainRouter.BaseConstructorParams", + "name": "params", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "DeadlinePassed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "DisabledFeature", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyOrder", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyTokenTranferGasLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requiredRelayFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "availableFeeAmount", + "type": "uint256" + } + ], + "name": "InsufficientRelayFee", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sendTokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sendAmountsLength", + "type": "uint256" + } + ], + "name": "InvalidExternalCalls", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedSpender", + "type": "address" + } + ], + "name": "InvalidPermitSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "name": "InvalidSrcChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "digest", + "type": "bytes32" + } + ], + "name": "InvalidUserDigest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeUsd", + "type": "uint256" + } + ], + "name": "MaxRelayFeeSwapForSubaccountExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NonEmptyExternalCallsForSubaccountOrder", + "type": "error" + }, + { + "inputs": [], + "name": "RelayEmptyBatch", + "type": "error" + }, + { + "inputs": [], + "name": "TokenPermitsNotAllowedForMultichain", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + }, + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnexpectedRelayFeeToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnsupportedRelayFeeToken", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bool", + "name": "shouldAdd", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "expiresAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxAllowedCount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "actionType", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "integrationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct SubaccountApproval", + "name": "subaccountApproval", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "cancellationReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialCollateralToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "swapPath", + "type": "address[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialCollateralDeltaAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers", + "name": "numbers", + "type": "tuple" + }, + { + "internalType": "enum Order.OrderType", + "name": "orderType", + "type": "uint8" + }, + { + "internalType": "enum Order.DecreasePositionSwapType", + "name": "decreasePositionSwapType", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "referralCode", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParams[]", + "name": "createOrderParamsList", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFeeIncrease", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.UpdateOrderParams[]", + "name": "updateOrderParamsList", + "type": "tuple[]" + }, + { + "internalType": "bytes32[]", + "name": "cancelOrderKeys", + "type": "bytes32[]" + } + ], + "internalType": "struct IRelayUtils.BatchParams", + "name": "params", + "type": "tuple" + } + ], + "name": "batch", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bool", + "name": "shouldAdd", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "expiresAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxAllowedCount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "actionType", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "integrationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct SubaccountApproval", + "name": "subaccountApproval", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "cancelOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bool", + "name": "shouldAdd", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "expiresAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxAllowedCount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "actionType", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "integrationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct SubaccountApproval", + "name": "subaccountApproval", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "cancellationReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialCollateralToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "swapPath", + "type": "address[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialCollateralDeltaAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers", + "name": "numbers", + "type": "tuple" + }, + { + "internalType": "enum Order.OrderType", + "name": "orderType", + "type": "uint8" + }, + { + "internalType": "enum Order.DecreasePositionSwapType", + "name": "decreasePositionSwapType", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "referralCode", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParams", + "name": "params", + "type": "tuple" + } + ], + "name": "createOrder", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "digests", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eventEmitter", + "outputs": [ + { + "internalType": "contract EventEmitter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalHandler", + "outputs": [ + { + "internalType": "contract IExternalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "multichainVault", + "outputs": [ + { + "internalType": "contract MultichainVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract IOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderHandler", + "outputs": [ + { + "internalType": "contract IOrderHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderVault", + "outputs": [ + { + "internalType": "contract OrderVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "subaccount", + "type": "address" + } + ], + "name": "removeSubaccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendNativeToken", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendWnt", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "subaccountApprovalNonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "swapHandler", + "outputs": [ + { + "internalType": "contract ISwapHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bool", + "name": "shouldAdd", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "expiresAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxAllowedCount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "actionType", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "integrationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct SubaccountApproval", + "name": "subaccountApproval", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFeeIncrease", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.UpdateOrderParams", + "name": "params", + "type": "tuple" + } + ], + "name": "updateOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainTransferRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainTransferRouter.json new file mode 100644 index 00000000..ccc2d3ba --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainTransferRouter.json @@ -0,0 +1,915 @@ +{ + "abi": [ + { + "inputs": [ + { + "components": [ + { + "internalType": "contract Router", + "name": "router", + "type": "address" + }, + { + "internalType": "contract RoleStore", + "name": "roleStore", + "type": "address" + }, + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "contract EventEmitter", + "name": "eventEmitter", + "type": "address" + }, + { + "internalType": "contract IOracle", + "name": "oracle", + "type": "address" + }, + { + "internalType": "contract OrderVault", + "name": "orderVault", + "type": "address" + }, + { + "internalType": "contract IOrderHandler", + "name": "orderHandler", + "type": "address" + }, + { + "internalType": "contract ISwapHandler", + "name": "swapHandler", + "type": "address" + }, + { + "internalType": "contract IExternalHandler", + "name": "externalHandler", + "type": "address" + }, + { + "internalType": "contract MultichainVault", + "name": "multichainVault", + "type": "address" + } + ], + "internalType": "struct MultichainRouter.BaseConstructorParams", + "name": "params", + "type": "tuple" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "DeadlinePassed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "DisabledFeature", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyTokenTranferGasLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requiredRelayFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "availableFeeAmount", + "type": "uint256" + } + ], + "name": "InsufficientRelayFee", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sendTokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sendAmountsLength", + "type": "uint256" + } + ], + "name": "InvalidExternalCalls", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitializer", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "provider", + "type": "address" + } + ], + "name": "InvalidMultichainProvider", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedSpender", + "type": "address" + } + ], + "name": "InvalidPermitSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "name": "InvalidSrcChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "digest", + "type": "bytes32" + } + ], + "name": "InvalidUserDigest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeUsd", + "type": "uint256" + } + ], + "name": "MaxRelayFeeSwapForSubaccountExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NonEmptyExternalCallsForSubaccountOrder", + "type": "error" + }, + { + "inputs": [], + "name": "TokenPermitsNotAllowedForMultichain", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + }, + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnexpectedRelayFeeToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnsupportedRelayFeeToken", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "bridgeIn", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct IRelayUtils.BridgeOutParams", + "name": "params", + "type": "tuple" + } + ], + "name": "bridgeOut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct IRelayUtils.BridgeOutParams", + "name": "params", + "type": "tuple" + } + ], + "name": "bridgeOutFromController", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "digests", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eventEmitter", + "outputs": [ + { + "internalType": "contract EventEmitter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalHandler", + "outputs": [ + { + "internalType": "contract IExternalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_multichainProvider", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "multichainProvider", + "outputs": [ + { + "internalType": "contract IMultichainProvider", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "multichainVault", + "outputs": [ + { + "internalType": "contract MultichainVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract IOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderHandler", + "outputs": [ + { + "internalType": "contract IOrderHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderVault", + "outputs": [ + { + "internalType": "contract OrderVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendNativeToken", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendWnt", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "swapHandler", + "outputs": [ + { + "internalType": "contract ISwapHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minAmountOut", + "type": "uint256" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct IRelayUtils.BridgeOutParams", + "name": "params", + "type": "tuple" + } + ], + "name": "transferOut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainUtils.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainUtils.json new file mode 100644 index 00000000..7e605999 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainUtils.json @@ -0,0 +1,133 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyMultichainTransferInAmount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "InsufficientMultichainBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "endpoint", + "type": "address" + } + ], + "name": "InvalidMultichainEndpoint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "provider", + "type": "address" + } + ], + "name": "InvalidMultichainProvider", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "DataStore" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "getMultichainBalanceAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "DataStore" + }, + { + "internalType": "address", + "name": "endpoint", + "type": "address" + } + ], + "name": "validateMultichainEndpoint", + "outputs": [], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "DataStore" + }, + { + "internalType": "address", + "name": "provider", + "type": "address" + } + ], + "name": "validateMultichainProvider", + "outputs": [], + "stateMutability": "view", + "type": "function" + } + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainVault.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainVault.json new file mode 100644 index 00000000..5c12340f --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/MultichainVault.json @@ -0,0 +1,275 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "contract RoleStore", + "name": "_roleStore", + "type": "address" + }, + { + "internalType": "contract DataStore", + "name": "_dataStore", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "EmptyHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyTokenTranferGasLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + } + ], + "name": "InvalidNativeTokenSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "SelfTransferNotSupported", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + }, + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "recordTransferIn", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "syncTokenBalance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "tokenBalances", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferOut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + } + ], + "name": "transferOut", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "transferOutNativeToken", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "stateMutability": "payable", + "type": "receive" + } + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ReferralStorage.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ReferralStorage.json index 3c957a8f..edfad6e6 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ReferralStorage.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/ReferralStorage.json @@ -1,8 +1,21 @@ { - "_format": "hh-sol-artifact-1", - "contractName": "ReferralStorage", - "sourceName": "contracts/referrals/ReferralStorage.sol", "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + }, + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, { "anonymous": false, "inputs": [ @@ -66,6 +79,25 @@ "name": "SetCodeOwner", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "prevGov", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "nextGov", + "type": "address" + } + ], + "name": "SetGov", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -180,6 +212,13 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -273,6 +312,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "pendingGov", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -342,19 +394,6 @@ "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "_gov", - "type": "address" - } - ], - "name": "setGov", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { @@ -500,8 +539,19 @@ ], "stateMutability": "view", "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newGov", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } - ], - "linkReferences": {}, - "deployedLinkReferences": {} + ] } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/RelayParams.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/RelayParams.json new file mode 100644 index 00000000..56922f89 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/RelayParams.json @@ -0,0 +1,147 @@ +{ + "abi": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ] +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SmartAccount.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SmartAccount.json new file mode 100644 index 00000000..bc707d8d --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SmartAccount.json @@ -0,0 +1,28 @@ +{ + "abi": [ + { + "name": "isValidSignature", + "inputs": [ + { + "internalType": "bytes32", + "name": "_hash", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "_signature", + "type": "bytes" + } + ], + "outputs": [ + { + "internalType": "bytes4", + "name": "magicValue", + "type": "bytes4" + } + ], + "stateMutability": "view", + "type": "function" + } + ] +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/StBTC.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/StBTC.json new file mode 100644 index 00000000..326271bd --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/StBTC.json @@ -0,0 +1,1225 @@ +{ + "_format": "hh-sol-artifact-1", + "contractName": "StBTC", + "sourceName": "contracts/stBTC.sol", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "allowance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientAllowance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "balance", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "needed", + "type": "uint256" + } + ], + "name": "ERC20InsufficientBalance", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC20InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC20InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC20InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "ERC20InvalidSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxDeposit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxMint", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxRedeem", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "name": "ERC4626ExceededMaxWithdraw", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidInitialization", + "type": "error" + }, + { + "inputs": [], + "name": "NoRewards", + "type": "error" + }, + { + "inputs": [], + "name": "NotFeeReceiver", + "type": "error" + }, + { + "inputs": [], + "name": "NotInitializing", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "SafeERC20FailedOperation", + "type": "error" + }, + { + "inputs": [], + "name": "ValueMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroAddress", + "type": "error" + }, + { + "inputs": [], + "name": "ZeroShares", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Harvest", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint64", + "name": "version", + "type": "uint64" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "reward", + "type": "uint256" + } + ], + "name": "RewardAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "asset", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "assetsPerShare", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "convertToAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "convertToShares", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "directDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "earned", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "feeReceiver", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "harvest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_asset", + "type": "address" + }, + { + "internalType": "address", + "name": "_initialOwner", + "type": "address" + } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lastTimeRewardApplicable", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "lastUpdateTime", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "maxMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "maxWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "mint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "notifyRewardAmount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "periodFinish", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewMint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "previewRedeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + } + ], + "name": "previewWithdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "shares", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "redeem", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPerToken", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPerTokenPaid", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPerTokenStored", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardRate", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewards", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newFeeReceiver", + "type": "address" + } + ], + "name": "setFeeReceiver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAssets", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalStaked", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "withdraw", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "linkReferences": {}, + "deployedLinkReferences": {} +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountApproval.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountApproval.json new file mode 100644 index 00000000..13bbad2f --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountApproval.json @@ -0,0 +1,17 @@ +{ + "abi": [ + { + "type": "tuple", + "components": [ + { "name": "subaccount", "type": "address" }, + { "name": "shouldAdd", "type": "bool" }, + { "name": "expiresAt", "type": "uint256" }, + { "name": "maxAllowedCount", "type": "uint256" }, + { "name": "actionType", "type": "bytes32" }, + { "name": "nonce", "type": "uint256" }, + { "name": "deadline", "type": "uint256" }, + { "name": "signature", "type": "bytes" } + ] + } + ] +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountGelatoRelayRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountGelatoRelayRouter.json new file mode 100644 index 00000000..a1ed16bf --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountGelatoRelayRouter.json @@ -0,0 +1,2019 @@ +{ + "abi": [ + { + "inputs": [ + { + "internalType": "contract Router", + "name": "_router", + "type": "address" + }, + { + "internalType": "contract RoleStore", + "name": "_roleStore", + "type": "address" + }, + { + "internalType": "contract DataStore", + "name": "_dataStore", + "type": "address" + }, + { + "internalType": "contract EventEmitter", + "name": "_eventEmitter", + "type": "address" + }, + { + "internalType": "contract IOracle", + "name": "_oracle", + "type": "address" + }, + { + "internalType": "contract IOrderHandler", + "name": "_orderHandler", + "type": "address" + }, + { + "internalType": "contract OrderVault", + "name": "_orderVault", + "type": "address" + }, + { + "internalType": "contract ISwapHandler", + "name": "_swapHandler", + "type": "address" + }, + { + "internalType": "contract IExternalHandler", + "name": "_externalHandler", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "currentTimestamp", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + } + ], + "name": "DeadlinePassed", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "DisabledFeature", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyHoldingAddress", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyOrder", + "type": "error" + }, + { + "inputs": [], + "name": "EmptyReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "name": "EmptyTokenTranferGasLimit", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "requiredRelayFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "availableFeeAmount", + "type": "uint256" + } + ], + "name": "InsufficientRelayFee", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "name": "InvalidDestinationChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "sendTokensLength", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "sendAmountsLength", + "type": "uint256" + } + ], + "name": "InvalidExternalCalls", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedSpender", + "type": "address" + } + ], + "name": "InvalidPermitSpender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "name": "InvalidSrcChainId", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "digest", + "type": "bytes32" + } + ], + "name": "InvalidUserDigest", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "feeUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxFeeUsd", + "type": "uint256" + } + ], + "name": "MaxRelayFeeSwapForSubaccountExceeded", + "type": "error" + }, + { + "inputs": [], + "name": "NonEmptyExternalCallsForSubaccountOrder", + "type": "error" + }, + { + "inputs": [], + "name": "RelayEmptyBatch", + "type": "error" + }, + { + "inputs": [], + "name": "TokenPermitsNotAllowedForMultichain", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "TokenTransferError", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "msgSender", + "type": "address" + }, + { + "internalType": "string", + "name": "role", + "type": "string" + } + ], + "name": "Unauthorized", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnexpectedRelayFeeToken", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "address", + "name": "expectedFeeToken", + "type": "address" + } + ], + "name": "UnsupportedRelayFeeToken", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bool", + "name": "shouldAdd", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "expiresAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxAllowedCount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "actionType", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "integrationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct SubaccountApproval", + "name": "subaccountApproval", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "cancellationReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialCollateralToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "swapPath", + "type": "address[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialCollateralDeltaAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers", + "name": "numbers", + "type": "tuple" + }, + { + "internalType": "enum Order.OrderType", + "name": "orderType", + "type": "uint8" + }, + { + "internalType": "enum Order.DecreasePositionSwapType", + "name": "decreasePositionSwapType", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "referralCode", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParams[]", + "name": "createOrderParamsList", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFeeIncrease", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.UpdateOrderParams[]", + "name": "updateOrderParamsList", + "type": "tuple[]" + }, + { + "internalType": "bytes32[]", + "name": "cancelOrderKeys", + "type": "bytes32[]" + } + ], + "internalType": "struct IRelayUtils.BatchParams", + "name": "params", + "type": "tuple" + } + ], + "name": "batch", + "outputs": [ + { + "internalType": "bytes32[]", + "name": "", + "type": "bytes32[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bool", + "name": "shouldAdd", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "expiresAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxAllowedCount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "actionType", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "integrationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct SubaccountApproval", + "name": "subaccountApproval", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + } + ], + "name": "cancelOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bool", + "name": "shouldAdd", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "expiresAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxAllowedCount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "actionType", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "integrationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct SubaccountApproval", + "name": "subaccountApproval", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "components": [ + { + "components": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "cancellationReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialCollateralToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "swapPath", + "type": "address[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsAddresses", + "name": "addresses", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialCollateralDeltaAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParamsNumbers", + "name": "numbers", + "type": "tuple" + }, + { + "internalType": "enum Order.OrderType", + "name": "orderType", + "type": "uint8" + }, + { + "internalType": "enum Order.DecreasePositionSwapType", + "name": "decreasePositionSwapType", + "type": "uint8" + }, + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "bytes32", + "name": "referralCode", + "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" + } + ], + "internalType": "struct IBaseOrderUtils.CreateOrderParams", + "name": "params", + "type": "tuple" + } + ], + "name": "createOrder", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "dataStore", + "outputs": [ + { + "internalType": "contract DataStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "digests", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eventEmitter", + "outputs": [ + { + "internalType": "contract EventEmitter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "externalHandler", + "outputs": [ + { + "internalType": "contract IExternalHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "name": "multicall", + "outputs": [ + { + "internalType": "bytes[]", + "name": "results", + "type": "bytes[]" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { + "internalType": "contract IOracle", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderHandler", + "outputs": [ + { + "internalType": "contract IOrderHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "orderVault", + "outputs": [ + { + "internalType": "contract OrderVault", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "subaccount", + "type": "address" + } + ], + "name": "removeSubaccount", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "roleStore", + "outputs": [ + { + "internalType": "contract RoleStore", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract Router", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendNativeToken", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "token", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendTokens", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "sendWnt", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "subaccountApprovalNonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "swapHandler", + "outputs": [ + { + "internalType": "contract ISwapHandler", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "components": [ + { + "internalType": "address[]", + "name": "tokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "providers", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "data", + "type": "bytes[]" + } + ], + "internalType": "struct OracleUtils.SetPricesParams", + "name": "oracleParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address[]", + "name": "sendTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "sendAmounts", + "type": "uint256[]" + }, + { + "internalType": "address[]", + "name": "externalCallTargets", + "type": "address[]" + }, + { + "internalType": "bytes[]", + "name": "externalCallDataList", + "type": "bytes[]" + }, + { + "internalType": "address[]", + "name": "refundTokens", + "type": "address[]" + }, + { + "internalType": "address[]", + "name": "refundReceivers", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.ExternalCalls", + "name": "externalCalls", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "token", + "type": "address" + } + ], + "internalType": "struct IRelayUtils.TokenPermit[]", + "name": "tokenPermits", + "type": "tuple[]" + }, + { + "components": [ + { + "internalType": "address", + "name": "feeToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "feeAmount", + "type": "uint256" + }, + { + "internalType": "address[]", + "name": "feeSwapPath", + "type": "address[]" + } + ], + "internalType": "struct IRelayUtils.FeeParams", + "name": "fee", + "type": "tuple" + }, + { + "internalType": "uint256", + "name": "userNonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.RelayParams", + "name": "relayParams", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bool", + "name": "shouldAdd", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "expiresAt", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "maxAllowedCount", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "actionType", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "desChainId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes32", + "name": "integrationId", + "type": "bytes32" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "internalType": "struct SubaccountApproval", + "name": "subaccountApproval", + "type": "tuple" + }, + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "key", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "executionFeeIncrease", + "type": "uint256" + } + ], + "internalType": "struct IRelayUtils.UpdateOrderParams", + "name": "params", + "type": "tuple" + } + ], + "name": "updateOrder", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountRouter.json index 1b707130..f7ef1334 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountRouter.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SubaccountRouter.json @@ -1,5 +1,4 @@ { - "address": "0xe5485a4fD6527911e9b82A75A1bFEd6e47BE2241", "abi": [ { "inputs": [ @@ -85,64 +84,6 @@ "name": "InvalidNativeTokenSender", "type": "error" }, - { - "inputs": [ - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "expectedReceiver", - "type": "address" - } - ], - "name": "InvalidReceiverForSubaccountOrder", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "subaccount", - "type": "address" - }, - { - "internalType": "uint256", - "name": "count", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "maxCount", - "type": "uint256" - } - ], - "name": "MaxSubaccountActionCountExceeded", - "type": "error" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "subaccount", - "type": "address" - } - ], - "name": "SubaccountNotAuthorized", - "type": "error" - }, { "inputs": [ { @@ -164,6 +105,25 @@ "name": "TokenTransferError", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "reason", + "type": "string" + }, + { + "indexed": false, + "internalType": "bytes", + "name": "returndata", + "type": "bytes" + } + ], + "name": "TokenTransferReverted", + "type": "event" + }, { "inputs": [ { @@ -317,6 +277,11 @@ "internalType": "bytes32", "name": "referralCode", "type": "bytes32" + }, + { + "internalType": "bytes32[]", + "name": "dataList", + "type": "bytes32[]" } ], "internalType": "struct IBaseOrderUtils.CreateOrderParams", @@ -504,6 +469,24 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "integrationId", + "type": "bytes32" + } + ], + "name": "setIntegrationId", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, { "inputs": [ { @@ -545,6 +528,29 @@ "stateMutability": "payable", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "subaccount", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "actionType", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "expiresAt", + "type": "uint256" + } + ], + "name": "setSubaccountExpiresAt", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, { "inputs": [ { @@ -592,67 +598,5 @@ "stateMutability": "payable", "type": "receive" } - ], - "transactionHash": "0xe5b71c86f938f547820ca3262678fb70c379c15ef02430fbb773ee4d37e86e09", - "receipt": { - "to": null, - "from": "0xE7BfFf2aB721264887230037940490351700a068", - "contractAddress": "0xe5485a4fD6527911e9b82A75A1bFEd6e47BE2241", - "transactionIndex": 0, - "gasUsed": "3707710", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x00c9beda5865106776abea90f56310f05628852d29d91b7c235c44a20123b601", - "transactionHash": "0xe5b71c86f938f547820ca3262678fb70c379c15ef02430fbb773ee4d37e86e09", - "logs": [], - "blockNumber": 46822607, - "cumulativeGasUsed": "3707710", - "status": 1, - "byzantium": true - }, - "args": [ - "0x820F5FfC5b525cD4d88Cd91aCf2c28F16530Cc68", - "0xA44F830B6a2B6fa76657a3B92C1fe74fcB7C6AfD", - "0x2F0b22339414ADeD7D5F06f9D604c7fF5b2fe3f6", - "0xDb17B211c34240B014ab6d61d4A31FA0C0e20c26", - "0x32A0258007a6ea78265a5AE4DBb28f176be4a8EB", - "0xD3D60D22d415aD43b7e64b510D86A30f19B1B12C" - ], - "numDeployments": 3, - "solcInputHash": "95ed34927f843d6700c121bcc6faf594", - "libraries": { - "OrderStoreUtils": "0x805a15bf16582eC8d76841062A47dFfEa7903131" - }, - "devdoc": { - "kind": "dev", - "methods": { - "multicall(bytes[])": { - "details": "Receives and executes a batch of function calls on this contract." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 115, - "contract": "contracts/router/SubaccountRouter.sol:SubaccountRouter", - "label": "_status", - "offset": 0, - "slot": "0", - "type": "t_uint256" - } - ], - "types": { - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsReader.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsReader.json index afe979be..762bafb2 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsReader.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsReader.json @@ -1,5 +1,4 @@ { - "address": "0x23D4Da5C7C6902D4C86d551CaE60d5755820df9E", "abi": [ { "inputs": [ @@ -29,143 +28,165 @@ { "components": [ { - "components": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "internalType": "address", - "name": "cancellationReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "callbackContract", - "type": "address" - }, - { - "internalType": "address", - "name": "uiFeeReceiver", - "type": "address" - }, - { - "internalType": "address", - "name": "market", - "type": "address" - }, - { - "internalType": "address", - "name": "initialCollateralToken", - "type": "address" - }, - { - "internalType": "address[]", - "name": "swapPath", - "type": "address[]" - } - ], - "internalType": "struct Order.Addresses", - "name": "addresses", - "type": "tuple" + "internalType": "bytes32", + "name": "orderKey", + "type": "bytes32" }, { "components": [ { - "internalType": "enum Order.OrderType", - "name": "orderType", - "type": "uint8" + "components": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "internalType": "address", + "name": "cancellationReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "callbackContract", + "type": "address" + }, + { + "internalType": "address", + "name": "uiFeeReceiver", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + }, + { + "internalType": "address", + "name": "initialCollateralToken", + "type": "address" + }, + { + "internalType": "address[]", + "name": "swapPath", + "type": "address[]" + } + ], + "internalType": "struct Order.Addresses", + "name": "addresses", + "type": "tuple" }, { - "internalType": "enum Order.DecreasePositionSwapType", - "name": "decreasePositionSwapType", - "type": "uint8" + "components": [ + { + "internalType": "enum Order.OrderType", + "name": "orderType", + "type": "uint8" + }, + { + "internalType": "enum Order.DecreasePositionSwapType", + "name": "decreasePositionSwapType", + "type": "uint8" + }, + { + "internalType": "uint256", + "name": "sizeDeltaUsd", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "initialCollateralDeltaAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "triggerPrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "acceptablePrice", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "executionFee", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "callbackGasLimit", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "minOutputAmount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "updatedAtTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "validFromTime", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" + } + ], + "internalType": "struct Order.Numbers", + "name": "numbers", + "type": "tuple" }, { - "internalType": "uint256", - "name": "sizeDeltaUsd", - "type": "uint256" + "components": [ + { + "internalType": "bool", + "name": "isLong", + "type": "bool" + }, + { + "internalType": "bool", + "name": "shouldUnwrapNativeToken", + "type": "bool" + }, + { + "internalType": "bool", + "name": "isFrozen", + "type": "bool" + }, + { + "internalType": "bool", + "name": "autoCancel", + "type": "bool" + } + ], + "internalType": "struct Order.Flags", + "name": "flags", + "type": "tuple" }, { - "internalType": "uint256", - "name": "initialCollateralDeltaAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "triggerPrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "acceptablePrice", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "executionFee", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "callbackGasLimit", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "minOutputAmount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "updatedAtTime", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "validFromTime", - "type": "uint256" + "internalType": "bytes32[]", + "name": "_dataList", + "type": "bytes32[]" } ], - "internalType": "struct Order.Numbers", - "name": "numbers", - "type": "tuple" - }, - { - "components": [ - { - "internalType": "bool", - "name": "isLong", - "type": "bool" - }, - { - "internalType": "bool", - "name": "shouldUnwrapNativeToken", - "type": "bool" - }, - { - "internalType": "bool", - "name": "isFrozen", - "type": "bool" - }, - { - "internalType": "bool", - "name": "autoCancel", - "type": "bool" - } - ], - "internalType": "struct Order.Flags", - "name": "flags", + "internalType": "struct Order.Props", + "name": "order", "type": "tuple" } ], - "internalType": "struct Order.Props[]", + "internalType": "struct ReaderUtils.OrderInfo[]", "name": "", "type": "tuple[]" } @@ -273,6 +294,11 @@ "outputs": [ { "components": [ + { + "internalType": "bytes32", + "name": "positionKey", + "type": "bytes32" + }, { "components": [ { @@ -314,6 +340,11 @@ "name": "collateralAmount", "type": "uint256" }, + { + "internalType": "int256", + "name": "pendingImpactAmount", + "type": "int256" + }, { "internalType": "uint256", "name": "borrowingFactor", @@ -641,12 +672,27 @@ }, { "internalType": "uint256", - "name": "priceImpactDiffUsd", + "name": "executionPrice", "type": "uint256" }, + { + "internalType": "bool", + "name": "balanceWasImproved", + "type": "bool" + }, + { + "internalType": "int256", + "name": "proportionalPendingImpactUsd", + "type": "int256" + }, + { + "internalType": "int256", + "name": "totalImpactUsd", + "type": "int256" + }, { "internalType": "uint256", - "name": "executionPrice", + "name": "priceImpactDiffUsd", "type": "uint256" } ], @@ -744,6 +790,11 @@ "name": "collateralAmount", "type": "uint256" }, + { + "internalType": "int256", + "name": "pendingImpactAmount", + "type": "int256" + }, { "internalType": "uint256", "name": "borrowingFactor", @@ -1002,6 +1053,11 @@ "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" } ], "internalType": "struct Deposit.Numbers", @@ -1019,6 +1075,11 @@ "internalType": "struct Deposit.Flags", "name": "flags", "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_dataList", + "type": "bytes32[]" } ], "internalType": "struct Deposit.Props", @@ -1173,18 +1234,59 @@ { "components": [ { - "internalType": "uint256", - "name": "min", - "type": "uint256" + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props", + "name": "indexTokenPrice", + "type": "tuple" }, { - "internalType": "uint256", - "name": "max", - "type": "uint256" + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props", + "name": "longTokenPrice", + "type": "tuple" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "min", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "max", + "type": "uint256" + } + ], + "internalType": "struct Price.Props", + "name": "shortTokenPrice", + "type": "tuple" } ], - "internalType": "struct Price.Props", - "name": "indexTokenPrice", + "internalType": "struct MarketUtils.MarketPrices", + "name": "prices", "type": "tuple" }, { @@ -1202,6 +1304,11 @@ "name": "sizeDeltaUsd", "type": "int256" }, + { + "internalType": "int256", + "name": "pendingImpactAmount", + "type": "int256" + }, { "internalType": "bool", "name": "isLong", @@ -1219,12 +1326,27 @@ }, { "internalType": "uint256", - "name": "priceImpactDiffUsd", + "name": "executionPrice", "type": "uint256" }, + { + "internalType": "bool", + "name": "balanceWasImproved", + "type": "bool" + }, + { + "internalType": "int256", + "name": "proportionalPendingImpactUsd", + "type": "int256" + }, + { + "internalType": "int256", + "name": "totalImpactUsd", + "type": "int256" + }, { "internalType": "uint256", - "name": "executionPrice", + "name": "priceImpactDiffUsd", "type": "uint256" } ], @@ -2174,6 +2296,11 @@ "internalType": "uint256", "name": "impactPoolAmount", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lentImpactPoolAmount", + "type": "uint256" } ], "internalType": "struct MarketPoolValueInfo.Props", @@ -2496,6 +2623,11 @@ "internalType": "uint256", "name": "validFromTime", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" } ], "internalType": "struct Order.Numbers", @@ -2528,6 +2660,11 @@ "internalType": "struct Order.Flags", "name": "flags", "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_dataList", + "type": "bytes32[]" } ], "internalType": "struct Order.Props", @@ -2538,6 +2675,35 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "contract DataStore", + "name": "dataStore", + "type": "address" + }, + { + "internalType": "address", + "name": "market", + "type": "address" + } + ], + "name": "getPendingPositionImpactPoolDistributionAmount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -2759,6 +2925,11 @@ "name": "collateralAmount", "type": "uint256" }, + { + "internalType": "int256", + "name": "pendingImpactAmount", + "type": "int256" + }, { "internalType": "uint256", "name": "borrowingFactor", @@ -2910,6 +3081,11 @@ "outputs": [ { "components": [ + { + "internalType": "bytes32", + "name": "positionKey", + "type": "bytes32" + }, { "components": [ { @@ -2951,6 +3127,11 @@ "name": "collateralAmount", "type": "uint256" }, + { + "internalType": "int256", + "name": "pendingImpactAmount", + "type": "int256" + }, { "internalType": "uint256", "name": "borrowingFactor", @@ -3278,12 +3459,27 @@ }, { "internalType": "uint256", - "name": "priceImpactDiffUsd", + "name": "executionPrice", "type": "uint256" }, + { + "internalType": "bool", + "name": "balanceWasImproved", + "type": "bool" + }, + { + "internalType": "int256", + "name": "proportionalPendingImpactUsd", + "type": "int256" + }, + { + "internalType": "int256", + "name": "totalImpactUsd", + "type": "int256" + }, { "internalType": "uint256", - "name": "executionPrice", + "name": "priceImpactDiffUsd", "type": "uint256" } ], @@ -3400,6 +3596,11 @@ "outputs": [ { "components": [ + { + "internalType": "bytes32", + "name": "positionKey", + "type": "bytes32" + }, { "components": [ { @@ -3441,6 +3642,11 @@ "name": "collateralAmount", "type": "uint256" }, + { + "internalType": "int256", + "name": "pendingImpactAmount", + "type": "int256" + }, { "internalType": "uint256", "name": "borrowingFactor", @@ -3768,12 +3974,27 @@ }, { "internalType": "uint256", - "name": "priceImpactDiffUsd", + "name": "executionPrice", "type": "uint256" }, + { + "internalType": "bool", + "name": "balanceWasImproved", + "type": "bool" + }, + { + "internalType": "int256", + "name": "proportionalPendingImpactUsd", + "type": "int256" + }, + { + "internalType": "int256", + "name": "totalImpactUsd", + "type": "int256" + }, { "internalType": "uint256", - "name": "executionPrice", + "name": "priceImpactDiffUsd", "type": "uint256" } ], @@ -4009,11 +4230,21 @@ "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" } ], "internalType": "struct Shift.Numbers", "name": "numbers", "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_dataList", + "type": "bytes32[]" } ], "internalType": "struct Shift.Props", @@ -4358,6 +4589,11 @@ "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" + }, + { + "internalType": "uint256", + "name": "srcChainId", + "type": "uint256" } ], "internalType": "struct Withdrawal.Numbers", @@ -4375,6 +4611,11 @@ "internalType": "struct Withdrawal.Flags", "name": "flags", "type": "tuple" + }, + { + "internalType": "bytes32[]", + "name": "_dataList", + "type": "bytes32[]" } ], "internalType": "struct Withdrawal.Props", @@ -4615,6 +4856,11 @@ "internalType": "bool", "name": "shouldValidateMinCollateralUsd", "type": "bool" + }, + { + "internalType": "bool", + "name": "forLiquidation", + "type": "bool" } ], "name": "isPositionLiquidatable", @@ -4655,52 +4901,5 @@ "stateMutability": "view", "type": "function" } - ], - "transactionHash": "0xb058c26493408e1ec30b17ac5872c1c322a9d4243e75d434099d15a9e4ccea76", - "receipt": { - "to": null, - "from": "0xE7BfFf2aB721264887230037940490351700a068", - "contractAddress": "0x23D4Da5C7C6902D4C86d551CaE60d5755820df9E", - "transactionIndex": 5, - "gasUsed": "5375288", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xec6a71487f45632fdf9f6c8e7c2f3efe0c7d4093f90f28a8468bd2b7b23c3395", - "transactionHash": "0xb058c26493408e1ec30b17ac5872c1c322a9d4243e75d434099d15a9e4ccea76", - "logs": [], - "blockNumber": 252698175, - "cumulativeGasUsed": "5964774", - "status": 1, - "byzantium": true - }, - "args": [], - "numDeployments": 10, - "solcInputHash": "be316035eac2019d87590bce566bb2c5", - "libraries": { - "DepositStoreUtils": "0x5E4A532E53359b0BeAa21e41ccC9B35042e8051C", - "MarketStoreUtils": "0xDEBC0b5DADF3F88d9f00B0d8545B61e67eF3aBEa", - "MarketUtils": "0xB6426e70E7efc43aEf14a1D963A4F740c2356467", - "PositionStoreUtils": "0x3a4F71855554552f024E936E673eDb6E5C25535C", - "PositionUtils": "0xA3D091e23FEc66D843D3Fc8a83F1C8996d32f6a4", - "ReaderDepositUtils": "0x6023f1452C85aA2f5C77f6814651d3ED2FD19654", - "ReaderPositionUtils": "0xa7Bb93C5361BD6fe66408dCc0a9d98a25a1b2d88", - "ReaderPricingUtils": "0x4eA13E6926bF984B4c8853A8fbc9AbC149A0b445", - "ReaderUtils": "0x0597FB70fF1b3081c9B27a9eFFD1407DF1B4035f", - "ReaderWithdrawalUtils": "0xa0452ae9b77d384b45816A086Bd474104fAD32a4", - "ShiftStoreUtils": "0xb30a8d551Bd51fC1493DA195289665cBcDB6EB98", - "WithdrawalStoreUtils": "0xB57Cb5eafCd367D0C4D7ecd04d170e48A6145138" - }, - "devdoc": { - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [], - "types": null - } + ] } diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsRouter.json b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsRouter.json index a7d3d239..03aaf761 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsRouter.json +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/SyntheticsRouter.json @@ -1,7 +1,4 @@ { - "_format": "hh-sol-artifact-1", - "contractName": "Router", - "sourceName": "contracts/router/Router.sol", "abi": [ { "inputs": [ @@ -71,7 +68,5 @@ "stateMutability": "view", "type": "function" } - ], - "linkReferences": {}, - "deployedLinkReferences": {} -} + ] +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/__tests__/abis.spec.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/__tests__/abis.spec.ts new file mode 100644 index 00000000..a9b40fd4 --- /dev/null +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/__tests__/abis.spec.ts @@ -0,0 +1,46 @@ +import fs from "fs"; +import path from "path"; +import {describe, expect, it} from "vitest"; + +function isEmptyValue(value: any): boolean { + if ( + !value || + (Array.isArray(value) && value.length === 0) || + (typeof value === "object" && Object.keys(value).length === 0) + ) { + return true; + } + + return false; +} + +describe("ABI files validation", () => { + const abiDir = path.join(__dirname, ".."); + const abiFiles = fs.readdirSync(abiDir).filter((file) => file.endsWith(".json")); + + it.each(abiFiles)("validates %s doesn't contain metadata or bytecode", (fileName) => { + const filePath = path.join(abiDir, fileName); + const fileContent = JSON.parse(fs.readFileSync(filePath, "utf-8")); + + const abiContent = Array.isArray(fileContent) ? fileContent : fileContent.abi; + + expect(abiContent).toBeDefined(); + expect(Array.isArray(abiContent)).toBe(true); + + const unnecessaryFields = [ + "metadata", + "bytecode", + "deployedBytecode", + "sourceMap", + "deployedSourceMap", + "source", + "ast", + "schemaVersion", + "updatedAt", + ]; + + const foundFields = unnecessaryFields.filter((field) => !isEmptyValue(fileContent[field])); + + expect(foundFields).toHaveLength(0); + }); +}); diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/index.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/index.ts index 0a6915c8..2ec984b9 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/index.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/abis/index.ts @@ -1,64 +1,96 @@ -import type { JsonFragment } from "ethers"; -import { Abi, erc20Abi } from "viem"; +import {Abi, erc20Abi} from "viem"; -import CustomErrors from "./CustomErrors.json" with { type: "json" }; -import DataStore from "./DataStore.json" with { type: "json" }; -import ERC721 from "./ERC721.json" with { type: "json" }; -import EventEmitter from "./EventEmitter.json" with { type: "json" }; -import ExchangeRouter from "./ExchangeRouter.json" with { type: "json" }; -import GlpManager from "./GlpManager.json" with { type: "json" }; -import GlvReader from "./GlvReader.json" with { type: "json" }; -import GlvRouter from "./GlvRouter.json" with { type: "json" }; -import GMT from "./GMT.json" with { type: "json" }; -import GmxMigrator from "./GmxMigrator.json" with { type: "json" }; -import GovToken from "./GovToken.json" with { type: "json" }; -import MintableBaseToken from "./MintableBaseToken.json" with { type: "json" }; -import Multicall from "./Multicall.json" with { type: "json" }; -import OrderBook from "./OrderBook.json" with { type: "json" }; -import OrderBookReader from "./OrderBookReader.json" with { type: "json" }; -import OrderExecutor from "./OrderExecutor.json" with { type: "json" }; -import PositionManager from "./PositionManager.json" with { type: "json" }; -import PositionRouter from "./PositionRouter.json" with { type: "json" }; -import Reader from "./Reader.json" with { type: "json" }; -import ReaderV2 from "./ReaderV2.json" with { type: "json" }; -import ReferralStorage from "./ReferralStorage.json" with { type: "json" }; -import RewardReader from "./RewardReader.json" with { type: "json" }; -import RewardRouter from "./RewardRouter.json" with { type: "json" }; -import RewardTracker from "./RewardTracker.json" with { type: "json" }; -import RouterV2 from "./Router-v2.json" with { type: "json" }; -import Router from "./Router.json" with { type: "json" }; -import SubaccountRouter from "./SubaccountRouter.json" with { type: "json" }; -import SyntheticsReader from "./SyntheticsReader.json" with { type: "json" }; -import SyntheticsRouter from "./SyntheticsRouter.json" with { type: "json" }; -import Timelock from "./Timelock.json" with { type: "json" }; -import Token from "./Token.json" with { type: "json" }; -import Treasury from "./Treasury.json" with { type: "json" }; -import UniPool from "./UniPool.json" with { type: "json" }; -import UniswapV2 from "./UniswapV2.json" with { type: "json" }; -import Vault from "./Vault.json" with { type: "json" }; -import VaultReader from "./VaultReader.json" with { type: "json" }; -import VaultV2 from "./VaultV2.json" with { type: "json" }; -import VaultV2b from "./VaultV2b.json" with { type: "json" }; -import Vester from "./Vester.json" with { type: "json" }; -import WETH from "./WETH.json" with { type: "json" }; -import YieldFarm from "./YieldFarm.json" with { type: "json" }; -import YieldToken from "./YieldToken.json" with { type: "json" }; +import ArbitrumNodeInterface from "./ArbitrumNodeInterface.json"; +import ClaimHandler from "./ClaimHandler.json"; +import CustomErrors from "./CustomErrors.json"; +import DataStore from "./DataStore.json"; +import ERC20PermitInterface from "./ERC20PermitInterface.json"; +import ERC721 from "./ERC721.json"; +import EventEmitter from "./EventEmitter.json"; +import ExchangeRouter from "./ExchangeRouter.json"; +import GelatoRelayRouter from "./GelatoRelayRouter.json"; +import GlpManager from "./GlpManager.json"; +import GlvReader from "./GlvReader.json"; +import GlvRouter from "./GlvRouter.json"; +import GMT from "./GMT.json"; +import GmxMigrator from "./GmxMigrator.json"; +import GovToken from "./GovToken.json"; +import LayerZeroProvider from "./LayerZeroProvider.json"; +import MintableBaseToken from "./MintableBaseToken.json"; +import Multicall from "./Multicall.json"; +import MultichainClaimsRouter from "./MultichainClaimsRouter.json"; +import MultichainGlvRouter from "./MultichainGlvRouter.json"; +import MultichainGmRouter from "./MultichainGmRouter.json"; +import MultichainOrderRouter from "./MultichainOrderRouter.json"; +import MultichainSubaccountRouter from "./MultichainSubaccountRouter.json"; +import MultichainTransferRouter from "./MultichainTransferRouter.json"; +import MultichainUtils from "./MultichainUtils.json"; +import MultichainVault from "./MultichainVault.json"; +import OrderBook from "./OrderBook.json"; +import OrderBookReader from "./OrderBookReader.json"; +import OrderExecutor from "./OrderExecutor.json"; +import PositionManager from "./PositionManager.json"; +import PositionRouter from "./PositionRouter.json"; +import Reader from "./Reader.json"; +import ReaderV2 from "./ReaderV2.json"; +import ReferralStorage from "./ReferralStorage.json"; +import RelayParams from "./RelayParams.json"; +import RewardReader from "./RewardReader.json"; +import RewardRouter from "./RewardRouter.json"; +import RewardTracker from "./RewardTracker.json"; +import RouterV2 from "./Router-v2.json"; +import Router from "./Router.json"; +import SmartAccount from "./SmartAccount.json"; +import StBTC from "./StBTC.json"; +import SubaccountGelatoRelayRouter from "./SubaccountGelatoRelayRouter.json"; +import SubaccountRouter from "./SubaccountRouter.json"; +import SyntheticsReader from "./SyntheticsReader.json"; +import SyntheticsRouter from "./SyntheticsRouter.json"; +import Timelock from "./Timelock.json"; +import Token from "./Token.json"; +import Treasury from "./Treasury.json"; +import UniPool from "./UniPool.json"; +import UniswapV2 from "./UniswapV2.json"; +import Vault from "./Vault.json"; +import VaultReader from "./VaultReader.json"; +import VaultV2 from "./VaultV2.json"; +import VaultV2b from "./VaultV2b.json"; +import Vester from "./Vester.json"; +import WETH from "./WETH.json"; +import YieldFarm from "./YieldFarm.json"; +import YieldToken from "./YieldToken.json"; export type AbiId = + | "AbstractSubaccountApprovalNonceable" + | "ArbitrumNodeInterface" + | "ClaimHandler" | "CustomErrors" | "DataStore" - | "ERC721" | "ERC20" + | "ERC20PermitInterface" + | "ERC20PermitInterface" + | "ERC721" | "EventEmitter" | "ExchangeRouter" + | "GelatoRelayRouter" + | "GelatoRelayRouter" | "GlpManager" | "GlvReader" | "GlvRouter" | "GMT" | "GmxMigrator" | "GovToken" + | "LayerZeroProvider" | "MintableBaseToken" | "Multicall" + | "MultichainClaimsRouter" + | "MultichainGlvRouter" + | "MultichainGmRouter" + | "MultichainOrderRouter" + | "MultichainSubaccountRouter" + | "MultichainTransferRouter" + | "MultichainUtils" + | "MultichainVault" | "OrderBook" | "OrderBookReader" | "OrderExecutor" @@ -67,11 +99,16 @@ export type AbiId = | "Reader" | "ReaderV2" | "ReferralStorage" + | "RelayParams" | "RewardReader" | "RewardRouter" | "RewardTracker" - | "Router-v2" | "Router" + | "RouterV2" + | "SmartAccount" + | "StBTC" + | "SubaccountGelatoRelayRouter" + | "SubaccountGelatoRelayRouter" | "SubaccountRouter" | "SyntheticsReader" | "SyntheticsRouter" @@ -89,21 +126,78 @@ export type AbiId = | "YieldFarm" | "YieldToken"; +/** Copied from ethers to enable compatibility with GMX UI */ +interface JsonFragmentType { + readonly name?: string; + readonly indexed?: boolean; + readonly type?: string; + readonly internalType?: string; + readonly components?: ReadonlyArray; +} + +interface JsonFragment { + readonly name?: string; + readonly type?: string; + readonly anonymous?: boolean; + readonly payable?: boolean; + readonly constant?: boolean; + readonly stateMutability?: string; + readonly inputs?: ReadonlyArray; + readonly outputs?: ReadonlyArray; + readonly gas?: string; +} + +const AbstractSubaccountApprovalNonceable = [ + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "subaccountApprovalNonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + export const abis: Record = { + AbstractSubaccountApprovalNonceable, + ArbitrumNodeInterface: ArbitrumNodeInterface.abi, + ClaimHandler: ClaimHandler.abi, CustomErrors: CustomErrors.abi, DataStore: DataStore.abi, - ERC721: ERC721.abi, ERC20: erc20Abi, + ERC20PermitInterface: ERC20PermitInterface.abi, + ERC721: ERC721.abi, EventEmitter: EventEmitter.abi, ExchangeRouter: ExchangeRouter.abi, + GelatoRelayRouter: GelatoRelayRouter.abi, GlpManager: GlpManager.abi, GlvReader: GlvReader.abi, GlvRouter: GlvRouter.abi, GMT: GMT.abi, GmxMigrator: GmxMigrator.abi, GovToken: GovToken.abi, + LayerZeroProvider: LayerZeroProvider.abi, MintableBaseToken: MintableBaseToken.abi, Multicall: Multicall.abi, + MultichainClaimsRouter: MultichainClaimsRouter.abi, + MultichainGlvRouter: MultichainGlvRouter.abi, + MultichainGmRouter: MultichainGmRouter.abi, + MultichainOrderRouter: MultichainOrderRouter.abi, + MultichainSubaccountRouter: MultichainSubaccountRouter.abi, + MultichainTransferRouter: MultichainTransferRouter.abi, + MultichainUtils: MultichainUtils.abi, + MultichainVault: MultichainVault.abi, OrderBook: OrderBook.abi, OrderBookReader: OrderBookReader.abi, OrderExecutor: OrderExecutor.abi, @@ -112,11 +206,15 @@ export const abis: Record = { Reader: Reader.abi, ReaderV2: ReaderV2.abi, ReferralStorage: ReferralStorage.abi, + RelayParams: RelayParams.abi, RewardReader: RewardReader.abi, RewardRouter: RewardRouter.abi, RewardTracker: RewardTracker.abi, - RouterV2: RouterV2.abi, Router: Router.abi, + RouterV2: RouterV2.abi, + SmartAccount: SmartAccount.abi, + StBTC: StBTC.abi, + SubaccountGelatoRelayRouter: SubaccountGelatoRelayRouter.abi, SubaccountRouter: SubaccountRouter.abi, SyntheticsReader: SyntheticsReader.abi, SyntheticsRouter: SyntheticsRouter.abi, @@ -133,4 +231,4 @@ export const abis: Record = { WETH: WETH.abi, YieldFarm: YieldFarm.abi, YieldToken: YieldToken.abi, -} as any; +} satisfies Record as any; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/contracts.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/contracts.ts index 4ef23424..305c86ba 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/contracts.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/configs/contracts.ts @@ -50,13 +50,13 @@ export const CONTRACTS = { // Synthetics DataStore: "0xFD70de6b91282D8017aA4E741e9Ae325CAb992d8", EventEmitter: "0xC8ee91A54287DB53897056e12D9819156D3822Fb", - SubaccountRouter: "0xa329221a77BE08485f59310b873b14815c82E10D", - ExchangeRouter: "0x602b805EedddBbD9ddff44A7dcBD46cb07849685", + SubaccountRouter: "0x5b9A353F18d543B9F8a57B2AE50a4FBc80033EC1", + ExchangeRouter: "0x87d66368cD08a7Ca42252f5ab44B2fb6d1Fb8d15", DepositVault: "0xF89e77e8Dc11691C9e8757e84aaFbCD8A67d7A55", WithdrawalVault: "0x0628D46b5D145f183AdB6Ef1f2c97eD1C4701C55", OrderVault: "0x31eF83a530Fde1B38EE9A18093A333D8Bbbc40D5", ShiftVault: "0xfe99609C4AA83ff6816b64563Bdffd7fa68753Ab", - SyntheticsReader: "0xcF2845Ab3866842A6b51Fb6a551b92dF58333574", + SyntheticsReader: "0x65A6CC451BAfF7e7B4FDAb4157763aB4b6b44D0E", SyntheticsRouter: "0x7452c558d45f8afC8c83dAe62C3f8A5BE19c71f6", GlvReader: "0x6a9505D0B44cFA863d9281EA5B0b34cB36243b45", diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/helpers.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/helpers.ts index 4de8b520..ad6b6635 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/helpers.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/helpers.ts @@ -449,6 +449,7 @@ export async function swap(sdk: GmxSdk, params: SwapParams) { wrappedToAddress, }); + const estimator = createSwapEstimator(marketsInfoData); const findSwapPath = createFindSwapPath({ @@ -464,6 +465,7 @@ export async function swap(sdk: GmxSdk, params: SwapParams) { fromToken && toToken && (getIsWrap(fromToken, toToken) || getIsUnwrap(fromToken, toToken)) ); + const swapOptimizationOrder: Parameters[1]["order"] = isLimit ? ["length", "liquidity"] : undefined; let swapAmounts: SwapAmounts | undefined; diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.ts index a78e4428..e5df4248 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/orders.ts @@ -397,10 +397,15 @@ export class Orders extends Module { throw new Error("Swap data is not defined"); } + // Validate that swapPathStats has a valid swapPath array + if (!swapAmounts.swapPathStats.swapPath || !Array.isArray(swapAmounts.swapPathStats.swapPath)) { + throw new Error("Invalid swap path: swapPath is not a valid array"); + } + return createSwapOrderTxn(this.sdk, { fromTokenAddress: fromToken.address, fromTokenAmount: swapAmounts.amountIn, - swapPath: swapAmounts.swapPathStats?.swapPath, + swapPath: swapAmounts.swapPathStats.swapPath, toTokenAddress: toToken.address, orderType, minOutputAmount: swapAmounts.minOutputAmount, diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createSwapOrderTxn.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createSwapOrderTxn.ts index 433f1a0d..dcb13eb2 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createSwapOrderTxn.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/modules/orders/transactions/createSwapOrderTxn.ts @@ -58,7 +58,7 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) { const orderVaultAddress = getContract(sdk.chainId, "OrderVault"); const wntSwapAmount = isNativePayment ? p.fromTokenAmount : 0n; const totalWntAmount = wntSwapAmount + p.executionFee; - + const initialCollateralTokenAddress = convertTokenAddress(sdk.chainId, p.fromTokenAddress, "wrapped"); const shouldApplySlippage = isMarketOrderType(p.orderType); @@ -69,6 +69,7 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) { const initialCollateralDeltaAmount = p.fromTokenAmount; + const createOrderParams = { addresses: { receiver: sdk.config.account, @@ -77,7 +78,7 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) { callbackContract: zeroAddress, market: zeroAddress, swapPath: p.swapPath, - uiFeeReceiver: zeroAddress, + uiFeeReceiver: sdk.config.settings?.uiFeeReceiverAccount || zeroAddress, }, numbers: { sizeDeltaUsd: 0n, @@ -95,6 +96,7 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) { isLong: false, shouldUnwrapNativeToken: isNativeReceive, referralCode: p.referralCode || zeroHash, + dataList: [], // Add the missing dataList field as an empty array }; const multicall = [ @@ -110,13 +112,15 @@ async function getParams(sdk: GmxSdk, p: SwapOrderParams) { }, ]; + const encodedPayload = multicall + .filter(Boolean) + .map((call) => + encodeFunctionData({ abi: abis.ExchangeRouter as Abi, functionName: call!.method, args: call!.params as any }) + ); + return { minOutputAmount, totalWntAmount, - encodedPayload: multicall - .filter(Boolean) - .map((call) => - encodeFunctionData({ abi: abis.ExchangeRouter as Abi, functionName: call!.method, args: call!.params as any }) - ), + encodedPayload, }; -} +} \ No newline at end of file diff --git a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapValues.ts b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapValues.ts index b672140d..d6deabdc 100644 --- a/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapValues.ts +++ b/src/Managing.Web3Proxy/src/generated/gmxsdk/utils/swap/swapValues.ts @@ -1,16 +1,13 @@ -import { SwapRoute } from "../../types/trade.js"; +import type {FindSwapPath, SwapAmounts} from "../../types/trade.js"; +import {SwapRoute} from "../../types/trade.js"; +import type {TokenData, TokensRatio} from "../../types/tokens.js"; -import type { SwapAmounts } from "../../types/trade.js"; -import type { FindSwapPath } from "../../types/trade.js"; -import type { TokenData } from "../../types/tokens.js"; -import type { TokensRatio } from "../../types/tokens.js"; +import {BASIS_POINTS_DIVISOR_BIGINT} from "../../configs/factors.js"; -import { BASIS_POINTS_DIVISOR_BIGINT } from "../../configs/factors.js"; - -import { applyFactor } from "../numbers.js"; -import { bigMath } from "../bigmath.js"; -import { convertToUsd, getIsEquivalentTokens, convertToTokenAmount, getAmountByRatio } from "../tokens.js"; -import { getTotalSwapVolumeFromSwapStats } from "../fees/index.js"; +import {applyFactor} from "../numbers.js"; +import {bigMath} from "../bigmath.js"; +import {convertToTokenAmount, convertToUsd, getAmountByRatio, getIsEquivalentTokens} from "../tokens.js"; +import {getTotalSwapVolumeFromSwapStats} from "../fees/index.js"; export function getSwapAmountsByFromValue(p: { tokenIn: TokenData; @@ -78,11 +75,17 @@ export function getSwapAmountsByFromValue(p: { const swapPathStats = findSwapPath(defaultAmounts.usdIn, { order: swapOptimizationOrder }); + console.log("🔍 Swap Path Stats Debug:"); + console.log(" - swapPathStats found:", !!swapPathStats); + console.log(" - swapPathStats.swapPath:", swapPathStats?.swapPath); + console.log(" - usdIn:", defaultAmounts.usdIn.toString()); + const totalSwapVolume = getTotalSwapVolumeFromSwapStats(swapPathStats?.swapSteps); const swapUiFeeUsd = applyFactor(totalSwapVolume, uiFeeFactor); const swapUiFeeAmount = convertToTokenAmount(swapUiFeeUsd, tokenOut.decimals, priceOut)!; if (!swapPathStats) { + console.log("❌ No swap path found, returning default amounts"); return defaultAmounts; } diff --git a/src/Managing.Web3Proxy/src/plugins/custom/gmx.ts b/src/Managing.Web3Proxy/src/plugins/custom/gmx.ts index 53b3b043..f43108ac 100644 --- a/src/Managing.Web3Proxy/src/plugins/custom/gmx.ts +++ b/src/Managing.Web3Proxy/src/plugins/custom/gmx.ts @@ -1828,7 +1828,6 @@ export const swapGmxTokensImpl = async ( toTokenAddress: toTokenData.address, allowedSlippageBps: allowedSlippageBps, referralCodeForTxn: encodeReferralCode("kaigen_ai"), - triggerPrice: triggerPrice, // Only defined for limit orders skipSimulation: true, } as SwapParams; diff --git a/src/Managing.Web3Proxy/test/plugins/swap-tokens.test.ts b/src/Managing.Web3Proxy/test/plugins/swap-tokens.test.ts index 2f42d687..c0f7b187 100644 --- a/src/Managing.Web3Proxy/test/plugins/swap-tokens.test.ts +++ b/src/Managing.Web3Proxy/test/plugins/swap-tokens.test.ts @@ -1,24 +1,21 @@ -import {before, describe, it} from 'node:test' +import {describe, it} from 'node:test' import assert from 'node:assert' import {getClientForAddress, swapGmxTokensImpl} from '../../src/plugins/custom/gmx.js' import {Ticker} from '../../src/generated/ManagingApiTypes' describe('swap tokens implementation', () => { - let sdk: any - - before(async () => { - // Initialize the SDK with a test account - const testAccount = '0xbba4eaa534cbd0ecaed5e2fd6036aec2e7ee309f' - sdk = await getClientForAddress(testAccount) - }) it('should swap USDC to ETH successfully', async () => { try { + const testAccount = '0x0AF60B5C1c349744Ef8fa8c4ed78Ee1A0d392Fe9' + const sdk = await getClientForAddress(testAccount) + + console.log('Account', sdk.account) const result = await swapGmxTokensImpl( sdk, - Ticker.BTC, // fromTicker + Ticker.SOL, // fromTicker Ticker.USDC, // toTicker - 0.000056 // amount + 0.001 // amount ) assert.strictEqual(typeof result, 'string')